I am writing a C-based WinAPI program that has a tab control in the client area of the main window. This tab control works fine, except there is some kind of rendering problem on the tabs. The tab headers are rendered in bold, uninstalled font and therefore spend a lot of screen real estate:
Here are the tabs that look like in almost every other application:

I use this code to customize the tab control:
RECT rcClient, rcTool, rcTab;
TCHAR tabTitleTmp[256];
HWND hTool = GetDlgItem(hWnd, IDC_MAIN_TOOL);
GetWindowRect(hTool, &rcTool);
int iToolHeight = rcTool.bottom - rcTool.top;
GetClientRect(hWnd, &rcClient);
HWND hwndTab = CreateWindowEx(NULL, WC_TABCONTROL, NULL, WS_CHILD | WS_CLIPSIBLINGS | WS_VISIBLE,
0, iToolHeight, rcClient.right, rcClient.bottom - iToolHeight, hWnd, (HMENU) IDC_MAIN_TAB,
hInst, NULL);
TCITEM tie;
tie.mask = TCIF_TEXT | TCIF_IMAGE;
tie.iImage = -1;
tie.pszText = tabTitleTmp;
for(int i = 0; i < 8; i++) {
LoadString(hInst, IDC_TAB_GENERAL + i, tabTitleTmp, sizeof(tabTitleTmp) / sizeof(tabTitleTmp[0]));
TabCtrl_InsertItem(hwndTab, i, &tie);
}
Does anyone know a solution to this problem? I haven't found it on Google yet, and I'm starting to think that this might just be a mistake in WinAPI. Thanks for any answers!
: InitCommonControlsEx() , .