Send the WM_CHOOSEFONT_GETLOGFONT message to a Font dialog box to retrieve information about the user’s current font selections.
WM_CHOOSEFONT_GETLOGFONT wParam = 0; // not used, must be zero lParam = (LPLOGFONT) lplf; // address of struct. with font data
This message does not return a value.
The ChooseFont function creates a Font dialog box. When the user closes the Font dialog box, the ChooseFont function returns information about the user’s font selections in the CHOOSEFONT structure. The lpLogFont member of the CHOOSEFONT structure is a pointer to a LOGFONT structure.
Use the WM_CHOOSEFONT_GETLOGFONT message to get information about the user’s current font selections while the Font dialog box is open. For example, if you enable the Apply button in the Font dialog box, send the message to get the font information to apply to the current text selection.
Typically, you enable a CFHookProc hook procedure to process WM_COMMAND messages for the Apply button. When the user clicks the Apply button, the hook procedure sends the WM_CHOOSEFONT_GETLOGFONT message to the dialog box.