I created a child window “hwndTab” and set a text on it, by the code below. In some case, I need to give the child window “hwndTab” a color. If I use FillRect with solidbrush color, then the text is covered and can’t been seen. I aslo don’t want to use system.dll and system.drawing.dll to make a transparent background color. In this case, is there any way to color this child window “hwndTab” but the text still can be seen?
win->hwndTab = CreateWindow(WC_STATIC, _T(""), WS_VISIBLE | WS_CHILD,
0, 5, 62, 16, win->hwndReBarForTab, (HMENU)IDC_TOC_TITLE, ghinst, NULL);
SetWindowFont(win->hwndTab, gDefaultGuiFont, FALSE);
win::SetText(win->hwndTab, _T("Book"));
After FillRect with solidbrush color, do ::DrawText(…) or ::ExtTextOut(…). Do not use SetText(…).