CDialog::OnInitDialog

Syntax

virtual BOOL OnInitDialog();

Remarks

Called in response to the WM_INITDIALOG message. This message is sent during the Create or CreateIndirect call, which occurs immediately before the dialog box is displayed. Override it if you need to perform special processing when the dialog box is initialized.

The OnInitDialog function is called via the standard global dialog-box procedure, AfxDlgProc, common to all Microsoft Foundation Class Library dialogs, rather than through your message map, so you do not need a message-map entry for this member function.

Return Value

Returns TRUE by default, indicating successful dialog initialization.

See Also

CDialog::Create, CDialog::CreateIndirect, WM_INITDIALOG