Buttons, menus, static text controls, list boxes, and combo boxes can be created with an owner-drawn style flag. Typically, Windows handles the task of drawing a control however when a control has the owner-drawn style, the normal windows drawing process is suppressed and the parent of the control will receive a WM_DRAWITEM and WM_MEASUREITEM message when the control is created and needs to be painted. This allows the developer to build controls with a custom-rendered appearance and adjust aspects that are not available using regular properties.
The following two examples demonstrate how to customise the combobox and the menu
The application below consists of customised listbox and a customised static box. The customised listbox displays a small bitmap next to each list item. Selecting any item will copy the Listbox item to the static box
The application below displays a customised menu. Clicking the file options displays an user defined drop-down list