BOOL CALLBACK DialogProc(hwndDlg, msg, wParam, lParam) | |||||
HWND hwndDlg; | /* handle of dialog box | */ | |||
UINT msg; | /* message | */ | |||
WPARAM wParam; | /* first message parameter | */ | |||
LPARAM lParam; | /* second message parameter | */ |
The DialogProc function is an application-defined callback function that processes messages sent to a modeless dialog box.
hwndDlg
Identifies the dialog box.
msg
Specifies the message.
wParam
Specifies 16 bits of additional message-dependent information.
lParam
Specifies 32 bits of additional message-dependent information.
Except in response to the WM_INITDIALOG message, the dialog box procedure should return nonzero if it processes the message, and zero if it does not. In response to a WM_INITDIALOG message, the dialog box procedure should return zero if it calls the SetFocus function to set the focus to one of the controls in the dialog box. Otherwise, it should return nonzero, in which case the system will set the focus to the first control in the dialog box that can be given the focus.
The dialog box procedure is used only if the dialog box class is used for the dialog box. This is the default class and is used if no explicit class is given in the dialog box template. Although the dialog box procedure is similar to a window procedure, it must not call the DefWindowProc function to process unwanted messages. Unwanted messages are processed internally by the dialog box window procedure.
DialogProc is a placeholder for the application-defined function name. The actual name must be exported by including it in an EXPORTS statement in the application's module-definition file.
CreateDialog, CreateDialogIndirect, CreateDialogIndirectParam, CreateDialogParam, DefWindowProc, SetFocus