Click here to Skip to main content
15,908,776 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralALT key state after ModifyStyle, DoModal Pin
Vancouver31-Dec-04 8:16
Vancouver31-Dec-04 8:16 
GeneralRe: ALT key state after ModifyStyle, DoModal Pin
Neville Franks1-Jan-05 9:39
Neville Franks1-Jan-05 9:39 
GeneralRe: ALT key state after ModifyStyle, DoModal Pin
Vancouver1-Jan-05 13:18
Vancouver1-Jan-05 13:18 
GeneralRe: ALT key state after ModifyStyle, DoModal Pin
Neville Franks1-Jan-05 18:05
Neville Franks1-Jan-05 18:05 
GeneralRe: ALT key state after ModifyStyle, DoModal Pin
Vancouver1-Jan-05 18:58
Vancouver1-Jan-05 18:58 
GeneralRichEdit Bolding Pin
merkit31-Dec-04 5:23
merkit31-Dec-04 5:23 
GeneralRe: RichEdit Bolding Pin
merkit1-Jan-05 5:47
merkit1-Jan-05 5:47 
GeneralCStatic/PreSubclassWindow/WS_VSCROLL Pin
marchaasi7030-Dec-04 22:54
marchaasi7030-Dec-04 22:54 
GeneralFiles in a folder Pin
Imtiaz Murtaza30-Dec-04 22:41
Imtiaz Murtaza30-Dec-04 22:41 
GeneralRe: Files in a folder Pin
ThatsAlok31-Dec-04 1:11
ThatsAlok31-Dec-04 1:11 
GeneralRe: Files in a folder Pin
Archer28231-Dec-04 4:38
Archer28231-Dec-04 4:38 
GeneralRe: Files in a folder Pin
toxcct31-Dec-04 4:46
toxcct31-Dec-04 4:46 
GeneralRe: Files in a folder Pin
Gary R. Wheeler1-Jan-05 3:32
Gary R. Wheeler1-Jan-05 3:32 
GeneralRe: Files in a folder Pin
nm_1141-Jan-05 7:58
nm_1141-Jan-05 7:58 
GeneralRe: Files in a folder Pin
Archer2821-Jan-05 14:11
Archer2821-Jan-05 14:11 
GeneralRe: Files in a folder Pin
Gary R. Wheeler2-Jan-05 0:57
Gary R. Wheeler2-Jan-05 0:57 
GeneralTitleless dialog Pin
LiYS30-Dec-04 20:54
LiYS30-Dec-04 20:54 
GeneralRe: Titleless dialog Pin
Michael Dunn31-Dec-04 6:19
sitebuilderMichael Dunn31-Dec-04 6:19 
GeneralRe: Titleless dialog Pin
LiYS31-Dec-04 15:56
LiYS31-Dec-04 15:56 
QuestionMeaning of error code: 800a0030? Pin
Franz Klein30-Dec-04 20:41
Franz Klein30-Dec-04 20:41 
AnswerRe: Meaning of error code: 800a0030? Pin
PJ Arends30-Dec-04 21:05
professionalPJ Arends30-Dec-04 21:05 
AnswerRe: Meaning of error code: 800a0030? Pin
Michael P Butler30-Dec-04 23:34
Michael P Butler30-Dec-04 23:34 
GeneralRe: Meaning of error code: 800a0030? Pin
Franz Klein2-Jan-05 23:01
Franz Klein2-Jan-05 23:01 
GeneralSet font and color for text on dialog, please help! Pin
nguyenhoang30-Dec-04 19:57
nguyenhoang30-Dec-04 19:57 
GeneralRe: Set font and color for text on dialog, please help! Pin
V.30-Dec-04 21:24
professionalV.30-Dec-04 21:24 
Handle the ON_WM_CTLCOLOR() message
like this
HBRUSH CWFSEC2MailerTestDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor){<br />
	HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);<br />
	CBrush *brush;<br />
	brush = NULL;<br />
	// TODO:  Change any attributes of the DC here<br />
	CWnd* pStaticWnd = (CWnd*)GetDlgItem(IDC_STATIC_STATUS);<br />
	if(pWnd == pStaticWnd){<br />
		pDC->SetTextColor(RGB(0, 0, 255));<br />
	}										//end if<br />
	pStaticWnd = (CWnd*)GetDlgItem(IDC_STATIC_INFO_DOC);<br />
	if(pWnd == pStaticWnd){<br />
		if(lock_docstatus_text){<br />
			pDC->SetTextColor(RGB(0, 100, 200));<br />
		}									//end if<br />
		else{<br />
			pDC->SetTextColor(RGB(0, 0, 255));<br />
		}									//end else<br />
	}										//end if<br />
	pStaticWnd = (CWnd*)GetDlgItem(IDC_STATIC_INFO_SEND);<br />
	if(pWnd == pStaticWnd){<br />
		if(lock_sendstatus_text){<br />
			pDC->SetTextColor(RGB(0, 100, 200));<br />
		}									//end if<br />
		else{<br />
			pDC->SetTextColor(RGB(0, 0, 255));<br />
		}									//end else<br />
	}										//end if<br />
	// TODO:  Return a different brush if the default is not desired<br />
	return hbr;<br />
}											//end function OnCtlColor<br />


more info you can find on msdn I think.

good luck.

"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix

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.