CGXProperties::AddUserProperty
void AddUserProperty(WORD nID, const CGXStyle& style);
nID
String resource id with the user property’s name.
style
Reference to a style-object.
Remarks
Call this method to register a user-defined property in the property-object.
To register user-defined properties, the following steps are necessary:
1.Create a string resource, e.g., GX_IDS_OUTLINECURRENTCELL.
2.Call AddUserProperty with GX_IDS_OUTLINECURRENTCELL and a style. This style is used for displaying the property in the “User-defined properties” grid in the CGXDisplayPropertiesDialog dialog. Each user-defined property is displayed as a row with the name and the property value. The end user can change the property value at run time, whereas the style defines the appearance of the value (e.g., a combo box or a specific color, ...). For example the “Current Cell”-property is defined as follows:
AddUserProperty(GX_IDS_OUTLINECURRENTCELL, CGXStyle()
.SetControl(GX_IDS_CTRL_CBS_DROPDOWNLIST)
.SetChoiceList("Invert normal\n"
+ "Invert thick\n"
+ "Normal Border\n"
+ "Thick Border\n"
+ "No Value")
.SetValue("Invert Normal")
);
This means that the end user can choose the value from a drop-down list.