CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Threaded View

  1. #1
    Join Date
    Aug 2006
    Posts
    231

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured