CWnd::CenterWindow

This method centers a window relative to its parent. It is usually called from CDialog::OnInitDialog to center dialog boxes relative to the main window of the application.

At a Glance

Header file: Afxwin.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later
Complete documentation: Visual C++ documentation

Syntax

void CenterWindow( CWnd* pAlternateOwner = NULL );

See Also

CWnd::GetDesktopWindow, CDialog::OnInitDialog