int DialogBoxIndirectParam(hInstance,hDialogTemplate, hWndParent, lpDialogFunc, dwInitParam)
This function creates an application's modal dialog box, sends a WM_INITDIALOG message to the dialog function before displaying the dialog box and passes dwInitParam as the message lParam. This message allows the dialog function to initialize the dialog-box controls.
For more information on creating an application modal dialog box, see the description of the DialogBoxIndirect function.
Parameter | Type/Description | |
hInstance | HANDLE Identifies an instance of the module whose executable file contains the dialog-box template. | |
hDialogTemplate | HANDLE Identifies a block of global memory that contains a DLGTEMPLATE data structure. | |
hWndParent | HWND Identifies the window that owns the dialog box. | |
lpDialogFunc | FARPROC Is the procedure-instance address of the dialog function. For details, see the “Comments” section in the description of the DialogBoxIndirect function. | |
dwInitParam | DWORD Is a 32-bit value which DialogBoxIndirectParam passes to the dialog function when it creates the dialog box. |
The return value specifies the value of the wResult parameter specified in the EndDialog function that is used to terminate the dialog box. Values returned by the application's dialog box are processed by Windows and are not returned to the application. The return value is –1 if the function could not create the dialog box.