<< Return to Main Index

< Return to Class Index

CGXStyle::GetUserAttribute

const CGXAbstractUserAttribute& GetUserAttribute(WORD nID) const;

void GetUserAttribute(WORD nID, CString& s) const;

ID

A string resource id where the string resource contains the base style name.

s

A reference to a CString which will receive the user attribute’s value. If the user attribute is not initialized, s will not be changed.

Return Value

Returns a const reference to the CGXAbstractUserAttribute that is stored in the CGXStyle. If the user attribute is not initialized, a reference to an empty CGXUserAttribue will be returned.

Remarks

When drawing the grid, Objective Grid fills up all uninitialized attributes of the cell’s style object with the base style’s attributes.

If the GetInclude... methods return FALSE, Objective Grid will try to initialize this attribute with the base style’s setting. If GetInclude... methods return TRUE, the specific setting will be used for drawing.

Note: If you want user attributes to appear on the user attribute page of the CGXStyleSheet you can use nID as user-defined attribute, you have to register it with CGXStylesMap::AddUserAttribute. See CGXStylesMap for instruction on how to do this.

See Also

CGXStyle::GetIncludeUserAttribute CGXStyle::SetUserAttribute CGXStylesMap::AddUserAttribute CGXAbstractUserAttribute

CGXStyle

Class Overview | Class Members