You should use the following paint manager’s method to draw background of everything including client and non-client window parts:
virtual bool PaintDockerBkgnd(
bool bClientMapping,
CDC & dc,
CWnd * pWnd,
LPARAM lParam = NULL
);
The
bClientMapping
flag indicates whether the specified device context for painting is a window client/paint device context if set to
true
. If this flag is
false
, then the device context is window device context with zero coordinate system set to the left/top corner of window non-client area.
The themed background does not mean the single color fill. It can be bitmap based or gradient based in different paint managers. It can be different for dialog windows and other windows.
The text color can be retrieved using the following paint manager’s method:
COLORREF GetColor(
int nColorIndex,
CObject * pHelperSrc = NULL,
LPARAM lParam = 0L
) const;
The
nColorIndex
parameter can be the standard color index like
COLOR_BTNTEXT
. It also be the
CExtPaintManager::e_translated_colors_t
enumeration like
CExtPaintManager::CLR_TEXT_OUT
.
The
CExtPaintManager::m_FontNormal
font is recommended for most of controls. You can use the
CExtPaintManager::m_FontBold
font if you need bold text elements.