GetSysColorBrush constant for background color of a tab control?

707 Views Asked by At

I'm using the following APIs to draw a small stock icon on the background of my tab control window (with class name SysTabControl32):

DrawIconEx(hDC, rcIcon.left, rcIcon.top,
    hIconSmInfo, rcIcon.Width(), rcIcon.Height(), NULL, 
    ::GetSysColorBrush(COLOR_WINDOW),
    DI_NORMAL);

But it doesn't seem to draw consistent background. Let me show.

On a themed Windows 7:

enter image description here

It draws it correctly:

enter image description here

But if I remove themes:

enter image description here

It draws this white background:

enter image description here

So what constant do I need to use for GetSysColorBrush?

0

There are 0 best solutions below