x4u
asked on
Accessing a MFC combo box
Hi,
1. how do I get the pointer/reference of a combo box object that I added in the MS VS 2003 GUI editor and that has got the ID "IDC_COMBO1"?
2. how do put some static strings into it's list?
3. how do I restrict the combo box to allow only the strings from the list (no manual typing)?
BTW, I'm a absolutely new to MFC and win32 but have got some C++ expirience.
Thank you for efforts.
1. how do I get the pointer/reference of a combo box object that I added in the MS VS 2003 GUI editor and that has got the ID "IDC_COMBO1"?
2. how do put some static strings into it's list?
3. how do I restrict the combo box to allow only the strings from the list (no manual typing)?
BTW, I'm a absolutely new to MFC and win32 but have got some C++ expirience.
Thank you for efforts.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ahh, cool thanks. I would never have figuered this out myself. ;-)
ASKER
But the drop down list height seems to be zero, it is appears only a thick black line. I can browse the items with the cursor keys but how do I resize the list box height to a reasonable height? Can I set set it to resize automatically somehow?
BTW, I get is the same behaviour with AddString and when I type the strings into data properties field.