CGXStyle& BaseStyle(WORD wStyleID);
wStyleID
Specifies a unique id for a registered base-style.
Returns a reference to a registered base-style.
Base-styles must be registered in your OnInitialUpdate method before you can use them. Each base-style is accessed through a unique id.
Base-styles are maintained by the stylesmap-object. This method gives easy access to the style and allows you to determine the base-style settings for your view.
Example:
If you have registered a base-style with
static TCHAR BASED_CODE szMyStyle[] = _T("MyStyle");
WORD m_nMyStyle;
// "My Style" - A style with a combo box and choice list as default
CGXStylesMap* pStylesMap = GetParam()->GetStylesMap();
m_nMyStyle = pStylesMap->RegisterStyle(szMyStyle,
CGXStyle()
.SetControl(GX_IDS_CTRL_CBS_DROPDOWNLIST)
.SetChoiceList(_T("one\r\ntwo\r\nthree\r\nfour\r\nfive\r\nsix\r\n"))
, TRUE // system-style (non removable)
);
you can later determine settings of that style with
BOOL bIsControl = BaseStyle(m_nMyStyle).GetIncludeControl();
Although it is possible to directly change the style object returned by BaseStyle, it is recommended that you change the settings of a base-style object by calling ChangeBaseStyle. See ChangeBaseStyle for more information.
CGXStylesMap::RegisterStyle CGXGridCore::ChangeBaseStyle
Class Overview | Class Members