Click to See Complete Forum and Search --> : load combo list from INI files


Prince Abaddon
July 11th, 2004, 04:05 PM
Ok so I made a GUI program which will read an INI file for account and password values. The problem is, I have no idea how to make a combo box which will read the sections of the INI file and load the values into the dropdown list. I can hardcode values into the list, but I can't get it to load the values from the INI files.

I have this function which creates the combo box:

HWND CreateComboEx(char* tempText, int x, int y, int width, int height,
int identifier, HWND hwnd){
HWND hComboTemp;
hComboTemp = CreateWindowEx(WS_EX_CLIENTEDGE, "COMBOBOX", tempText,
WS_CHILD | WS_VISIBLE | WS_VSCROLL | CBS_DROPDOWN , // | CBS_DROPDOWNLIST,
x, y, width, height, hwnd, (HMENU)identifier, hInstance, NULL);
SetDefaultFont(identifier, hwnd);
return hComboTemp;
}


I have to use this syntax to put values into the box:

SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)nameText);


Any help would be appreciated. Thanx in advanced ;)

PS: if you haven't noticed already, it's in Visual C++ 6.0