Directly from how I set up my tabs with a default font type.
Code:
case WM_INITDIALOG:
{
//LOAD TABS
RECT rect;
OptionsHwnd = hwnd;
//Get the size of the initial window space to work with
GetClientRect(hwnd, &rect);
InitCommonControls();
//Create tabbed window
hwndTab = CreateWindow(WC_TABCONTROL,"",WS_CHILD|WS_VISIBLE,
0,0,rect.right,rect.bottom,hwnd,NULL,
(HINSTANCE)GetWindowLong(hwnd,GWL_HINSTANCE),NULL);
//Set up tabs
tcitem.mask = TCIF_TEXT;
tcitem.iImage = -1;
//Create tabs
tcitem.pszText = "Startup"; tabctrl[0] = TabCtrl_InsertItem(hwndTab, 0, &tcitem);
tcitem.pszText = "Run Time"; tabctrl[1]= TabCtrl_InsertItem(hwndTab, 1, &tcitem);
//Change tab font
SendMessage (hwndTab,WM_SETFONT,(WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
You can use this snippet to change the font how you see fit.
Code:
// create the font
LOGFONT lf;
lf.lfItalic = 0;
lf.lfStrikeOut = 0;
lf.lfUnderline = 0;
lf.lfQuality = 255;
int ptSize = 11; // point size
HDC hDC = GetDC (NULL);
HFONT st_hEditFont;
lf.lfHeight = -MulDiv(ptSize, GetDeviceCaps (hDC, LOGPIXELSY), 72);
ReleaseDC (NULL, hDC);
lstrcpy (lf.lfFaceName, "Courier New"); // font name
st_hEditFont = CreateFontIndirect (&lf);
SendDlgItemMessage (hwnd, ID_EDIT_BOX, WM_SETFONT, (WPARAM) st_hEditFont, 0);