Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 1.88 KB

File metadata and controls

33 lines (21 loc) · 1.88 KB
description Learn more about: Creating an Extended Combo Box Control
title Creating an Extended Combo Box Control
ms.date 11/04/2016
helpviewer_keywords
extended combo boxes
CComboBoxEx class [MFC], creating extended combo box controls
extended combo boxes [MFC], creating
ms.assetid a964267e-97b6-4e77-9f89-55bb5c68913f

Creating an Extended Combo Box Control

How the extended combo box control is created depends on whether you are using the control in a dialog box or creating it in a nondialog window.

To use CComboBoxEx directly in a dialog box

  1. In the dialog editor, add an Extended Combo Box control to your dialog template resource. Specify its control ID.

  2. Specify any styles required, using the Properties dialog box of the extended combo box control.

  3. Use the Add Member Variable Wizard to add a member variable of type CComboBoxEx with the Control property. You can use this member to call CComboBoxEx member functions.

  4. Use the Class Wizard to map handler functions in the dialog class for any extended combo box control notification messages you need to handle (see Mapping Messages to Functions).

  5. In OnInitDialog, set any additional styles for the CComboBoxEx object.

To use CComboBoxEx in a nondialog window

  1. Define the control in the view or window class.

  2. Call the control's Create member function, possibly in OnInitialUpdate, possibly as early as the parent window's OnCreate handler function. Set the styles for the control.

See also

Using CComboBoxEx
Controls