◄CWnd► ◄Up► ◄Contents► ◄Index► ◄Back► ──Microsoft Foundation Classes────────────────────────────────────────────── CWnd* GetWindow( UINT nCmd ) const; Parameter Description <nCmd> Specifies the relationship between CWnd and the returned window. It can take one of the following values: Value Meaning GW_CHILD Identifies the CWnd first child window. GW_HWNDFIRST If CWnd is a child window, returns the first sibling window. Otherwise, it returns the first top-level window in the list. GW_HWNDLAST If CWnd is a child window, returns the last sibling window. Otherwise, it returns the last top-level window in the list. GW_HWNDNEXT Returns the next window on the window manager's list. GW_HWNDPREV Returns the previous window on the window manager's list. GW_OWNER Identifies the CWnd owner. Remarks Searches the window manager's list for a window. The window manager's list contains entries for all top-level windows, their associated child windows, and the child windows of any child windows. The <nCmd> parameter specifies the relationship between CWnd and the returned window. Return Value Identifies a window. The value is NULL if the function reaches the end of the window manager's list or if <nCmd> is invalid. The returned pointer may be temporary, and should not be stored for later use. See Also ◄CWnd::GetDlgItem►, ◄::GetWindow► -♦-