Is it possible to hide particular Items in the MFC Combo Box?
I have a list which contains 5 items ALPHA-0, BETA-1, GAMA-2, DELTA-3, OMEGA-4 stored in the vector
vector<string> mListItems;
CComboBox m_List1;
CComboBox m_List2;
I am using this vector to populate the two combo boxes.
In m_List1 it should populate all the 5 items but in m_List2 it should populate all items but should not show GAMA.
Here index for each is used in the code for each index different business logic is implemented. So I can’t remove the items GAMA from second list.
Please do you have any suggestions to help me with this?
Is it possible to do this?
Combo boxes show whatever items you add in them. If an item was added, it will be displayed.
So if you want to hide some items, you need to remove them from the combo. This can be done through DeleteString from CComboBox.