[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
BOOL pascal IsDialogMessage(HWND hDlg, LPMSG pMsg)

  Tests if a message is intended for a dialog box. If it is, then the
message is processed by the dialog box and TRUE is returned. If the
message is not intended for the dialog box, FALSE is returned. This
function is intended for use with modeless dialog boxes, and is
compatible with the Microsoft Windows version.

Parameters
  hDlg is the handle of the modeless dialog box that the message may
   be intended for.
  pMsg is a far pointer to a MSG structure.

Returns
  TRUE if the message was processed by hDlg, FALSE if not.

Example
  HWND hWndCalc;

  while (GetMessage(&msg) != WM_QUIT)
      If the modeless dialog box exists, see if the message is intended
      for that dialog box. If it isn't, then dispatch it ourselves.
    if (hWndCalc && IsDialogMessage(hWndCalc, &msg))
      continue;
    TranslateAccelerator(&msg);
    DispatchMessage(&msg);

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson