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 General Discussion » CExtComboBox : problem with SelectString, FindString and SetCurSel Collapse All
Subject Author Date
Nader Mimouni Mar 28, 2007 - 9:42 AM

Hello,

I’m using the CExtComboBox with multicolumn feature. My problem is that when calling any of below function in DoDataExchange() methode: SelectString, FindString and SetCurSel, the value returned is always -1. Even I tried to call SetCurSel(0) but in vain. However, when calling any of those methode in OnInitDialog(), it works normally. Also, it works in both ( DoDataExchange() and OnInitDialog() ) when using the combobox without the multicolumn feature ( only one column ). Is there any other way to make this runing ?

Thanks in advance for your help !

Nader Mimouni Mar 30, 2007 - 12:29 AM

Please ... any comment on this !?

Technical Support Mar 30, 2007 - 12:21 PM

The CWnd::DoDataExchange() method is called by the framework to exchange and validate dialog data. This method should never be called directly. It is called by the UpdateData() member function. So why do you call all the above methods in this method? Would you send us a project that demonstrates the problem.

Nader Mimouni Mar 31, 2007 - 1:30 AM

Thx for your reply.
In fact, I never called CWnd::DoDataExchange() directly. In my program, dialog data are accessed by many way not only from the same dialog or the same thread. Also, in my code, I only interface data not control to minimize possible change of code when eventually changes occurre on the user interface. So it’s more simple to reflect data change on dialog control from the method CWnd::DoDataExchange(). It’s why I’m trying to use methods like SelectString, FindString and SetCurSel in that method.
I will send you a sample project that demonstrates the poblem in few days.

Technical Support Apr 2, 2007 - 9:11 AM

You can send it to support@prof-uis.com