As title says, either gets printed in black either it doesn't get printed at all.
Here's how i'm creating the TabControl
RECT client_rect;
GetClientRect(hwnd, &client_rect);
TabControl = CreateWindowEx(WS_EX_COMPOSITED, WC_TABCONTROL, L"", WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN,
10, 10, client_rect.right - client_rect.left - 20,
client_rect.bottom - client_rect.top - 20, hwnd, (HMENU)110, GetModuleHandle(NULL), NULL);
TCITEM tab_info;
memset(&tab_info, 0, sizeof(tab_info));
tab_info.mask = TCIF_TEXT;
tab_info.pszText = L"Encoder";
tab_info.cchTextMax = 5;
SendMessage(TabControl, TCM_INSERTITEM, 0, (LPARAM)&tab_info);
tab_info.pszText = L"Decoder";
SendMessage(TabControl, TCM_INSERTITEM, 1, (LPARAM)&tab_info);
tab_info.pszText = L"Info Tab ";
SendMessage(TabControl, TCM_INSERTITEM, 2, (LPARAM)&tab_info);
RECT tab_rectangle;
GetClientRect(TabControl, &tab_rectangle);
SendMessage(TabControl, TCM_ADJUSTRECT, FALSE, (LPARAM)&tab_rectangle);
DefaultTabProc = (WNDPROC)SetWindowLongPtr(TabControl, GWL_WNDPROC, (LONG_PTR)TabProc);
I tried to create this groupbox in the tabcontrol's parent window, but gets printed in black
MainGroupBox = CreateWindowEx(NULL, L"BUTTON", L"", BS_GROUPBOX | WS_CHILD | WS_GROUP | WS_VISIBLE, 20, 50, 342, 180, TabControl,
(HMENU)NULL, GetModuleHandle(NULL), NULL);
If I try instead to create it inside the subclassed TabProc function, it doesn't get printed at all :
case WM_CREATE:
{
MainGroupBox = CreateWindowEx(NULL, L"BUTTON", L"", BS_GROUPBOX | WS_CHILD | WS_GROUP | WS_VISIBLE, 10, 40, 342, 180, hwnd,
(HMENU)NULL, GetModuleHandle(NULL), NULL);
}
The only way to get it printed is to set it as child of the main frame window, which is undesiderable for few circumstances
Thanks in advance for every answer
EDIT : i'm using INITCOMMONCONTROLSEX to create the tabcontrol and compiling for win7