Solved

How to gray out String in CComboBox

Posted on 2002-07-24
6
271 Views
Last Modified: 2013-11-20
I use AddString to add particular strings to the edit box of a combobox and now i want to gray out particular strings. How would i do this?
0
Comment
Question by:fatassrat
  • 2
6 Comments
 
LVL 12

Accepted Solution

by:
migel earned 25 total points
ID: 7175438
Hi!
There are no standrad styles APIs classes for such tasks
but you can derive your own class from CComboBox and use OwnerDraw mechanism to solve your problem.
Do you want also disable combo`s edit field for grayed strings?
0
 

Author Comment

by:fatassrat
ID: 7175476
Yes i want the strings grayed out and disabled
Is there an easier way besides using OwnerDraw?
0
 
LVL 4

Expert Comment

by:mblat
ID: 7175657
no, but here is the link to control that impelements what functionality....

hope it helps...
0
 
LVL 4

Assisted Solution

by:mblat
mblat earned 25 total points
ID: 7175973
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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

920 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

14 Experts available now in Live!

Get 1:1 Help Now