Window TopMost window on top???
-
Hello community, how to create a second window that is always on top of a main window, so if i click on the main window that this pop up window stay on top until my function is finished??!? I create a simple dialog with the resource editor and set "Set Foreground" to true, but even if i click on the main dialog this new little dialog is in the background, how to avoid this? If i set "Topmost" to true, than is my pop up dialog always on top, but for all other windows too, and i like that hi is only for my main dialog in the foreground!? Thanks for help Arrin EDIT: after i show my child dialog and bring him to top i disable my main dialog to make him unklickable and when my funktion is finished i enable him again, but im not sure that this is the right way!?
// in my funktion:
dlgProgress.ShowWindow(SW_SHOW);
dlgProgress.SetForegroundWindow();
EnableWindow(FALSE); // for main dialog
// after funktion:
EnableWindow(TRUE); // for main dialog -
Hello community, how to create a second window that is always on top of a main window, so if i click on the main window that this pop up window stay on top until my function is finished??!? I create a simple dialog with the resource editor and set "Set Foreground" to true, but even if i click on the main dialog this new little dialog is in the background, how to avoid this? If i set "Topmost" to true, than is my pop up dialog always on top, but for all other windows too, and i like that hi is only for my main dialog in the foreground!? Thanks for help Arrin EDIT: after i show my child dialog and bring him to top i disable my main dialog to make him unklickable and when my funktion is finished i enable him again, but im not sure that this is the right way!?
// in my funktion:
dlgProgress.ShowWindow(SW_SHOW);
dlgProgress.SetForegroundWindow();
EnableWindow(FALSE); // for main dialog
// after funktion:
EnableWindow(TRUE); // for main dialogLooks like you need a modal dialog. If you're using MFC, call CDialog::DoModal[^]. Otherwise call DialogBox[^].
«_Superman_» I love work. It gives me something to do between weekends.
-
Hello community, how to create a second window that is always on top of a main window, so if i click on the main window that this pop up window stay on top until my function is finished??!? I create a simple dialog with the resource editor and set "Set Foreground" to true, but even if i click on the main dialog this new little dialog is in the background, how to avoid this? If i set "Topmost" to true, than is my pop up dialog always on top, but for all other windows too, and i like that hi is only for my main dialog in the foreground!? Thanks for help Arrin EDIT: after i show my child dialog and bring him to top i disable my main dialog to make him unklickable and when my funktion is finished i enable him again, but im not sure that this is the right way!?
// in my funktion:
dlgProgress.ShowWindow(SW_SHOW);
dlgProgress.SetForegroundWindow();
EnableWindow(FALSE); // for main dialog
// after funktion:
EnableWindow(TRUE); // for main dialogI may have had a similar problem back several months ago. I have a modeless PropertySheet (a modeless tabbed dialog window) separate from my main Doc-View window. I created my modeless PropertySheet window:
// Modeless property sheet - with parent window as such and call to SetWindowPos() allows for property sheet to be on top m_pSettings->Create(this, WS_SYSMENU | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | DS_MODALFRAME | DS_CONTEXTHELP, WS_EX_DLGMODALFRAME); m_pSettings->SetWindowPos(this,0,0,0,0,SWP_NOMOVE | SWP_NOSIZE);
I do recall that there was something special to this (modeless property sheet) and the peeps here helped me out!