Click here to Skip to main content
15,900,472 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Is this the fastest way to access the RGB values of a Pixel ? Pin
Sauro Viti24-Oct-10 2:32
professionalSauro Viti24-Oct-10 2:32 
AnswerRe: Is this the fastest way to access the RGB values of a Pixel ? Pin
Luc Pattyn24-Oct-10 2:44
sitebuilderLuc Pattyn24-Oct-10 2:44 
GeneralRe: Is this the fastest way to access the RGB values of a Pixel ? Pin
inayathussaintoori24-Oct-10 7:53
inayathussaintoori24-Oct-10 7:53 
AnswerRe: Is this the fastest way to access the RGB values of a Pixel ? Pin
Sauro Viti24-Oct-10 21:54
professionalSauro Viti24-Oct-10 21:54 
Questionreplacing the default list box with custom made list box Pin
emmmatty123-Oct-10 18:37
emmmatty123-Oct-10 18:37 
AnswerRe: replacing the default list box with custom made list box Pin
Garth J Lancaster23-Oct-10 18:52
professionalGarth J Lancaster23-Oct-10 18:52 
GeneralRe: replacing the default list box with custom made list box Pin
emmmatty123-Oct-10 22:56
emmmatty123-Oct-10 22:56 
QuestionChange background color of CComboBox [modified] Pin
mesajflaviu23-Oct-10 7:51
mesajflaviu23-Oct-10 7:51 
How can I change the background color of my CComboBox , but only in the edit area , not dropdown list ?
I have something like :
class CStatusCombo : public CComboBox

and here :
HBRUSH CStatusCombo::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) 
{
	HBRUSH hbr = CComboBox::OnCtlColor(pDC, pWnd, nCtlColor);

	// TODO: Change any attributes of the DC here

	// TODO: Return a different brush if the default is not desired

	switch(nCtlColor)
	{
	case CTLCOLOR_LISTBOX:
		pDC->SetTextColor(RGB(0, 255, 0));
		pDC->SetBkColor(RGB(120,120,120));
		return (HBRUSH)(m_pEditBkBrush->GetSafeHandle());
	}

	return hbr;
}

I change background of the list area , not the edit area of the combo ... I would like to change the color of edit area just like the statusbar color ... it could be soemthing like that ?

modified on Saturday, October 23, 2010 2:03 PM

AnswerRe: Change background color of CComboBox Pin
Code-o-mat23-Oct-10 8:37
Code-o-mat23-Oct-10 8:37 
GeneralRe: Change background color of CComboBox Pin
mesajflaviu23-Oct-10 9:19
mesajflaviu23-Oct-10 9:19 
GeneralRe: Change background color of CComboBox Pin
Code-o-mat23-Oct-10 9:24
Code-o-mat23-Oct-10 9:24 
GeneralRe: Change background color of CComboBox Pin
mesajflaviu25-Oct-10 0:52
mesajflaviu25-Oct-10 0:52 
GeneralRe: Change background color of CComboBox Pin
Code-o-mat25-Oct-10 1:13
Code-o-mat25-Oct-10 1:13 
AnswerRe: Change background color of CComboBox Pin
Dennis Dykstra23-Oct-10 11:48
Dennis Dykstra23-Oct-10 11:48 
GeneralRe: Change background color of CComboBox Pin
mesajflaviu25-Oct-10 0:51
mesajflaviu25-Oct-10 0:51 
GeneralRe: Change background color of CComboBox [modified] Pin
Dennis Dykstra25-Oct-10 17:01
Dennis Dykstra25-Oct-10 17:01 
GeneralRe: Change background color of CComboBox Pin
mesajflaviu28-Oct-10 7:37
mesajflaviu28-Oct-10 7:37 
QuestionRegarding Addition of Items in Tree Control by Type. Pin
janaswamy uday23-Oct-10 6:48
janaswamy uday23-Oct-10 6:48 
AnswerRe: Regarding Addition of Items in Tree Control by Type. Pin
Code-o-mat23-Oct-10 7:28
Code-o-mat23-Oct-10 7:28 
GeneralRe: Regarding Addition of Items in Tree Control by Type. Pin
janaswamy uday23-Oct-10 8:54
janaswamy uday23-Oct-10 8:54 
GeneralRe: Regarding Addition of Items in Tree Control by Type. Pin
Chris Losinger23-Oct-10 18:56
professionalChris Losinger23-Oct-10 18:56 
GeneralRe: Regarding Addition of Items in Tree Control by Type. Pin
Richard MacCutchan23-Oct-10 21:40
mveRichard MacCutchan23-Oct-10 21:40 
GeneralRe: Regarding Addition of Items in Tree Control by Type. Pin
janaswamy uday24-Oct-10 5:07
janaswamy uday24-Oct-10 5:07 
QuestionMenu Enabling Pin
Anil Kumar.Arvapalli23-Oct-10 2:53
Anil Kumar.Arvapalli23-Oct-10 2:53 
AnswerRe: Menu Enabling Pin
Maximilien23-Oct-10 3:27
Maximilien23-Oct-10 3:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.