用指定的灰色颜色填充矩形。
BOOL GrayRect(
CRect rect,
int nPercentage = -1,
COLORREF clrTransparent = (COLORREF)-1,
COLORREF clrDisabled = (COLORREF)-1
);
参数
[in] rect
实心矩形区域。[in] nPercentage
您在矩形希望灰色的百分比。[in] clrTransparent
透明的颜色。[in] clrDisabled
此方法没有为该本地化使用的颜色,如果 nPercentage 设置为-1。
返回值
TRUE,如果方法成功;否则 FALSE。
备注
对于参数 nPercentage,值较低的指示一个暗色。
nPercentage 的最大值为200。大于200的值不更改矩形的外观。如果该值为-1,该方法使用 clrDisabled 限制矩形的饱和。
要求
标头: afxdrawmanager.h