Home > Software engineering >  C, how to add the content of the fixed in the combo box
C, how to add the content of the fixed in the combo box

Time:09-27

ComboBox BTOUSBhWnd=CreateWindow (" ", "",
WS_CHILD | WS_VISIBLE | CBS_DROPDOWN | WS_VSCROLL,
90, 78, 120, 36,
HWnd, HMENU ID_BLUETOOTH_USB,
T_hInstance, NULL);
SendMessage (BTOUSBhWnd, CB_ADDSTRING, 0, (LPARAM) "BlueTooth");
SendMessage (BTOUSBhWnd, CB_ADDSTRING, 0, (LPARAM) "USB");


This is part of the code, I'd like to add two options, one is the BlueTooth, one is the USB
But the t add

And one more thing is my computer cannot use VS, not directly add a combo box and set

CodePudding user response:

CB_ADDSTRING

CodePudding user response:

Create BTOUSBhWnd without success?

CodePudding user response:

Add is added, only you to set the height of the combo box is too low, set the height of high such as 100
90, 78, 120, 36,==="90, 78, 120, 100

CodePudding user response:

CComboBox: : SetItemHeight
Int SetItemHeight (int nIndex, UINT cyItemHeight);