Click here to Skip to main content
15,901,373 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: wizard finish button and message box Pin
David Crow12-Jun-07 4:45
David Crow12-Jun-07 4:45 
AnswerRe: wizard finish button and message box Pin
misha_grewal12-Jun-07 4:54
misha_grewal12-Jun-07 4:54 
QuestionVS2003 for loop bug? Pin
mcsherry12-Jun-07 2:58
mcsherry12-Jun-07 2:58 
AnswerRe: VS2003 for loop bug? Pin
mcsherry12-Jun-07 3:03
mcsherry12-Jun-07 3:03 
GeneralRe: VS2003 for loop bug? Pin
Mark Salsbery12-Jun-07 6:59
Mark Salsbery12-Jun-07 6:59 
GeneralRe: VS2003 for loop bug? Pin
S Douglas12-Jun-07 20:23
professionalS Douglas12-Jun-07 20:23 
AnswerRe: VS2003 for loop bug? Pin
_AnsHUMAN_ 12-Jun-07 3:05
_AnsHUMAN_ 12-Jun-07 3:05 
AnswerRe: VS2003 for loop bug? Pin
CPallini12-Jun-07 3:08
mveCPallini12-Jun-07 3:08 
AnswerRe: VS2003 for loop bug? Pin
Matthew Faithfull12-Jun-07 3:11
Matthew Faithfull12-Jun-07 3:11 
AnswerRe: VS2003 for loop bug? Pin
mcsherry12-Jun-07 3:22
mcsherry12-Jun-07 3:22 
GeneralRe: VS2003 for loop bug? Pin
BadKarma12-Jun-07 4:21
BadKarma12-Jun-07 4:21 
AnswerRe: VS2003 for loop bug? Pin
vijay_aroli12-Jun-07 3:33
vijay_aroli12-Jun-07 3:33 
AnswerRe: VS2003 for loop bug? Pin
Michael Dunn12-Jun-07 6:21
sitebuilderMichael Dunn12-Jun-07 6:21 
GeneralRe: VS2003 for loop bug? Pin
Mark Salsbery12-Jun-07 7:02
Mark Salsbery12-Jun-07 7:02 
QuestionHow to detect device Type Pin
VC_RYK12-Jun-07 2:52
VC_RYK12-Jun-07 2:52 
AnswerRe: How to detect device Type Pin
act_x13-Jun-07 6:29
act_x13-Jun-07 6:29 
QuestionChange the color of static control Pin
TobetheWinner12-Jun-07 2:47
TobetheWinner12-Jun-07 2:47 
AnswerRe: Change the color of static control Pin
Hamid_RT12-Jun-07 3:13
Hamid_RT12-Jun-07 3:13 
QuestionChange the color of static control Pin
TobetheWinner12-Jun-07 3:50
TobetheWinner12-Jun-07 3:50 
AnswerRe: Change the color of static control Pin
Hamid_RT12-Jun-07 4:00
Hamid_RT12-Jun-07 4:00 
GeneralRe: Change the color of static control Pin
David Crow12-Jun-07 4:15
David Crow12-Jun-07 4:15 
GeneralRe: Change the color of static control Pin
Hamid_RT12-Jun-07 4:22
Hamid_RT12-Jun-07 4:22 
AnswerRe: Change the color of static control Pin
Max Santos12-Jun-07 6:28
Max Santos12-Jun-07 6:28 
Hello

Use WinProc or PreTranslateMessage to catch the message WM_CTLCOLORSTATIC
and compare the control id with the id that you give to your static.

And then is just the same as if you use the designer.

Something like this:

BOOL CYourDialog::PreTranslateMessage(MSG* pMsg) <br />
{<br />
	if(pMsg->message == WM_KEYDOWN && pMsg->wParam==VK_RETURN)<br />
	{<br />
		if(IsWindow(m_YourStatic.m_hWnd))<br />
		{<br />
			if(pMsg->hwnd==m_YourStatic.m_hWnd)<br />
			{<br />
				DoSomething();<br />
			}<br />
		}<br />
	}<br />
}






QuestionStop Closing the main Dialog when a child Dailog is open? [modified] Pin
granshah @ eVisionISF12-Jun-07 2:40
granshah @ eVisionISF12-Jun-07 2:40 
QuestionRe: Need to know a method? Pin
David Crow12-Jun-07 2:41
David Crow12-Jun-07 2:41 

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.