Click here to Skip to main content
15,894,017 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
AnswerRe: Need to know a method? Pin
Mark Salsbery12-Jun-07 7:08
Mark Salsbery12-Jun-07 7:08 
QuestionRe: Need to know a method? Pin
David Crow12-Jun-07 7:11
David Crow12-Jun-07 7:11 
AnswerRe: Need to know a method? Pin
Mark Salsbery12-Jun-07 7:17
Mark Salsbery12-Jun-07 7:17 
GeneralRe: Need to know a method? Pin
David Crow12-Jun-07 7:26
David Crow12-Jun-07 7:26 
GeneralRe: Need to know a method? Pin
Mark Salsbery12-Jun-07 7:29
Mark Salsbery12-Jun-07 7:29 
AnswerRe: Stop Closing the main Dialog when a child Dailog is open? Pin
Hamid_RT12-Jun-07 3:15
Hamid_RT12-Jun-07 3:15 
AnswerRe: Stop Closing the main Dialog when a child Dailog is open? Pin
Nelek12-Jun-07 20:09
protectorNelek12-Jun-07 20:09 
Question Has known some html source code,can i know the element it correspond to? Pin
gzcjun12-Jun-07 2:15
gzcjun12-Jun-07 2:15 
QuestionHow can simulate button clicking in multiple threads environment&#65311; Pin
gzcjun12-Jun-07 2:11
gzcjun12-Jun-07 2:11 
QuestionConnection points for Chat server using ATL/COM Pin
Raj Prathap12-Jun-07 2:04
Raj Prathap12-Jun-07 2:04 
AnswerRe: Connection points for Chat server using ATL/COM Pin
led mike12-Jun-07 4:30
led mike12-Jun-07 4:30 
GeneralRe: Connection points for Chat server using ATL/COM Pin
Mark Salsbery12-Jun-07 7:09
Mark Salsbery12-Jun-07 7:09 
GeneralRe: Connection points for Chat server using ATL/COM Pin
led mike12-Jun-07 11:08
led mike12-Jun-07 11:08 
GeneralRe: Connection points for Chat server using ATL/COM Pin
led mike12-Jun-07 11:20
led mike12-Jun-07 11:20 
GeneralRe: Connection points for Chat server using ATL/COM Pin
Mark Salsbery12-Jun-07 13:44
Mark Salsbery12-Jun-07 13:44 

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.