Windows sends the WM_INITDIALOG message to the dialog box during the Create, CreateIndirect, or DoModal calls, which occur immediately before the dialog box is displayed.
Override this method if you want to perform special processing when the dialog box is initialized. In the overridden version, first call the base class OnInitDialog but ignore its return value. You will typically return TRUE from your overridden method.
Windows calls the OnInitDialog function by using the standard global dialog-box procedure common to all Microsoft Foundation Class Library dialog boxes. It does not call this function through your message map, and therefore you do not need a message map entry for this method.
Note: |
|---|
You cannot override this method when you use a
CFileDialog object in a program that is compiled under Windows Vista. For more information about changes to CFileDialog under Windows Vista see CFileDialog Class.
|