That's because you created a font with the size 0.
For example if you want the size in pixels (10 here):
Code:
hFont = CreateFont(10, 0, 0, 0, FW_BOLD, 0, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY, DEFAULT_PITCH, "MS Sans Serif");
SendDlgItemMessage(hwndDlg, IDC_STATIC_PRG, WM_SETFONT, (WPARAM)hFont, (LPARAM)TRUE);
And in points:
Code:
hFont = CreateFont(-MulDiv(10, GetDeviceCaps(hDC, LOGPIXELSY), 72), 0, 0, 0, FW_BOLD, 0,
0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, "MS Sans Serif");
SendDlgItemMessage(hwndDlg, IDC_STATIC_PRG, WM_SETFONT, (WPARAM)hFont, (LPARAM)TRUE);