CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 1999
    Location
    Sweden
    Posts
    6

    TopWindow over all

    Hi!

    How can I make a CDialog-window that is shown on top of all it's sisters,cousins and sisters-children??

    Thanks!


  2. #2
    Join Date
    Aug 1999
    Location
    Sweden
    Posts
    6

    Re: TopWindow over all

    I forgot to tell: The window I want to create still have to be a child-window to the mainwindow!



  3. #3
    Join Date
    May 1999
    Location
    Jerusalem, Israel
    Posts
    251

    Re: TopWindow over all


    BOOL CYourWindow::PreCreateWindow(CREATESTRUCT& cs)
    {
    cs.dwExStyle |= WS_EX_TOPMOST;

    return CParentClass::PreCreateWindow(cs);
    }





    Jack Shainsky
    Jerusalem, Israel
    [email protected]

  4. #4
    Join Date
    Aug 1999
    Location
    Sweden
    Posts
    6

    Re: TopWindow over all

    Thanks, but for some very strange reason, I never
    get to PreCreateWindow when I try to debug!!
    What can I do wrong?


  5. #5
    Join Date
    May 1999
    Location
    Jerusalem, Israel
    Posts
    251

    Re: TopWindow over all

    If the window is modal dialog, try call in OnInitDialog ModifyStyleEx(0, WS_EX_TOPMOST, 0);

    Jack Shainsky
    Jerusalem, Israel
    [email protected]

  6. #6
    Join Date
    Aug 1999
    Posts
    33

    Re: TopWindow over all

    In InitDialog use SetWindowPos(&wndTopMost,NULL,NULL,NULL,NULL,SWP_NOSIZE|SWP_NOMOVE)


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