rt
解决方案 »
- 广州干VC快2两年了,工资5000怎么样,要换么
- 在CHtmlEditView中,如何获得光标之前的元素
- 关于高亮显示工具栏图标
- iocp 能知道有事件发生么,比如有数据到达
- 请问串口通讯协议怎么写呢? 能用C++写而不用C写吗?
- 如何检测内存泄漏?可能是BSTR引起的
- 请问formview的背景色是系统色中的哪个颜色?
- ▁▂▃▄▅在线结贴▅▄▃▂▁listctrl怎么sort
- 在线程函数里调用recvfrom的时候为什么没有阻塞住,而是继续执行下去?
- 我用vb做了一个组件,我想让它返回一个数组,如何定义和返回?
- 字符串转宏定义:字符串如"WM_USER" 要转换成宏 WM_USER ,可以实现吗?
- 你好
// MFC中 CPen的构造函数
CPen(
int nPenStyle,
int nWidth,
COLORREF crColor
);
CPen(
int nPenStyle,
int nWidth,
const LOGBRUSH* pLogBrush,
int nStyleCount = 0,
const DWORD* lpStyle = NULL
);
//nWidth 为线的宽度//CPen::CreatePen函数
BOOL CreatePen(
int nPenStyle,
int nWidth,
COLORREF crColor
);
BOOL CreatePen(
int nPenStyle,
int nWidth,
const LOGBRUSH* pLogBrush,
int nStyleCount = 0,
const DWORD* lpStyle = NULL
);//nWidth为线宽//Win32 API 下HPEN CreatePen(
int fnPenStyle, // pen style
int nWidth, // pen width
COLORREF crColor // pen color
);
//nWidth 为线宽
//API CreatePenIndirect
HPEN CreatePenIndirect(
CONST LOGPEN *lplgpn // style, width, and color
);//LOGPEN定义为
typedef struct tagLOGPEN {
UINT lopnStyle;
POINT lopnWidth;
COLORREF lopnColor;
} LOGPEN, *PLOGPEN; //POINT定义为
typedef struct tagPOINT {
LONG x;
LONG y;
} POINT, *PPOINT; //其中x为线宽, y无用.
//API ExtCreatePen
HPEN ExtCreatePen(
DWORD dwPenStyle, // pen style
DWORD dwWidth, // pen width
CONST LOGBRUSH *lplb, // brush attributes
DWORD dwStyleCount, // length of custom style array
CONST DWORD *lpStyle // custom style array
);//dwWidth为线宽
如果你不会画宽度为1的虚线, 代码就太多了, 我就不帖了..