Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

modifystyle in ccombobox

Posted on 2000-02-24
3
Medium Priority
?
1,041 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

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 …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Loops Section Overview
Suggested Courses

610 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