The pfntd parameter is required and the FONTDLG structure must be properly initialized.
Note: If the field in the FONTDLG structure, pfntd must be a pointer to a FONTDLG structure that is either static or allocated from the heap. This FONTDLG structure must not be allocated on the stack.
Upon return, the FONTDLG structure is updated with any user alterations and the field contains the value returned by the font dialog's WinDismissDlg function. By default this is the ID of the push button pressed to dismiss the dialog, DID_OK or DID_CANCEL, unless the application supplied additional push buttons in its template.
The pointer to the FONTDLG structure is placed in the QWL_USER field of the dialog's frame window. If in a custom font dialog procedure the pointer to the FONTDLG structure is desired, it should be queried from the frame window with WinQueryWindowULong.
To subclass the default font dialog with a new template, the application must give the module and ID of the new font dialog template and the address of a dialog procedure for message handling. Window IDs in the range 0x0000 through 0x0FFF are reserved for the font dialog controls. IDs from outside this range must be chosen for any controls added to a custom font dialog.
When a modeless dialog is dismissed, the owner of the font dialog will receive a WM_COMMAND message with the parameter equal to the ID of the font dialog.