今天看了MSDN for VS 2008对LOGPEN结构体,感觉有点奇怪:
typedef struct tagLOGPEN { /* lgpn */
UINT lopnStyle;
POINT lopnWidth;
COLORREF lopnColor;
} LOGPEN;
不知大家注意到没有笔宽MFC使用了POINT类型,我很奇怪它为何不用UINT类型,更有意思的是在
Remarks:
The y value in the POINT structure for the lopnWidth member is not used.
既然y值不用,为何要使用POINT结构,难道是向上兼容吗?
同时我感觉这个LOGPEN结构体和API函数:
HPEN CreatePen( int fnPenStyle, // pen style int nWidth, // pen width COLORREF crColor // pen color );
也无法对应起来。不过貌似这个结构体是和CPen::CreatePenIndirect 函数对应的。不过这个结构体这样设计我总感到很疑惑。
前无古人,后无来者