But the Window Handle is a Main or Mainframe Window
I did a FindWindow api call
To get the handle As the parent is a C console app and it did work once before I created the modless dialog box in the child process
No, you just need to find its handle by one of the enumerate functions, or get the child to pass it back in some way. A handle is just a pointer used to identify a Window so you can send messages to it. To be honest, I am not exactly clear about what you are trying to do beyond the basic SendMessage function.
I want to call an external application (created by me) using ShellExecute or CreateProcess. It is just an update application for the main app. The problem is, what ever I tried I failed to get window focus back to my main app when the process (update app) is terminated. I created a simple MFC/SDI app that calls window's notepad under "C:\windows\notepad.exe" which suffers from the same problem, just to show you what I mean. I need the parent window -which is the main app- to be disabled (like a modal dialog box behaviour) until the new app -update application- will finish its job.
PS:If I do not disable the main window with EnableWindow(FALSE) I have paint corruption with windows XP and back when I move the update application.
No, WFMO is the same as WFSO (just waiting for more than one object; however I don't see any additional one in your problem description).
The usual way is move waiting in a worker thread to not block the main UI thread.
Last Visit: 31-Dec-99 19:00 Last Update: 1-Mar-21 12:21