The Window I Need to watch for Is an Error Window that is from another program. This window has an ok button that I need to press then as soon as it closes the NT Dr.Watson Error window opens and I need to be able to press its cancel button then restart the program.
When you intercept a WM_CREATE message, take the hWnd of the created window, and use the API call GetClassName to find out the class of the window.
If this is the window you are looking for, then use the FindWindowEX api call to find the handle of the command button on the form you want to click, and use SendMessage API to send it WM_MOUSEDOWN then WM_MOUSEUP.
I have downloaded and looked at the code. This is almost perfect.
But the error window from this program I need to press the cancel button on does not have a caption name and does not appear in the taskbar when it comes up. How do I get Information from windows like this?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.