Hello,
The notepad Find dialog can gain focus + loose focus and visually stay on top of the main application. I would like to do this, but it's not clear how. If anyone can assist, I am all ears!
Thanks.
Printable View
Hello,
The notepad Find dialog can gain focus + loose focus and visually stay on top of the main application. I would like to do this, but it's not clear how. If anyone can assist, I am all ears!
Thanks.
My guess is that it simply has the TOPMOST style/status. I forgot what exactly it is.
You need the CWnd::SetWindowPos function of MFC - CWindow Class.
That would be the SetWindowPos() function in pure Win32 API if you're not using MFC.
There may be a bit more too it. While SetWindowPos (MFC or Win32) can put a window 'on top', the MS find dialog stays on top of the application only and lets the user manipulate the application itself while the dialog is up. Any more tricks out there?
Ohh, in VB6, it's like:Quote:
Originally Posted by Crunchy Cat
VB Code:
Form2.Show vbModeLess, Me
I am not sure about C++, maybe someone else could tell you.
Use the CreateDialog family of functions instead of the DialogBox family to create the dialog. This creates modeless instead of modal dialogs. You might have to adapt your message loop to work with this; make sure you call the IsDialogMessage function correctly.