初始化畫刷函數:
BOOL CreateHatchBrush( int nIndex, COLORREF crColor );
nIndex
Specifies the hatch style of the brush. It can be any one of the following values:
- HS_BDIAGONAL Downward hatch (left to right) at 45 degrees //反斜線
- HS_CROSS Horizontal and vertical crosshatch //正交叉網格
- HS_DIAGCROSS Crosshatch at 45 degrees //斜交叉網格
- HS_FDIAGONAL Upward hatch (left to right) at 45 degrees //正斜線
- HS_HORIZONTAL Horizontal hatch //水平線
- HS_VERTICAL Vertical hatch //垂直線
創建位圖畫刷:
BOOL CreatePatternBrush( CBitmap* pBitmap );
Return Value
Nonzero if successful; otherwise 0.
Parameters
pBitmap
Identifies a bitmap.
/*CBitmap bm;
bm.LoadBitmap (IDB_BITMAP1);
CBrush br;
br.CreatePatternBrush (&bm);
*/