Copyright: Owner Draw Component Help


Owner Draw Controls Component: Overview
Owner-Draw Control: Overview

The Owner-Draw Control adds either an owner-draw list box or an owner-draw combo box to your project.

This new owner-draw control can then be used in any dialog box or window of your application.

•	Owner-Draw Control: Specifics

•	Owner-Draw Control: Results


Owner Draw Controls Component: Specifics
Owner-Draw Control: Specifics

The Owner-Draw Control consists of two dialogs: Owner-Draw Control Component (used for selecting the type of control and changing the base name of the control class) and Change Files (used to change the header and implementation files of the control class). For more information on these dialogs, see Owner-Draw Control Component and Change Files.

Once you have chosen which type of owner-draw control to insert and the names of the header and implementation files, choose the OK button to insert an owner-draw control into your current project.

Note that switching control types resets all values to their defaults.

For more information on the exact changes made to your project, see Owner-Draw Control: Results.


Owner Draw Controls Component: Results
Owner-Draw Control: Results

The following changes are implemented in your project upon successful insertion of the control:

•	A new class that implements either an owner-draw list box or owner-draw combo box.

The header and implementation files for this class are discussed below.

•	The header (.H) file of the new class.

including directions on how to hook the new control up to the rest of the user's project.  (Directions also include how to tweak resources appropriately to make the new control work as expected.)

•	The implementation (.CPP) file of the new class.

All overridable list box/combo box functions have been overridden to give you an idea of how this is done.

•	Note that there is no direct connection between the new materials added and existing materials in your project. This means that to use this new class, you must declare an instance of it in your project. A common example would be to declare a member variable (of the new control class type) in a dialog class of your application that uses a list box or combo box.


Owner Draw Controls Component
Owner-Draw Control Component

Use the Owner-Draw Control Component dialog box to select the type of owner-draw control to insert and the base name of the class that implements the control to be inserted.

Control Type
Choose the type of owner-draw control to insert; either list box or combo box.

Name
Use this control to change the name of the class that implements the owner-draw control.

Base Class
The name of the base class of the owner-draw control class; either CListBox or CComboBox.

File
Name of the implementation file for the owner-draw control.

Change...
Press this button to change the name of the header and implementation file for the control class.


Change Files

Use the Change Files dialog box to change the name of the header and implementation files of the owner-draw control class.

Header file
Use this control to change the name of the control’s header file.

Implementation file
Use this control to change the name of the control’s implementation file.

Browse...
Displays a dialog box for selecting a new drive and/or directory for the location of the header or implementation file.