|
case WM_CREATE:
CreateWindow(TEXT("Combo Box"),TEXT(""), WS_VSCROLL | WS_BORDER | WS_VISIBLE | WS_CHILD,
100, 100, 205, 100, hWnd, (HMENU)IDC_ComBox1, g_hInst, NULL);
// Add items to combobox.
for (i = 0; i < 20; i++)
{
// Since we're owner draw, we don't pass a string
wsprintf (szOut, TEXT ("Item %d"), i);
SendDlgItemMessage (hWnd, IDC_ComBox1, CB_ADDSTRING, 0, (LPARAM)szOut);
}
// Set initial selection.
SendDlgItemMessage (hWnd, IDC_ComBox1, CB_SETCURSEL, 0, 0);
这样在一个Hello world 工程里头创建一个Combo box 为什么不显示了?还缺什么步骤么?
|
|