GetObject函数返回一个LOGBRUSH结构体,包含了COLORREF结构。
LOGBRUSH lgbrush;
COLORREF color;
GetObject((HBRUSH)GetStockObject(WHITE_BRUSH), sizeof(LOGBRUSH), &lgbrush);
color=lgbrush.lbColor;
参考链接
GetObject function https://msdn.microsoft.com/en-us/library/windows/desktop/dd144904(v=vs.85).aspx
LOGBRUSH structure https://msdn.microsoft.com/en-us/library/windows/desktop/dd145035(v=vs.85).aspx
转载于:https://www.cnblogs.com/lkpp/p/HBRUSH_RGB.html
相关资源:JAVA上百实例源码以及开源项目