I've got an app that runs uniquely (i.e. one instance executing).
If another EXE is started, it detects the 1st, sends it some data (via WM_COPYDATA), issues a SetFocus for the running window and then terminates itself.
All of this is working except the original window does not seem to be given the focus (i.e. its not on top, KB activity goes to another window etc.)
SetFocus returns with no error (0). The hWnd param must be correct as it was just used in the successful WM_COPYDATA function.
I've searched but not found anything related, why doesn't SetFocus seem to be working? Or is SetFocus the wrong API to call?
George
If another EXE is started, it detects the 1st, sends it some data (via WM_COPYDATA), issues a SetFocus for the running window and then terminates itself.
All of this is working except the original window does not seem to be given the focus (i.e. its not on top, KB activity goes to another window etc.)
SetFocus returns with no error (0). The hWnd param must be correct as it was just used in the successful WM_COPYDATA function.
I've searched but not found anything related, why doesn't SetFocus seem to be working? Or is SetFocus the wrong API to call?
George
Comment