Solved

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

Posted on 1997-12-29
2
395 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 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
repeateFront java challenge 31 92
sum13 challenge 24 90
Fibonacci challenge 11 110
Can not remove SSL certificate on iPhone 6 - iOS10.2 12 259
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

911 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