hello! im new to these forums and since im coding the win32 api i stumble upon different problems, i hope there are some ppl who has some knowledge about the win32 api. well, on with the first problem i have:
i guess its just a flag i need to set in CreateWindow(...) to be able to edit the text inside a combobox. let's say i want to choose between predefined integer values and then if i want some obscure number i want to be able to write that into the combobox and use that instead of the predefs. i've gone through MSDN and search on google but could not find anything. maybe i just have a bad day :/
A combobox has an edit and list contol combined. You need to create it with the correct style and then access the edit control part and talk to that using standard edit control messages.
Are you using the MFC or just doing direct using messages?
Im just doing direct with messages in C++, no MFC.
I've tried the CBS_DROPDOWNLIST flag, but am still not able to edit anything.
These flags wont work atleast: CBS_OEMCONVERT|CBS_DROPDOWNLIST|LBS_COMBOBOX|LBS_HASSTRINGS
i found the solution. I used CBS_DROPDOWNLIST instead of CBS_DROPDOWN.
it was the flag that was wrong.
quote from FunctionX.com: "The drop down version has another characteristic: it allows the user to click the edit part of the control and start typing." "In some cases, you may want the user to _only_ be able to select an item in the list without typing it. In this case, the combo box provides the CBS_DROPDOWNLIST style."