CFrameWnd::InsertComboBox

This method inserts a combo box into the command bar.

At a Glance

Header file: Afxwin.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later

Syntax

HWND InsertComboBox ( int nWidth );

Parameters

nWidth
Width, in pixels, of the combo box.

Return Value

The window handle to the combo box indicates success. NULL indicates failure.

Remarks

This method creates a combo box that has the CBS_DROPDOWNLIST and WS_VSCROLL styles. If you want to use different styles, or if you want to insert more than one combo box in your command bar, use the global function, CommandBar_InsertComboBox.

CFrameWnd::InsertComboBox inserts the combo box to the right of any existing elements in the command bar. If you want to insert a menu bar at a particular index in the command bar, use the global function, CommandBar_InsertComboBox. Pass the CFrameWnd::m_hCommandBar data member as the hwndCB parameter to this function.

This method of the CFrameWnd class is unique to Windows CE.

See Also

CommandBar_InsertComboBox