Share via


CFontDialog::GetColor

Call this function to retrieve the selected font color.

COLORREF GetColor( ) const;

Return Value

The color of the selected font.

Example

// Get the color of the selected font, if any.
CFontDialog dlg;
if (dlg.DoModal() == IDOK)
{
   COLORREF color = dlg.GetColor();
   TRACE(_T("Color of the selected font = %8x\n"), color);
}

Requirements

Header: afxdlgs.h

See Also

Reference

CFontDialog Class

Hierarchy Chart

CFontDialog::GetCurrentFont