Combobox in win32
-
HI , I struck in below scenario. please put some light on it. I have one combobox and edit control in win32 application. 1. i keep on updating my combobox with new data, but while doing that, previous data in combobox missing. 2. when i choose one data item in combobox corresponding value should be updated in edit box. Thanks, Goutham.
-
HI , I struck in below scenario. please put some light on it. I have one combobox and edit control in win32 application. 1. i keep on updating my combobox with new data, but while doing that, previous data in combobox missing. 2. when i choose one data item in combobox corresponding value should be updated in edit box. Thanks, Goutham.
Gday. 1. How are you updating the combo box? Please show some code 2. You simply handle CBN_SELENDOK notification messages, when you get one - you ask for the currently selected string then send it to the edit-control. Note: Selecting an existing item and typing an item into the edit box of the combo-box control send different messages. If you can't(shouldn't) type into the edit box, you should probably be using a list control instead. CBN_SELENDOK[^]
-
HI , I struck in below scenario. please put some light on it. I have one combobox and edit control in win32 application. 1. i keep on updating my combobox with new data, but while doing that, previous data in combobox missing. 2. when i choose one data item in combobox corresponding value should be updated in edit box. Thanks, Goutham.
How are you adding new data? Please post relevant code. In Win32, you have to send the CB_ADDSTRING[^] message to the combo box to add a new string to the list. Or you can use the very convenient ComboBox_AddString[^] macro for this. When an item is selected, the CBN_SELCHANGE[^] notification message is sent. You need to handle that in your code. You will need to send CB_GETCURSEL[^] or use the ComboBox_GetCurSel[^] macro to get the new selection index. To get the text string, send CB_GETLBTEXT[^] or use the ComboBox_GetLBText[^] macro.
«_Superman_» _I love work. It gives me something to do between weekends.