CGXStyle::SetUserAttribute

CGXStyle& SetUserAttribute(WORD nID, const CGXAbstractUserAttribute& attribute);

CGXStyle& SetUserAttributePtr(WORD nID, CGXAbstractUserAttribute* pValue);

CGXStyle& SetUserAttribute(WORD nID, const CString& s);

CGXStyle& SetUserAttribute(WORD nID, LPCTSTR pszValue);

CGXStyle& SetUserAttribute(WORD nID, DWORD dwValue);

CGXStyle& SetUserAttribute(WORD nID, LONG lValue);

CGXStyle& SetUserAttribute(WORD nID, double dValue);

CGXStyle& SetUserAttribute(WORD nID, GXBYTE8 b8value);

nID

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

attribute

Reference to a user attribute object that should be copied into the style.

pValue

A pointer to a user attribute object. Only the pointer will be copied.

s

A const referene to a CString with the new user attribute value. The method will parse the string and determine the type (long, double, text etc.) and instantiate a CGXUserAttribute.

pszValue

A pointer to the text-buffer which should be copied to the attribute’s value. The method will parse the text and determine the type (long, double, text etc). and instantiate a CGXUserAttribute.

dwValue

This version will instantiate a CGXUserAttibute with the given number.

lValue

This version will instantiate a CGXUserAttibute with the given number.

dValue

This version will instantiate a CGXUserAttibute with the given number.

b8Value

This version will instantiate a CGXUserAttibute with the given 8-byte binary value.

Return Value

Returns the this pointer.

Remarks

Call this function to change the value for the specified user-defined attribute.

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::GetUserAttribute  CGXStylesMap::AddUserAttribute  CGXAbstractUserAttribute  CGXUserAttribute

CGXStyle

 Class Overview |  Class Members