CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2007
    Posts
    68

    Getting the window on top of another window

    I have a CWnd* of a window(name it as A).
    How can I get the CWnd* of the window(Name it as B) which is on top of Window A.
    (To be clear I need to get the handle of Window B, which precedes Window A in Z-Order.)

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Getting the window on top of another window

    Use SetWindowPos api (or MFC CWnd method, if available).

  3. #3
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Getting the window on top of another window

    This is your fourth thread on the same topic. You'll get better responses by sticking to the same thread.

  4. #4
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: Getting the window on top of another window

    Quote Originally Posted by zuhrs View Post
    I have a CWnd* of a window(name it as A).
    How can I get the CWnd* of the window(Name it as B) which is on top of Window A.
    (To be clear I need to get the handle of Window B, which precedes Window A in Z-Order.)
    Use GetWindow. Then convert handle to CWnd* with CWnd::FromHandle.
    Best regards,
    Igor

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