|
-
February 21st, 2012, 11:06 AM
#1
Layered dialog, stay on top?
Did anyone create a modeless dialog as a layered window and successfully made it stay "on top" (always visible) ? I can't make it work in Windows XP.
I created a dialog class from CDialogEx, set the layered property to True in VS2010 resource editor, and added a call to SetLayeredWindowAttributes during OnInitDialog to make it transparent.
Then by calling SetWindowPos with parameter &wndTop, I expect the window to stay on top.
In Vista and Win7, the dialog stays on top as expected, but if I run the program in Windows XP and click inside a view in my MDI application, the dialog is drawn behind that child frame. Only if I compile without the Layered property, it stays on top in Win XP. Is this a limitation in Windows XP, or am I missing something?
Last edited by TubularX; February 21st, 2012 at 11:11 AM.
-
February 22nd, 2012, 03:16 AM
#2
Re: Layered dialog, stay on top?
Please upload a little demo project that can reproduce that behavior.
It's not very clear which are your dialog styles and which is its relationship with other windows.
From your description, it is a child of MDI client window, and AFAIK a child window cannot be layered.
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
|