description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: CMFCPropertyGridFontProperty Class |
CMFCPropertyGridFontProperty Class |
11/04/2016 |
|
|
83693f33-bbd3-4fcb-a9ad-fa79fcf2ca24 |
The CMFCPropertyGridFileProperty
class supports a property list control item that opens a font selection dialog box.
class CMFCPropertyGridFontProperty : public CMFCPropertyGridProperty
Name | Description |
---|---|
CMFCPropertyGridFontProperty::CMFCPropertyGridFontProperty | Constructs a CMFCPropertyGridFontProperty object. |
CMFCPropertyGridFontProperty::~CMFCPropertyGridFontProperty |
Destructor. |
Name | Description |
---|---|
CMFCPropertyGridFontProperty::FormatProperty |
Formats the text representation of a property value. (Overrides CMFCPropertyGridProperty::FormatProperty.) |
CMFCPropertyGridFontProperty::GetColor | Retrieves the font color that the user selects from the font dialog box. |
CMFCPropertyGridFontProperty::GetLogFont | Retrieves the font that the user selects from the font dialog box. |
CMFCPropertyGridFontProperty::GetThisClass |
Used by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type. |
CMFCPropertyGridFontProperty::OnClickButton |
Called by the framework when the user clicks a button that is contained in a property. (Overrides CMFCPropertyGridProperty::OnClickButton.) |
Header: afxpropertygridctrl.h
Constructs a CMFCPropertyGridFontProperty
object.
CMFCPropertyGridFontProperty(
const CString& strName,
LOGFONT& lf,
DWORD dwFontDialogFlags = CF_EFFECTS | CF_SCREENFONTS,
LPCTSTR lpszDescr = NULL,
DWORD_PTR dwData = 0,
COLORREF color = (COLORREF)-1);
strName
[in] The name of the property.
lf
[in] A logical font structure that specifies the attributes of the font.
dwFontDialogFlags
[in] Styles that are applied to the font dialog box that is displayed when you click the property value drop-down button. The default value is the bitwise combination (OR) of CF_EFFECTS and CF_SCREENFONTS. For more information, see the Flags parameter of the CHOOSEFONT Structure.
lpszDescr
[in] Description of the font property. The default value is NULL.
dwData
[in] Application-specific data, such as an integer or a pointer to other data that is associated with the property. The default value is 0.
color
[in] The color of the font. The default value is the default color.
A CMFCPropertyGridFontProperty
object represents a font property in a property grid font control.
The following example demonstrates how construct an object of the CMFCPropertyGridFontProperty
class. This example is part of the New Controls sample.
[!code-cppNVC_MFC_NewControls#26]
Retrieves the font color that the user selects from the font dialog box.
COLORREF GetColor() const;
An RGB color value that represents the selected font color.
Retrieves the font that the user selects from the font dialog box.
LPLOGFONT GetLogFont();
A pointer to a LOGFONT structure that describes the selected font.
Hierarchy Chart
Classes
CMFCPropertyGridCtrl Class
CMFCPropertyGridProperty Class