Solved

How do I create a ComboBox without having a 3d-look?

Posted on 1997-12-29
2
397 Views
Last Modified: 2013-11-20
I want to create a ComboBox control, which has no border and no 3d-look. I want to create a flat ComboBox which has only the Dropdown push button. I tried modifying style, but it won't work. Could anyone help me?

thanks in advance,
sachin
0
Comment
Question by:sachinm
  • 2
2 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 1313199
Since the CComboBox is already built for you by MFC, and it doesn't give you the option of changing it to a non-3D look, you can't do it that easily.  If it must be done, then the approach is to draw the CComboBox youself.  Use your OnPaint method, get the CRect of the CComboBox, draw it the way you want it, and don't forget to write the text into the box.
0
 
LVL 32

Accepted Solution

by:
jhance earned 100 total points
ID: 1313200
Since the CComboBox is already built for you by MFC, and it doesn't give you the option of changing it to a non-3D look, you can't do it that easily. If it must be done, then the approach is to draw the CComboBox youself. Use your OnPaint method, get the CRect of the CComboBox, draw it the way you want it, and don't forget to write the text into the box.
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

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…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

832 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