Click here to Skip to main content
15,905,912 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Edit controls Pin
Waldermort12-Nov-06 23:40
Waldermort12-Nov-06 23:40 
GeneralRe: Edit controls Pin
Christian Graus12-Nov-06 23:43
protectorChristian Graus12-Nov-06 23:43 
GeneralRe: Edit controls Pin
Waldermort13-Nov-06 0:17
Waldermort13-Nov-06 0:17 
AnswerRe: Edit controls Pin
Viorel.13-Nov-06 0:08
Viorel.13-Nov-06 0:08 
GeneralRe: Edit controls Pin
Waldermort13-Nov-06 0:11
Waldermort13-Nov-06 0:11 
QuestionProblem in changing background color of dialog box Pin
Cyber Friend12-Nov-06 22:36
Cyber Friend12-Nov-06 22:36 
AnswerRe: Problem in changing background color of dialog box Pin
Waldermort12-Nov-06 22:56
Waldermort12-Nov-06 22:56 
AnswerRe: Problem in changing background color of dialog box Pin
_AnsHUMAN_ 12-Nov-06 22:58
_AnsHUMAN_ 12-Nov-06 22:58 
Cyber Friend wrote:
How can I avoid Edit boxes and Combo boxes having the same background color as dialog, so that they can be shown in typical white color.

HBRUSH CMyDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
	HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);

	// TODO:  Change any attributes of the DC here
	HBRUSH hbr1=CreateSolidBrush (RGB(0,255,0));   
	if(pWnd->GetDlgCtrlID ()==IDC_EDIT1)
		return hbr;  // return old hbr if window is an edit box.
	else 
		return hbr1;// else return the new hbr.
	// TODO:  Return a different brush if the default is not desired
	return hbr1;
}

I hope this helps.

Somethings seem HARD to do, until we know how to do them.
Wink | ;-) _AnShUmAn_

GeneralRe: Problem in changing background color of dialog box Pin
Cyber Friend13-Nov-06 0:45
Cyber Friend13-Nov-06 0:45 
GeneralRe: Problem in changing background color of dialog box Pin
_AnsHUMAN_ 13-Nov-06 2:20
_AnsHUMAN_ 13-Nov-06 2:20 
GeneralRe: Problem in changing background color of dialog box Pin
Cyber Friend13-Nov-06 3:29
Cyber Friend13-Nov-06 3:29 
GeneralRe: Problem in changing background color of dialog box Pin
Hamid_RT13-Nov-06 5:31
Hamid_RT13-Nov-06 5:31 
QuestionMFC Pin
satyanarayanarao12-Nov-06 21:53
satyanarayanarao12-Nov-06 21:53 
AnswerRe: MFC Pin
Rage12-Nov-06 21:58
professionalRage12-Nov-06 21:58 
GeneralRe: MFC Pin
satyanarayanarao12-Nov-06 22:01
satyanarayanarao12-Nov-06 22:01 
AnswerRe: MFC Pin
Cedric Moonen12-Nov-06 22:09
Cedric Moonen12-Nov-06 22:09 
QuestionAccessing private Member Pin
baerten12-Nov-06 21:17
baerten12-Nov-06 21:17 
AnswerRe: Accessing private Member Pin
Aqueel12-Nov-06 21:45
Aqueel12-Nov-06 21:45 
GeneralRe: Accessing private Member Pin
David Crow13-Nov-06 3:56
David Crow13-Nov-06 3:56 
AnswerRe: Accessing private Member Pin
Christian Graus12-Nov-06 21:48
protectorChristian Graus12-Nov-06 21:48 
GeneralRe: Accessing private Member Pin
Aqueel12-Nov-06 22:04
Aqueel12-Nov-06 22:04 
GeneralRe: Accessing private Member Pin
baerten12-Nov-06 22:22
baerten12-Nov-06 22:22 
GeneralRe: Accessing private Member Pin
Aqueel13-Nov-06 2:26
Aqueel13-Nov-06 2:26 
QuestionReduce colors of bitmap files Pin
includeh1012-Nov-06 20:51
includeh1012-Nov-06 20:51 
AnswerRe: Reduce colors of bitmap files Pin
Christian Graus12-Nov-06 21:47
protectorChristian Graus12-Nov-06 21:47 

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.