1 2 3 4 5 6 7 8 9 10 11
|
case WM_INITDIALOG:
{
HFONT compFont =(HFONT)GetStockObject(DEFAULT_GUI_FONT);
char *myStr = "Hello";
CreateWindowA("COMBOBOX", NULL, WS_CHILD | WS_VISIBLE | CBS_DROPDOWN,
50, 55, 50, 30, hwnd, (HMENU)IDC_TXT_SIZE, NULL, NULL);
SendDlgItemMessage(hwnd, IDC_TXT_SIZE, WM_SETFONT, (WPARAM)compFont, 0);
SendDlgItemMessage(hwnd, IDC_TXT_SIZE, CB_ADDSTRING, 0, (LPARAM)myStr);
}
|