HBRUSH to RGB value
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