Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Customizing an Appointment Item's Background Color

Windows Mobile 6.5
4/8/2010

You can customize an Appointment item's background color for Calendar Day, Agenda, and Week Views, by creating the following two registry keys:

[HKLM\System\PimSources\<SourceID>]
   "Customizations" = REG_DWORD:PIMSRC_CUSTOM_APPOINTMENTS_COLORS
   "Type" = REG_DWORD:PIMSRC_TYPE_APPOINTMENTS

[HKLM\System\PimSources\<SourceID>\Colors]
   "1" = REG_DWORD:<RGB value>                // A COLORREF structure that describes a 32-bit RGB color.

The value of <SourceID> in this registry key is the same value that you use for the Source ID for this customization. Appointment items tagged with this value will render with this customization. For information on how to choose the Source ID value, see Customizing the PIM User Experience by Using Source Providers.

The Colors key value "1" corresponds to the PIMSRC_COLOR enumeration value PIMSRC_COLOR_APPOINTMENTS_BACKGROUND. When you write code to access this registry key value, you can use the PIMSRC_COLOR constant as the name of the key value.

The color value is a COLORREF structure that describes as 32-bit RGB color. When specifying an explicit RGB color, the COLORREF value has the following hexadecimal form.

0x00bbggrr

The low-order byte contains a value for the relative intensity of red, the second byte contains a value for green, and the third byte contains a value for blue. The high-order byte must be zero.

The maximum value for a single byte is 0xFF. To create a COLORREF color value, use the RGB macro.

Community Additions

Show:
© 2015 Microsoft