Does the following code make any sense at all or am I way off?
Code:
wnd=FindWindow(NULL,"target window");
SendMessage(wnd,WM_RBUTTONDOWN,0,LPARAM(100,100));
The idea is to simulate a mouseclick in another window.
But it doesn't do anything.
Maybe I'm obtaining window handle wrong? The string "target window" is in target windows name. I have no idea how to get handle in a better way than findwindow.
Thanks.
*edit*
Tried what I saw in other thread here:
Code:
wnd=FindWindow(NULL,"Notepad");
SendMessage(wnd,WM_CHAR,97,0);
Still nothing happened.
Could it be because I'm using C++ builder?