HPEN ExtCreatePen(
DWORD dwPenStyle, // pen style
DWORD dwWidth, // pen width
CONST LOGBRUSH *lplb, // pointer to structure for brush attributes
DWORD dwStyleCount, // length of array containing custom style bits
CONST DWORD *lpStyle // optional array of custom style bits
);
先设置好你的Canvas.TBrush, 然后用这个ExtCreatePen,参数可以从Canvas.Pen中复制过来
dwPenStyle中一定要有PS_GEOMETRIC, 如: dwPenStyle := PS_GEOMETRIC or ps_Solid
LogBrush指向Canvas.Brush.Handle
将创建好的HPen赋值给Canvas.Pen.Handle;