How to set the initially selected item in a ComboBoxEx control? 
Author Message
 How to set the initially selected item in a ComboBoxEx control?

How do you set the initially selected item in a CComboBoxEx control with
the droplist property set? The drop list has images and text. Thanks in
advance.

N. Demos



Sat, 25 Oct 2003 06:21:49 GMT  
 How to set the initially selected item in a ComboBoxEx control?
Call SetCurSel, passing in the required item index.

Alternatively, you can create an int member variable associated with the
combo box in Class Wizard

Either way, you can use FindStringExact to obtain the index of the item
you're after.


Quote:

> How do you set the initially selected item in a CComboBoxEx control with
> the droplist property set? The drop list has images and text. Thanks in
> advance.

> N. Demos



Sat, 25 Oct 2003 08:33:05 GMT  
 How to set the initially selected item in a ComboBoxEx control?
Hello Yael,
This is what I was looking for. Thanks.

Regards,
N. Demos

Quote:

> Call SetCurSel, passing in the required item index.

> Alternatively, you can create an int member variable associated with the
> combo box in Class Wizard

> Either way, you can use FindStringExact to obtain the index of the item
> you're after.



> > How do you set the initially selected item in a CComboBoxEx control with
> > the droplist property set? The drop list has images and text. Thanks in
> > advance.

> > N. Demos



Sun, 26 Oct 2003 00:39:29 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How do you set the selected item....

2. Setting the selected item in a ListView

3. how to set item of CListCtrl be selected

4. How do I manually set selected items in a CListCtrl

5. How to set the selected item in a listbox to the top

6. ComboboxEx Select and buttons disappear?

7. selected items on Form controls ?

8. how to get the index of selected item in a list control

9. Selecting an item in a List View control

10. Tree control on DialogBox , How to get the selected item

11. How to: select a item in MS DataList Control

12. Using list control how to display a selected item as checked and grayed

 

 
Powered by phpBB® Forum Software