Results 1 to 2 of 2

Thread: Verify a parent window?

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2001
    Location
    Chicago
    Posts
    40

    Question Verify a parent window?

    I'm getting a list of all the visible windows on the desktop and want to find out by using the window's handle if it is a parent window. I know about the GetParent API:

    GetParent returns the handle of the parent window of another window. For example, the parent of a button would normally be the form window it is in. If successful, the function returns a handle to the parent window. If it fails (for example, trying to find the parent of a non-window), it returns 0.

    When I try this code for a known parent window it returns 0.
    But I'm not sure if its correct to assume that if it returns 0 that it is a parent window.

    Is there another way to do this, or is my assumption correct?

  2. #2
    Megatron
    Guest
    If it returns 0, it means that the window is already a top-level window (i.e. it has no parent).

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