?
Solved

modifystyle in ccombobox

Posted on 2000-02-24
3
Medium Priority
?
997 Views
Last Modified: 2013-11-20
At run time I want to change the ccombobox style from CBS_DROPDOWNLIST to CBS_DROPDOWN. I couldn't get it. Can anybody try it ang get?
Please....

Thanks
bhaskar
0
Comment
Question by:Bhaskar_Y
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
RONSLOW earned 15 total points
ID: 2553805
This is not possible .. the style is set at creation time and cannot be changed (attempting to do so has no effect).

But you can cheat

see:
http://www.codeguru.com/combobox/combo_dropdown_dropdownlist.shtml

which does the same thing (sorta) by making the edit-box readonly

and also:
http://www.codeguru.com/combobox/SwitchCombo.shtml

which emulates an editable combo by creating an edit box over it (sneaky).

The other solution is to have BOTH types of control present at the same location (update both together when editing the contents) and make one or the other visible depending on what you want.
0
 

Author Comment

by:Bhaskar_Y
ID: 2553818
Then what is the purpoes of Modifystyle()


Bhaskar
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 2553933
Some styles (most) CAN be modified at run time.  But some (unfortunately) cannot.  That's just the way Windows is.
0

Featured Post

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question