I want to click a button on an external program from code. The button doesn't have any shortcut assigned to it, so I can't use sendkeys.
I managed to find the hwnd of the button, but I don't know how to click it. Any ideas?
Printable View
I want to click a button on an external program from code. The button doesn't have any shortcut assigned to it, so I can't use sendkeys.
I managed to find the hwnd of the button, but I don't know how to click it. Any ideas?
You can use findwindow and findwindowex to get the handles then use BM_CLICK with sendmessage to click the button.
Thanks Jmacp, BM_CLICK was just what I was looking for.