<< Return to Main Index

< Return to Class Index

CGXAbstractControlFactory::RegisterAllControls

virtual void RegisterAllControls(CGXStylesMap* pStylesMap) = 0;

pStylesMap

Points to the CGXStylesMap object where the controls’ descriptions shall be added.

Remarks

RegisterAllControls is called to register the control names with the styles map. This is necessary when you want the controls to appear in the Controls-page of the CGXStyleSheet.

You should override this method either if you have added your own cell types and you want them to appear in the style sheets for all grids in your application or if you only want a specific selection of cell types to appear in the CGXStyleSheet.

Note: This method registers controls only to appear in the CGXStyleSheet. The method CGXAbstractControlFactory::CreateControl is responsible for instantiating the control. If you don’t want a cell type to be visible in the CGXStyleSheet, you don’t have to register it here. You will still be able to use the cell type with CGXStyle::SetControl in your grid.

Here is how your override of RegisterAllControls might look:

void CGXControlFactory::RegisterAllControls(CGXStylesMap* pStylesMap)

{

pStylesMap->AddControl(GX_IDS_CTRL_EDIT);

pStylesMap->AddControl(GX_IDS_CTRL_HEADER);

pStylesMap->AddControl(GX_IDS_CTRL_TEXTFIT);

pStylesMap->AddControl(GX_IDS_CTRL_COMBOBOX);

pStylesMap->AddControl(GX_IDS_CTRL_ONEBASED);

pStylesMap->AddControl(GX_IDS_CTRL_ZEROBASED);

pStylesMap->AddControl(GX_IDS_CTRL_ONEBASED_EX);

pStylesMap->AddControl(GX_IDS_CTRL_ZEROBASED_EX);

pStylesMap->AddControl(GX_IDS_CTRL_CBS_DROPDOWN);

pStylesMap->AddControl(GX_IDS_CTRL_CBS_DROPDOWNLIST);

pStylesMap->AddControl(GX_IDS_CTRL_SPINEDIT);

pStylesMap->AddControl(GX_IDS_CTRL_HOTSPOT);

pStylesMap->AddControl(GX_IDS_CTRL_SCROLLEDIT);

pStylesMap->AddControl(GX_IDS_CTRL_LISTBOX);

pStylesMap->AddControl(GX_IDS_CTRL_STATIC);

pStylesMap->AddControl(GX_IDS_CTRL_PUSHBTN);

pStylesMap->AddControl(GX_IDS_CTRL_RADIOBTN);

pStylesMap->AddControl(GX_IDS_CTRL_RADIOBTN3D);

pStylesMap->AddControl(GX_IDS_CTRL_CHECKBOX);

pStylesMap->AddControl(GX_IDS_CTRL_CHECKBOX3D);

pStylesMap->AddControl(GX_IDS_CTRL_MASKEDIT);

pStylesMap->AddControl(GX_IDS_CTRL_PROGRESS);

pStylesMap->AddControl(GX_IDS_CTRL_PASSWORD);

pStylesMap->AddControl(GX_IDS_CTRL_CBS_TABBED_DROPDOWN);

pStylesMap->AddControl(GX_IDS_CTRL_CBS_TABBED_DROPDOWNLIST);

pStylesMap->AddControl(GX_IDS_CTRL_TABBED_COMBOBOX);

#if _MFC_VER >= 0x0400

pStylesMap->AddControl(GX_IDS_CTRL_RICHEDIT);

pStylesMap->AddControl(GX_IDS_CTRL_CHECKLIST_COMBOBOX);

pStylesMap->AddControl(GX_IDS_CTRL_DATETIME);

pStylesMap->AddControl(GX_IDS_CTRL_DATETIMENOCAL);

#endif

}

See Also

CGXControl::AddUserAttributes CGXStylesMap::RegisterDefaultControls

CGXAbstractControlFactory

Class Overview | Class Members