CGXComboBox(CGXGridCore* pGrid, UINT nEditID, UINT nListBoxID, UINT nFlags);
pGrid
Pointer to the parent grid.
nEditID
Specifies the edit control’s window ID.
nListBoxID
Specifies the drop-down list box’s window ID.
nFlags
Specifies the combo box type:
Constructs a combo-box control object.
You need to register this object in the grid with CGXGridCore::RegisterControl before you can use it in cells (see example).
This example shows how Objective Grid registers combo-box controls in the grid:
// Objective Grid Comboboxes (not derived from CComboBox)
// allow text input which fits the choice list
RegisterControl(GX_IDS_CTRL_TEXTFIT,
new CGXComboBox(this, GX_IDS_CTRL_TEXTFIT, GX_IDS_CTRL_TEXTFIT+1, GXCOMBO_TEXTFIT));
// allow user to input any text
RegisterControl(GX_IDS_CTRL_COMBOBOX,
new CGXComboBox(this, GX_IDS_CTRL_COMBOBOX, GX_IDS_CTRL_COMBOBOX+1, GXCOMBO_NOTEXTFIT));
// use an integer as cell value
RegisterControl(GX_IDS_CTRL_ONEBASED,
new CGXComboBox(this, GX_IDS_CTRL_ONEBASED, GX_IDS_CTRL_ONEBASED+1, GXCOMBO_ONEBASED));
// use a zero-based integer as cell value
RegisterControl(GX_IDS_CTRL_ZEROBASED,
new CGXComboBox(this, GX_IDS_CTRL_ZEROBASED, GX_IDS_CTRL_ZEROBASED+1, GXCOMBO_ZEROBASED));
// use an integer as cell value and display entry from list
RegisterControl(GX_IDS_CTRL_ONEBASED_EX,
new CGXComboBox(this, GX_IDS_CTRL_ONEBASED_EX, GX_IDS_CTRL_ONEBASED_EX+1, GXCOMBO_ONEBASED|GXCOMBO_DISPLAYCHOICE));
// use a zero-based integer as cell value and display entry from list
RegisterControl(GX_IDS_CTRL_ZEROBASED_EX,
new CGXComboBox(this, GX_IDS_CTRL_ZEROBASED_EX, GX_IDS_CTRL_ZEROBASED_EX+1, GXCOMBO_ZEROBASED|GXCOMBO_DISPLAYCHOICE));
Class Overview | Class Members