Changing Fonts and Colors

Your application can use custom draw to change an item's font. To do this, select the HFONT you want into the device context specified by the hdc member of the NMCUSTOMDRAW structure associated with that notification. Because the font you select might have different metrics than the default font, be sure that you include the CDRF_NEWFONT bit in the return value for the notification message. For more information on using this functionality, see the sample code in the "Sample Custom Draw Function" section of this chapter.

The font that your application specifies is used to display that item when it is not selected. custom draw does not allow you to change the font attributes for selected items.