CFrameWnd::InsertComboBox

Call this member function to insert a combo box into the command bar.

Syntax

HWND InsertComboBox ( int nWidth );

At a Glance

Header File Afxwin.h
Platforms
Versions 1.0 and later

Parameters

nWidth
Width, in pixels, of the combo box.

Return Value

The window handle to the combo box. If this function fails, it returns a value of NULL.

Remarks

This member function 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.

Note This member function of the CFrameWnd class is unique to Windows CE.

See Also

CFrameWnd Overview, CFrameWnd Member Functions, Frame Windows and Splitter Windows, CommandBar_InsertComboBox