Topmost window in an application
Posted on 2003-03-16
I know there is an other thread on a similar subject, but my question has a variant.
Il would like to know how to place a dialog window on top of all the other windows and dialogs of an application, but not on top of windows of any other application. The goal is to make a toolbox that would be topmost, but if an other application get the focus, the toolbox will not get over it.
I currently tried many ways to do this without success :
// Placed in the Create() function of the toolbox dialog
// This make the window topmost of ALL the other windows on the desktop
// regardless of the application it belongs to.
// Placed in the parent window
The second way works well if the parent window is a CView window, but it doesn't work when the parent window s a DoModal() dialog.