Ver Mensaje Individual
  #12  
Antiguo 15-10-2008
petete2008 petete2008 is offline
Miembro
 
Registrado: oct 2008
Posts: 109
Reputación: 16
petete2008 Va por buen camino
he intentado hacerlo simulando un click de raton para que desapareciera el menú que sale cuando pulsamos boton iderecho pero no funciona ya que me hace constantes clicks automaticos y se me termina bloqueando.

if Code >= 0 then begin
{ This example does nothing except beep when the right mouse button is pressed. }
if Msg = WM_RBUTTONDOWN then
MessageBeep(1);
// simular pulsar boton izquierdo mouse
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);


{ If you handled the situation, and don't want Windows to process the
message, do *NOT* execute the next line. Be very sure this is what
want, though. If you don't pass on stuff like WM_MOUSEMOVE, you
will NOT like the results you get. }
Result := CallNextHookEx(HookHandle, Code, Msg, MouseHook);
end else
Result := CallNextHookEx(HookHandle, Code, Msg, MouseHook);
Responder Con Cita