We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

How to dynamically change a CComboBox from dropdown to dropdown list

KelvinUnit
KelvinUnit asked
on
Medium Priority
1,448 Views
Last Modified: 2013-11-20
How can you change the type of a CComboBox from a dropdown to a dropdownlist after a dialog box has been created? Just changing the window style from CBS_DROPDOWN to CBS_DROPDOWNLIST does not seem to be enough.
Comment
Watch Question

Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Jaime OlivaresSoftware Architect
CERTIFIED EXPERT
Top Expert 2008

Commented:
try to call this method for the ComboBox:
    ModifyStyle(CBS_DROPDOWN, CBS_DROPDOWNLIST, SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER);
and
    ModifyStyle(CBS_DROPDOWNLIST, CBS_DROPDOWN, SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER);
alternatively.
Jaime OlivaresSoftware Architect
CERTIFIED EXPERT
Top Expert 2008

Commented:
Still awaiting for author feedback

Author

Commented:
I intend to ask for this question to be closed and for a refund. Jaime's answer suggests something that I have said does not work in the question and Alex is really just stating the obvious.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.