Microsoft Windows CE 3.0  

DialogProc

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function is an application-defined callback function that processes messages sent to a modal or modeless dialog box.

BOOL
CALLBACK
DialogProc( HWND
hwndDlg
, UINT
uMsg
, WPARAM
wParam
, LPARAM
lParam
)
;

Parameters

hwndDlg
Handle to the dialog box.
uMsg
Specifies the message.
wParam
Specifies additional message-specific information.
lParam
Specifies additional message-specific information.

Return Values

Typically, the dialog box procedure should return TRUE if it processed the message, and FALSE if it did not. If the dialog box procedure returns FALSE, the dialog manager performs the default dialog operation in response to the message.

If the dialog box procedure processes a message that requires a specific return value, the dialog box procedure should set the desired return value by calling SetWindowLong( hwndDlg, DWL_MSGRESULT, lResult) immediately before returning TRUE. Note that you must call SetWindowLongimmediately before returning TRUE; doing so earlier may result in the DWL_MSGRESULT value being overwritten by a nested dialog box message.

The following messages are exceptions to the general rules:

WM_CTLCOLORBTN WM_CTLCOLORSCROLLBAR
WM_CTLCOLORDLG WM_CTLCOLORSTATIC
WM_CTLCOLOREDIT WM_INITDIALOG
WM_CTLCOLORLISTBOX WM_QUERYDRAGICON

Consult the documentation for the specific message for details on the semantics of the return value.

Remarks

You should use the dialog box procedure only if you use the dialog box class for the dialog box. This is the default class and is used when no explicit class is specified in the dialog box template. Although the dialog box procedure is similar to a window procedure, it must not call the DefWindowProcfunction to process unwanted messages. Unwanted messages are processed internally by the dialog box window procedure.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later      
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

CreateDialog, CreateDialogIndirect, CreateDialogIndirectParam, CreateDialogParam, DefWindowProc, DialogBox, DialogBoxIndirect, DialogBoxIndirectParam, DialogBoxParam, SetFocus, MAKEINTRESOURCE, WM_INITDIALOG