IsDialogMessage
The IsDialogMessage
function determines whether a message is intended for the specified dialog box
and, if it is, processes the message.
BOOL IsDialogMessage(
HWND hDlg, |
// handle of dialog
box |
LPMSG lpMsg |
// address of
structure with message |
); |
|
Parameters
hDlg
Identifies
the dialog box.
lpMsg
Points to an MSG
Return Values
If the
message has been processed, the return value is nonzero.
If the
message has not been processed, the return value is zero.
Remarks
Although the IsDialogMessage
function is intended for modeless dialog boxes, you can use it with any window
that contains controls, enabling the windows to provide the same keyboard
selection as is used in a dialog box.
When IsDialogMessage
processes a message, it checks for keyboard messages and converts them into
selection commands for the corresponding dialog box. For example, the TAB key, when
pressed, selects the next control or group of controls, and the DOWN ARROW key,
when pressed, selects the next control in a group.
Because the IsDialogMessage
function performs all necessary translating and dispatching of messages, a
message processed by IsDialogMessage must not be passed to the TranslateMessage
IsDialogMessage sends WM_GETDLGCODE
IsDialogMessage can send DM_GETDEFID
See Also