Owner-Drawn Menu Items

You can completely control the appearance of a menu item by using an owner-drawn item. Owner-drawn items require an application to take total responsibility for drawing selected, checked, and unchecked states. For example, if an application provides a font menu, it can draw each menu item by using the corresponding font; the item for Roman will be drawn with Roman, the item for Italic will be drawn in Italic, and so on.

Windows CE handles owner-drawn menu items differently than Windows-based desktop platforms do. In some respects, it treats an owner-drawn item as it would any other menu item. On other Windows-based platforms, the device context (DC) is initialized to its default state. Under Windows CE, however, the DC is initialized to the grayed or highlighted status of the current item. Also, unlike other Windows-based platforms, Windows CE automatically highlights an owner-drawn menu item when it has the keyboard focus.