PDA

View Full Version : Need help with ComboBox



Teamz
March 11th, 2003, 03:24
VC++ WIN32 API

hDlgItem = GetDlgItem(hwnd, IDC_CONFIG_COMBODEVICES);
SendMessage(hDlgItem, CB_ADDSTRING, 0, (LPARAM)"test");

when I click on the Combo box I can't see no items at all

if I use CB_GETCOUNT it returns 1 so the item is actually in the list item

anyone has a suggestion?

Teamz
March 11th, 2003, 05:23
look at the problem , this happen when I click on the combo box

Teamz
March 11th, 2003, 05:25
I used the same code in another application and it shows the items but the arrows to scroll up and down are SO small

does anyone know why I don't get the same results with the same code? and how should i fix this ?

euphoria
March 11th, 2003, 10:01
In the resource editor if you push the downarrow the dropdown list appears and you can define its length.


for (i=0; i<CHARACTER_DATA; i++)
{
if (memcard_info.characters[i] != 0xFF)
SendMessage(GetDlgItem(hDlg, IDC_LIST_CHARACTERS), LB_ADDSTRING, 0, (LPARAM)characters[memcard_info.characters[i]]);
}


You should use something like that to initialize the box.

Teamz
March 11th, 2003, 18:28
DAMMIT i feel SO stupid now lol

i didnt completely read your answer, only the code part, and yes it fixed my problem

I was looking to far for something that easy

thx man :doh: