会比较方便。
因为你用一个DWORD来读一个32位或24位的RGB值,以及用WORD读一个16位的RGB值做位运算
会很方便。
有些东西,可不是第一个人喜欢就变成那个样子的,一定有其原因的。
第一个写这个结构的人就是喜欢BGR的顺序,不喜欢RGB的顺序,有什么办法,人家原意。
RGB关系本来就是并列的,没有什么特殊性,给出了定义后就要服从
MSDN中有说明啊,摘录给你看看:
Platform SDK: Windows GDI
COLORREF
The COLORREF value is used to specify an RGB color.
typedef DWORD COLORREF;
typedef DWORD *LPCOLORREF;
Remarks
When specifying an explicit RGB color, the COLORREF value has the following hexadecimal form:
0x00bbggrr
The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; and the third byte contains a value for blue. The high-order byte must be zero. The maximum value for a single byte is 0xFF.
To create a COLORREF color value, use the RGB macro. To extract the individual values for the red, green, and blue components of a color value, use the GetRValue, GetGValue, and GetBValue macros, respectively.
评论