CWnd::CenterWindow

Call this member function to center a window relative to its parent. Usually called from CDialog::OnInitDialog to center dialog boxes relative to the main window of the application.

Syntax

void CenterWindow( CWnd* pAlternateOwner = NULL );

At a Glance

Header File Afxwin.h
Platforms
Versions 1.0 and later
Complete documentation Visual C++ documentation

See Also

CWnd Overview, CWnd Member Functions, Window Class Categories, CWnd::GetDesktopWindow, CDialog::OnInitDialog