Public Declare Function CreateSolidBrush Lib "gdi32" Alias "CreateSolidBrush" (ByVal crColor As Long) As Long
hBrush=CreateSolidBrush(RGB(255,0,255))
还可以创建其它种类的刷子
hBrush=CreateSolidBrush(RGB(255,0,255))
还可以创建其它种类的刷子
Declare Function CreateSolidBrush Lib "gdi32" Alias "CreateSolidBrush" (ByVal crColor As Long) As Long
说明
用纯色创建一个刷子
返回值
Long,如执行成功,返回新刷子的一个句柄;否则返回零
参数表
参数 类型及说明
crColor Long,数字的RGB彩色
注解
一旦刷子不再需要,就用DeleteObject函数将其删除
hOldBrush = SelectObject(hdc, hBrush)
Call FillRect(hdc, mRect, hBrush)
Call SelectObject(hdc, hOldBrush)
Call DeleteObject(hBrush)
Call DeleteObject(hOldBrush)