Identifies the window whose window procedure will receive the message. If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows; but the message is not sent to child windows.

This was taken from my win32api Programmers Reference (SendMessage is the api). How would I get the handle of the window that I want to target? I am working on a program that sends key presses to a different window and I need to know how I would get the handle of the window in order to do this.. Would it just be the name of the window?


invoke SendMessage,windowhandle,WM_KEYDOWN,20h,15

this is what im trying to do but I do not know how to get the window handle.
Posted on 2003-01-04 23:00:43 by resistance_is_futile
nevermind. I got it thanks anyway guys. I need to quit being so lazy lol. Heres the working code:

.if wParam==1001
Invoke FindWindowEx,NULL,NULL,NULL,addr nameofwindow

invoke SendMessage,eax,WM_KEYDOWN,20h,15

Posted on 2003-01-04 23:22:36 by resistance_is_futile