|
-
September 10th, 1999, 12:30 PM
#1
Modeless dialog overdrawing all windows
Hi, I recently converted a modal dialog to a modeless one. It works fine but always seems to be on top of any other windows no matter if it is active or not. In fact it even appears on the screen when it is inactive and another window is maximized. I believe was due to it having the WS_OVERLAPPED style.
In order to stop this I have tried to set its style to WS_CHILD, but this seems to stop it from working at all. The contents of the dialog are displayed but do not respond to any events. If another window is dragged over it or maximized the dialog is painted over and disappears.
There has to be a simple way to have a modeless dialog that does not stick on top of everything else. Unfortunately as my dialog was derived from a modal one I cannot see anyway other than to totally rewrite the entire creation and message handling code.
Please help, thanks
-
September 10th, 1999, 12:33 PM
#2
Whoops..forgot to say this
-
September 10th, 1999, 01:13 PM
#3
Re: Modeless dialog overdrawing all windows
The Modeless dialog will always on top of the windows. You have to rewrite the dialog as normal window and handle all the messages.
-
October 17th, 2002, 12:50 PM
#4
Better late then never
I ran accross this same problem myself. I found a work around that allowed parent and child dialogs to overlap one another.
To implement the workaround create an invisible window as discussed in the following article:
http://www.codesoup.com/asp/tiptext....n.pag&type=mfc
Make the invisible window the parent of your child dialogs. Then the parent window can overlap the child window.
-
October 17th, 2002, 01:17 PM
#5
Well, in MFC you can set the parent window to GetDesktopWindow() when you create the
modeless dialog to accomplish this.
Maybe you do something along those lines in non-MFC.
-
October 17th, 2002, 01:28 PM
#6
GetDesktopWindow
Actually, GetDesktopWindow is an API exported from user32.dll! So should work fine.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|