How can I extract the color from a solid color GDI brush?

1 · Raymond Chen · Aug. 2, 2019, 2:15 p.m.
Suppose you have a GDI HBRUSH and you suspect that it is a solid color brush. How can you confirm this suspicion and, if true, get the underlying color? You can ask the Get­Object function to peek inside the brush. COLORREF GetBrushColor(HBRUSH brush) { LOGBRUSH lbr; The post How can I extract the color from a solid color GDI brush? appeared first on The Old New Thing....