CreateDialogIndirectParam

  HWND CreateDialogIndirectParam(hinst, lpDialogTemplate, hwndOwner, dlgprc, lParamInit)    
  HANDLE hinst; /* handle of application instance */
  LPDLGTEMPLATE lpDialogTemplate; /* address of template */
  HWND hwndOwner; /* handle of owner window */
  DLGPROC dlgprc; /* instance address of dialog proc */
  LPARAM lParamInit; /* initialization value */

This function creates a modeless dialog box, sends a WM_INITDIALOG message to the dialog function before displaying the dialog box, and passes lParamInit as the message lParam. This message allows the dialog function to initialize the dialog-box controls. Otherwise, this function is identical to the CreateDialogIndirect function.

For more information on creating a modeless dialog box, see the description of the CreateDialogIndirect function.

Parameters

hinst

Identifies the module containing the dialog template resource. GetModuleHandle(NULL) can be called to return the module handle of the current process.

lpDialogTemplate

Points to a block of memory that contains a DLGTEMPLATE data structure.

hwndOwner

Identifies the window that owns the dialog box.

dlgprc

Is the procedure-instance address of the dialog function. For details, see the Comments section in the description of the CreateDialogIndirect function.

lParamInit

Is a value which CreateDialogIndirectParam passes as the lParam of a WM_INITDIALOG message to the dialog function when it creates the dialog box.

Return Value

The return value is the window handle of the dialog box. It is NULL if the function cannot create either the dialog box or any controls in the dialog box.

Comments

The CreateDialogIndirectParam function may be used as either a wide-character function (where text arguments must use Unicode) or an ANSI function (where text arguments must use characters from the Windows 3.x character set installed).

See Also

CreateDialogIndirect CreateDialog, CreateDialogParam DialogBoxParam, DialogBoxIndirectParam, WM_INITDIALOG