Capturando evento onclick

Delphi

10/08/2005

Gostaria de, no código abaixo, conseguir pegar se um determindado item do menu está sendo clicado. Alguém se habilita?

var

hWnd : Integer;
hMainMenu : Integer;
hMenu : Integer;
MenuID : Integer;

begin

hWnd := FindWindow(´Notepad´, nil);

If hWnd <> 0 Then

begin

hMainMenu := GetMenu(hWnd);

hMenu := GetSubMenu(hMainMenu, 2);

MenuID := GetMenuItemID(hMenu, 1);

SendMessage(hWnd, WM_COMMAND, MenuID, 0);

end;
end;


Peununes

Peununes

Curtidas 0

Respostas

Peununes

Peununes

10/08/2005

Me respondam uma coisa, tem COMO ´pegar´ eventos de outros aplicativos? :)

Grande abraço


GOSTEI 0
Michael

Michael

10/08/2005

Olá colega!

Tem como sim. A resposta é API Hooking. ;-)

Procure aqui no fórum pelo assunto.

[]´s


GOSTEI 0
POSTAR