I have some problem with creating modeless dialog windows. To decribe situation I'm going to show you 2 examples:
1. I have 3 modeless dialog windows (the main and 2 additional). This time I'm opening all of them in WinApp::InitInstance procedure. And in this case all works as I want: if I click on any of all 3 windows - the window gets the focus, moving up over other two other dialogs. That is my aim.
2. All the same - 3 modeless dialogs (absolutely the same) and the same procedures for creating them. But this time I have opened only the main dialog in WinApp::InitInstance. Two additional dialogs are opening by the commands in the main dialog. And in this case I have the problem. After opening any of the additional dialogs the main dialog goes down under the additional. Even if it has the focus!
So - this is the question. What is the difference between opening modeless dialogs in WinApp::InitInstance and opening them later (from ON_COMMAND procedures - for ex. from menu commands) What have I to do with main dialog. I want it to go up while getting focus! But not remaining under the additional dialogs!
Some comments: all of the dialog windows have these (some of all) constructing modes:
3D look = true
border = Resizing
style = Popup
window edge = true
topmost = false
system modal = false
Visible = true
most of others are false