Solved

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

Posted on 1997-12-29
2
393 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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Expand LInux Boot partition remotly 3 78
Separate into files by filename 12 66
dog bark java program 15 81
viewing source code from eclipse 13 74
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 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

9 Experts available now in Live!

Get 1:1 Help Now