Find window and click a button there?
-
There is a message box window and I need to find it among the other Win windows, should bi FindWindow to search for its specfic "title" and then it has 2 buttons in it "Cancel" and "Ok" I need to send a message button_click to one of them. How to find that message box window by its title, find the handles of the "Ok" and "Cancel" buttons and send a message to one of them? I dont remember all the windows API for this
9ine
-
There is a message box window and I need to find it among the other Win windows, should bi FindWindow to search for its specfic "title" and then it has 2 buttons in it "Cancel" and "Ok" I need to send a message button_click to one of them. How to find that message box window by its title, find the handles of the "Ok" and "Cancel" buttons and send a message to one of them? I dont remember all the windows API for this
9ine
HWND hwndParent = FindWindow(NULL, "title"); HWND hwndOK = FindWindowEx(hwndParent , NULL, NULL, "OK"); SendMessage(hwndOK, BM_CLICK , 0,0);
tanvon I Blog here my VC++ My all articles at codeproject here
-
HWND hwndParent = FindWindow(NULL, "title"); HWND hwndOK = FindWindowEx(hwndParent , NULL, NULL, "OK"); SendMessage(hwndOK, BM_CLICK , 0,0);
tanvon I Blog here my VC++ My all articles at codeproject here