Avatar of KelvinUnit
KelvinUnit

asked on 

How to dynamically change a CComboBox from dropdown to dropdown list

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.
System Programming

Avatar of undefined
Last Comment
KelvinUnit
ASKER CERTIFIED SOLUTION
Avatar of AlexFM
AlexFM

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
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.
Still awaiting for author feedback
Avatar of KelvinUnit
KelvinUnit

ASKER

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.
System Programming
System Programming

Kernel and system programming is the process of creating the software necessary for a computer or device to function and operate other programs. Some operating systems (such as Microsoft Windows) are proprietary, but others, such as the various Linux distributions, are open source.

41K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo