Roger Allen
June 29th, 1999, 04:40 AM
Hi All,
I recently had a bug associated with a sorted Drop list ComboBox. I added the data to the box and also called SetItemData(index, value) on each of the items added. Reading back the values directly after the insert shows everything worked ok. But after leaving the routine that initialised the control, the ComboBox sorts its content and corrupts the SetItemData() values for each of the entries that are moved (the value gets set to 0). Is this a bug in the MFC/Combo box code ? If you switch off the sort in the properties, the problem does not persist, which is the solution I am using in the short term.
Any ideas on how to solve this problem ?
Thanks
Roger Allen
I recently had a bug associated with a sorted Drop list ComboBox. I added the data to the box and also called SetItemData(index, value) on each of the items added. Reading back the values directly after the insert shows everything worked ok. But after leaving the routine that initialised the control, the ComboBox sorts its content and corrupts the SetItemData() values for each of the entries that are moved (the value gets set to 0). Is this a bug in the MFC/Combo box code ? If you switch off the sort in the properties, the problem does not persist, which is the solution I am using in the short term.
Any ideas on how to solve this problem ?
Thanks
Roger Allen