Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Bad assumption with CExtComboBoxBase CB_SETITEMDATA? Collapse All
Subject Author Date
Jon Ort Jul 16, 2007 - 8:58 AM

It appears from the 2.70 source that the item data set into a combo box is going to be a memory handle. There is no requirement for this to be the case with the base MFC or Windows combo box classes. This creates a problem for us because we use simple indexes on alpha sorted lists as the item data. When the index is zero we get assertions in CExtComboBoxBase::OnCBGetItemData. The work-around for us is to increment and decrement the index before and after it comes out of the combo box but that does complicate the code a bit and requires an extra comment line at every single access to make sure that engineers maintaining the code in the future don’t mess it up.

Was there a particular reason for this?

Thanks
Jon


Technical Support Jul 16, 2007 - 1:19 PM

Would you reproduce the problem in a simple test project and send it to us so we can quickly find out what is wrong?