一 : fillsolidrect
Call this member function to fill the given rectangle with the specified solid color.二 : CDC::FillSolidRect
void FillSolidRect( LPCRECT lpRect, COLORREF clr );
void FillSolidRect( int x, int y, int cx, int cy, COLORREF clr);
参数说明
lpRect
Specifies the bounding rectangle (in logical units). You canpass either a pointer to a RECT data structure or a CRect objectfor this parameter.
指向RECT数据结构的指针,包含被填充的矩形的逻辑坐标,可以为该参数传递RECT数据结构或Crect对象的指针
clr Specifies the color toto be used to fill the rectangle.
指定填充矩形使用的颜色。
x
Specifies the logical x-coordinate of the upper-left corner ofthe rectangle.
矩形左上角的X逻辑坐标。
y
Specifies the logical y-coordinate of the upper-left corner ofthe destination rectangle.
矩形左上角的Y逻辑坐标。
cx
Specifies the width of the rectangle.
指定矩形的宽度。
cy
Specifies the height of the rectangle.
指定矩形的高度。
备注
Call this member function to fill the given rectangle with thespecified solid color.
调用该成员函数用指定的固体色填充矩形。
FillSolidRect is very similar to CDC::FillRect; however,FillSolidRect uses only solid colors (indicated by the COLORREFparameter), while FillRect takes a brush and therefore can be usedto fill a rectangle with a solid color, a dithered color, hatchedbrushes, or a pattern. FillSolidRect usually is faster thanFillRect.
FillSolidRect与CDC::FillRect类似,FillSolidRect只能使用固体色(由COLORREF参数决定)。但FillRect带有画刷,因此可以为矩形填充固体色、抖动色、阴影或使用调色板。FillRect通常比FillSolidRect慢。
Note When you callFillSolidRect, the background color, which was previously set usingSetBkColor, is set to the color indicated by clr.
调用FillSolidRect时,以前用SetBkColor设置的背景色,被设置为clr指定的颜色。
本文标题:fillsolidrect-fillsolidrect61阅读| 精彩专题| 最新文章| 热门文章| 苏ICP备13036349号-1