Solved

modifystyle in ccombobox

Posted on 2000-02-24
3
941 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Add content to output file 4 70
Generic progress indicator 6 118
if loop in java 3 160
sum28 challenge 31 117
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

679 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