Share via


CWindow::GetTopWindow

 

Retrieves the top-level child window.

Syntax

HWND GetTopWindow( ) const throw();

Remarks

See GetTopWindow in the Windows SDK.

Example

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::GetTopWindow() to get the top-level child window

CWindow myWindow;
myWindow.Attach(hWnd);
HWND hWndFavoriteChild = myWindow.GetTopWindow();

Requirements

Header: atlwin.h

See Also

CWindow Class
CWindow::GetWindow