Solved

modifystyle in ccombobox

Posted on 2000-02-24
3
903 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
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
RONSLOW earned 5 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Perl Awk Need Help 3 109
windows 10 how make picture as desktop background 2 58
matchUp  challenge 9 94
Path of Workbook 3 61
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
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.

867 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now