I know that I can use
SendMessage(buttonHandle, BN_CLICK, 0, 0);
to get my program (program 1) to click a button on another program (program 2), but I was wondering if there was a way of doing something else. The button I wish to click on program 2 is going to pop up a window.
QUESTION:: Is there any message I can send in the SendMessage() function to bring that window up directly or is there possibly some other function that I can use to do that?
BN_CLICKis not a valid message that you can send to a button HWND. You are thinking ofBM_CLICKinstead.