int DialogBoxIndirectParam(hinst, hDialogTemplate, hwndOwner, dlgprc, lInitParam) | |||||
HANDLE hinst; | /* handle of application instance | */ | |||
LPDLGTEMPLATE hDialogTemplate; | /* handle of dialog template | */ | |||
HWND hwndOwner; | /* handle of owner window | */ | |||
DLGPROC dlgprc; | /* instance address of dialog proc | */ | |||
LPARAM lInitParam; | /* initialization value | */ |
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 lInitParam 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.
hinst
Identifies the module that is creating the dialog window. GetModuleHandle(NULL) can be called to return the module handle of the current process.
hDialogTemplate
Identifies a block of global memory that contains a DLGTEMPLATE structure.
hwndOwner
Identifies the window that owns the dialog box.
dlgprc
Specifies the procedure-instance address of the dialog function. For more information about the dialog box procedure, see the description of the DialogProc callback function.
lInitParam
Is a value which DialogBoxIndirectParam passes as the lParam of a WM_INITDIALOG message to the dialog function when it creates the dialog box.
The return value specifies the value of the nResult 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.
CreateDialog, CreateDialogIndirect, CreateDialogParam, CreateDialogIndirectParam, DialogBoxIndirect, DialogBoxParam, DialogProc, EndDialog, WM_INITDIALOG