Click here to Skip to main content
15,920,896 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionPSID,PACL Leakage Problem Pin
Akin Ocal30-Jun-07 13:10
Akin Ocal30-Jun-07 13:10 
QuestionHow to post sample code here. Pin
samal_recw9530-Jun-07 12:45
samal_recw9530-Jun-07 12:45 
AnswerRe: How to post sample code here. Pin
Christian Graus30-Jun-07 14:07
protectorChristian Graus30-Jun-07 14:07 
GeneralRe: How to post sample code here. Pin
samal_recw951-Jul-07 8:13
samal_recw951-Jul-07 8:13 
QuestionData structures Pin
tom groezer30-Jun-07 10:52
tom groezer30-Jun-07 10:52 
AnswerRe: Data structures Pin
Paresh Chitte1-Jul-07 18:21
Paresh Chitte1-Jul-07 18:21 
AnswerRe: Data structures Pin
David Crow2-Jul-07 4:55
David Crow2-Jul-07 4:55 
QuestionDebugger not catching a specific WM_KEYDOWN in OpenGL application [PROBLEM RESOLVED] [modified] Pin
Cyrilix30-Jun-07 10:29
Cyrilix30-Jun-07 10:29 
I'm running Visual Studio 2005 and I have a specific key set for toggling between full screen and windowed mode -- F10. The following is a section of my code that runs in a while loop and handles my messages.

while (!m_terminate)
{
	//Check message queue and remove the message after processing
	if (PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
	{
		if (msg.message == WM_QUIT)
			m_terminate = true;
		else if (msg.message == WM_KEYDOWN)		//DEBUGGING
		{
			TranslateMessage(&msg);
			DispatchMessage(&msg);
		}
		else
		{
			TranslateMessage(&msg);
			DispatchMessage(&msg);
		}
	}

//... more code here
}


Now, when I set a breakpoint at if (msg.message == WM_KEYDOWN), whenever I press a key in my program, Visual Studio will break at that line and allow me to debug into it. This works all the time except for when I press F10 (I have a few other keys for toggling things). When I press F10, my program will hang for a little while, and then just continue working as if nothing happened, and my breakpoint will not be hit. I'm curious as to why this is. Anyone have an idea?

I guess I should mention that I have declared MESSAGE msg; outside of the while loop.

MODIFIED: It seems like the F10 key is a special key that is handled differently from the others.

-- modified at 2:44 Sunday 1st July, 2007
AnswerRe: Debugger not catching a specific WM_KEYDOWN in OpenGL application Pin
Cyrilix30-Jun-07 17:53
Cyrilix30-Jun-07 17:53 
AnswerRe: Debugger not catching a specific WM_KEYDOWN in OpenGL application Pin
Steve Echols30-Jun-07 19:05
Steve Echols30-Jun-07 19:05 
GeneralRe: Debugger not catching a specific WM_KEYDOWN in OpenGL application Pin
Cyrilix30-Jun-07 20:10
Cyrilix30-Jun-07 20:10 
QuestionHBITMAP size Pin
Axonn Echysttas30-Jun-07 9:37
Axonn Echysttas30-Jun-07 9:37 
AnswerRe: HBITMAP size Pin
Randor 30-Jun-07 11:24
professional Randor 30-Jun-07 11:24 
QuestionSoftware Project Pin
AprNgp30-Jun-07 5:16
AprNgp30-Jun-07 5:16 
AnswerRe: Software Project Pin
Luc Pattyn30-Jun-07 5:34
sitebuilderLuc Pattyn30-Jun-07 5:34 
AnswerRe: Software Project Pin
Cyrilix30-Jun-07 10:30
Cyrilix30-Jun-07 10:30 
AnswerRe: Software Project Pin
David Crow2-Jul-07 4:56
David Crow2-Jul-07 4:56 
Questioninstalled softwares via registry Pin
Akin Ocal30-Jun-07 4:55
Akin Ocal30-Jun-07 4:55 
AnswerRe: installed softwares via registry Pin
Michael Dunn30-Jun-07 11:54
sitebuilderMichael Dunn30-Jun-07 11:54 
AnswerRe: installed softwares via registry Pin
Akin Ocal30-Jun-07 13:09
Akin Ocal30-Jun-07 13:09 
GeneralRe: installed softwares via registry Pin
Rajesh R Subramanian30-Jun-07 21:29
professionalRajesh R Subramanian30-Jun-07 21:29 
GeneralRe: installed softwares via registry Pin
Michael Dunn1-Jul-07 12:27
sitebuilderMichael Dunn1-Jul-07 12:27 
GeneralRe: installed softwares via registry Pin
Akin Ocal1-Jul-07 17:44
Akin Ocal1-Jul-07 17:44 
AnswerRe: installed softwares via registry Pin
David Crow2-Jul-07 5:00
David Crow2-Jul-07 5:00 
QuestionIs this possible with VC2005? (modify code and continue working...) Pin
Joan M30-Jun-07 4:54
professionalJoan M30-Jun-07 4:54 

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.