WM INITDLG
Appearance
This message occurs when a dialog box is being created.
Syntax
param1 HWND hwnd; /* Focus window handle. */ param2 PVOID pcreate; /* Application-defined data area. */
Parameters
- hwnd (HWND) - Input
- The handle of the control window that is to receive the input focus.
- pcreate (PVOID) - Input
- This points to the data area and is passed by the WinLoadDlg, WinCreateDlg, and WinDlgBox functions in their parameter. This parameter MUST be a pointer rather than a long. The first 2 bytes in the data referenced by this pointer should be the total size of the data referenced by the pointer (for example, see the ENTRYFDATA or the FRAMECDATA structure). PM requires this information to enable it to ensure that the referenced data is accessible to both 16-bit and 32-bit code.
Returns
- rc (BOOL) - returns
- Focus set indicator.
- TRUE
- Focus window is changed. The dialog procedure can change the window to receive the focus, by issuing a WinSetFocus whose specifies the handle of another control within the dialog box.
- FALSE
- Focus window is not changed.
Remarks
Default Dialogs
This message is sent to the dialog procedure, before the dialog box is shown, thereby offering the dialog procedure the opportunity to perform the initialization of the dialog box.
If any string substitutions are made by the WinSubstituteStrings call when the dialog is created, the WM_SUBSTITUTESTRING message may have been sent before the WM_INITDLG message is sent.
Default Processing
The default window procedure takes no action on this message, other than to set rc to FALSE.
Default Dialogs
The default dialog procedure passes this message to the default window procedure, which sets rc to FALSE.
Related Messages
- WM_INITDLG (Default Dialogs)