Jump to content

WinDefFontDlgProc

From EDM2
Revision as of 21:49, 26 November 2023 by Martini (talk | contribs) (Created page with "This function is the default dialog procedure for the font dialog. ==Syntax== WinDefFontDlgProc(hwnd, msg, mp1, mp2) ==Parameters== ;hwnd (HWND) - input :Dialog-window han...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function is the default dialog procedure for the font dialog.

Syntax

WinDefFontDlgProc(hwnd, msg, mp1, mp2)

Parameters

hwnd (HWND) - input
Dialog-window handle.
msg (ULONG) - input
Message identity.
mp1 (MPARAM) - input
Parameter 1.
mp2 (MPARAM) - input
Parameter 2.


Returns

mresReply (MRESULT) - returns
Message-return data.

Remarks

All unprocessed messages in a custom dialog procedure should be passed to the default font dialog procedure so that the dialog can implement its default behavior.

Example Code

This example uses the default dialog procedure for the font dialog to cause default processing of unprocessed dialog messages.

#define INCL_WINSTDFONT  /* Window Standard Font Functions       */
#include <os2.h>

MRESULT MyFontDlgProc(HWND hwnd, ULONG msg, MPARAM mpParam1,
                      MPARAM mpParam2)
{
switch(msg)
   {

   /**************************************************************/
   /* Process user-supported messages                            */
   /**************************************************************/
   .
   .
   .
   default:
      return (WinDefFontDlgProc(hwnd, msg, mpParam1, mpParam2));
   }
}

Definition

#define INCL_winstdfont
#include <os2.h>

HWND       hwnd;       /*  Dialog-window handle. */
ULONG      msg;        /*  Message identity. */
MPARAM     mp1;        /*  Parameter 1. */
MPARAM     mp2;        /*  Parameter 2. */
MRESULT    mresReply;  /*  Message-return data. */

mresReply = WinDefFontDlgProc(hwnd, msg, mp1, mp2);