WM_CHOOSEFONT_SETLOGFONT

Send the WM_CHOOSEFONT_SETLOGFONT message to a Font dialog box to set the current logical font information.

WM_CHOOSEFONT_SETLOGFONT 
wParam = 0;                // not used, must be zero 
lParam = (LPLOGFONT) lplf; // pointer to structure with font data 
 

Parameters

lplf
Pointer to a LOGFONT structure that contains information about the current logical font.

Return Values

No return value.

Remarks

When you call the ChooseFont function to create a Font dialog box, you can use the lpLogFont member of the CHOOSEFONT structure to specify a LOGFONT structure containing initial values for the dialog box. Use the WM_CHOOSEFONT_SETLOGFONT message to specify a LOGFONT structure with different values while the Font dialog box is open.

Typically, you would send the WM_CHOOSEFONT_SETLOGFONT message from a CFHookProc hook procedure. The hook procedure can also send the WM_CHOOSEFONT_GETLOGFONT and WM_CHOOSEFONT_SETFLAGS messages.

QuickInfo

  Windows NT: Requires version 3.51 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in commdlg.h.

See Also

Common Dialog Box Library Overview, Common Dialog Box Messages, CFHookProc, ChooseFont, CHOOSEFONT, LOGFONT, WM_CHOOSEFONT_GETLOGFONT, WM_CHOOSEFONT_SETFLAGS