|
The method upstairs is to use the second constructor of cpen. Use clientdc to draw?
===============
CClientDC dc (this);
LOGBRUSH lb;
lb.lbColor = RGB (255,0,0);
lb.lbHatch = HS_CROSS;
lb.lbStyle = BS_SOLID;
CPen NewPen (PS_GEOMETRIC | PS_DOT | PS_ENDCAP_SQUARE, 20,&lb, 0, NULL);
CPen * pOldPen = dc.SelectObject (&NewPen);
dc.MoveTo (20,20);
dc.LineTo (200,200);
dc.SelectObject (pOldPen); |
|