共用方式為


CMFCColorMenuButton::SetColor

Sets the color of the current color button.

virtual void SetColor(
   COLORREF clr,
   BOOL bNotify=TRUE 
);

Parameters

  • [in] clr
    An RGB color value.

  • [in] bNotify
    TRUE to apply the clr parameter color to any associated menu button or toolbar button; otherwise, FALSE.

Remarks

Call this method to change the color of the current color button. If the bNotify parameter is nonzero, the color of the corresponding button on any associated popup menu or toolbar is changed to the color specified by the clr parameter.

Requirements

Header: afxcolormenubutton.h

See Also

Reference

CMFCColorMenuButton Class

Hierarchy Chart

COLORREF