Identifies the UI_PKEY_FontProperties_ForegroundColorType property.

   name = UI_PKEY_FontProperties_ForegroundColorType
   shellPKey = UI_PKEY_FontProperties_ForegroundColorType
   formatID = 00000310-7363-696e-8441798acf5aebb7
   propID = 310


UI_PKEY_FontProperties_ForegroundColorType is used by an application, in conjunction with UI_PKEY_FontProperties_ForegroundColor, to query Text color gallery settings.

The property value is from the UI_SWATCHCOLORTYPE enumeration.

The default value is UI_SWATCHCOLORTYPE_RGB.

The following table describes the property values.

UI_SWATCHCOLORTYPE_NOCOLOR Not supported by the FontControl.
UI_SWATCHCOLORTYPE_AUTOMATICApplication should query the appropriate system metric for the color value—typically the current Windows theme text color that is retrieved with GetSysColor(COLOR_WINDOWTEXT).
UI_SWATCHCOLORTYPE_RGB Application should query UI_PKEY_FontProperties_ForegroundColor for the color value.

The color value of UI_PKEY_FontProperties_ForegroundColor is displayed on the Text color button and selected in the Text color gallery.


UI_PKEY_FontProperties_ForegroundColorType is passed to the IUICommandHandler::Execute callback method when a color swatch is selected in a FontControl Text color gallery.

Note  It is highly recommended that the application only set an initial Text color value and not re-set this value when the cursor is repositioned within a document. The last selection should be maintained to avoid the need to re-select the desired color.

Related topics

Font Control Properties
Font Control



Community Additions