SAMPLE: OwnCombo.exe Demonstrates an Owner-Draw Combo Box

ID: Q81706

The information in this article applies to:

SUMMARY

When Windows creates an owner-draw combo box, it sends WM_DRAWITEM messages to the parent window of the combo box. To respond to this message, the parent window must perform the steps necessary to draw the items in the owner-draw combo box.

OwnCombo.exe is a sample in the Microsoft Software Library that contains an example of a fixed-height owner-draw combo box that contains strings. The combo box also demonstrates painting bitmaps, changing the text color, and storing data associated with each item using the CB_SETITEMDATA message. All of the relevant code is contained within the ODDLG.C module.

MORE INFORMATION

The following file is available for download from the Microsoft Software Library:

 ~ OwnCombo.exe (size: 27949 bytes) 

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE : How to Obtain Microsoft Support Files from Online Services

Additional query words: Keywords : kbfile kbsample kb16bitonly kbComboBox kbCtrl kbGrpUser kbWinOS310 kbWinOS300

Last Reviewed: December 17, 1998