Click here to Skip to main content
16,005,149 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: NEED HELP with multithreading!!!!!!!!!!!!!! Pin
Mark Salsbery27-Jul-07 12:12
Mark Salsbery27-Jul-07 12:12 
QuestionCritical Section for one thread Pin
Force Code26-Jul-07 12:25
Force Code26-Jul-07 12:25 
AnswerRe: Critical Section for one thread Pin
Mark Salsbery26-Jul-07 12:45
Mark Salsbery26-Jul-07 12:45 
GeneralRe: Critical Section for one thread Pin
Force Code26-Jul-07 12:52
Force Code26-Jul-07 12:52 
GeneralRe: Critical Section for one thread Pin
Mark Salsbery26-Jul-07 13:00
Mark Salsbery26-Jul-07 13:00 
QuestionHow do I process "ALT + ENTER" in Win32 C++ programming? Pin
Furrage26-Jul-07 11:56
Furrage26-Jul-07 11:56 
AnswerRe: How do I process "ALT + ENTER" in Win32 C++ programming? Pin
Mark Salsbery26-Jul-07 12:59
Mark Salsbery26-Jul-07 12:59 
GeneralRe: How do I process "ALT + ENTER" in Win32 C++ programming? Pin
Furrage26-Jul-07 14:35
Furrage26-Jul-07 14:35 
Thanks Mark, but it does not work consistently. The first time I press the combination it works, but after that it does not. I also use F11 and that works flawlessly.

I tried printing wParam and lParam to a file to see what is generated and it does not even show the codes for the WM_KEYDOWN events which make me wonder if it is being processed under a different message. Any Ideas?

Code snippets as follows...
LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
			// Message handleing callback function.
	switch (uMsg) {	// Check for defined messages.
		...
	case WM_KEYDOWN:// WM_KEYDOWN message
		...
		OnKeyDown(wParam, lParam);
			// Call WM_KEYDOWN event handler.
		break;
		...
	}
	...
}

...

void OnKeyDown(int pKeyCode, DWORD pFlags) {
			// WM_KEYDOWN event handler.
	...
	switch (pKeyCode) {
			// Process based on key pressed...
	case 122:	// 'F11' pressed.
		...
		DestroyWin();
			// Destroy existing window.
		CreateWin();
			// Recreate window.
		break;
	case VK_RETURN:	// Return key pressed.
		if (GetKeyState(VK_MENU)) {
			// If alt key is down...
			...
			DestroyWin();
				// Destroy existing window.
			CreateWin();
				// Recreate window.
		}
		break;
	}
}

GeneralRe: How do I process "ALT + ENTER" in Win32 C++ programming? Pin
Mark Salsbery26-Jul-07 14:49
Mark Salsbery26-Jul-07 14:49 
GeneralRe: How do I process "ALT + ENTER" in Win32 C++ programming? Pin
Furrage26-Jul-07 15:01
Furrage26-Jul-07 15:01 
GeneralRe: How do I process "ALT + ENTER" in Win32 C++ programming? Pin
Mark Salsbery26-Jul-07 15:58
Mark Salsbery26-Jul-07 15:58 
QuestionQuestion about Recording from Microphone Pin
godspeed12326-Jul-07 11:37
godspeed12326-Jul-07 11:37 
AnswerRe: Question about Recording from Microphone Pin
Mark Salsbery26-Jul-07 13:06
Mark Salsbery26-Jul-07 13:06 
QuestionProgram crash while accessing OnPaint() from a thread!! Pin
Kiran Satish26-Jul-07 10:31
Kiran Satish26-Jul-07 10:31 
QuestionRe: Program crash while accessing OnPaint() from a thread!! Pin
David Crow26-Jul-07 10:47
David Crow26-Jul-07 10:47 
AnswerRe: Program crash while accessing OnPaint() from a thread!! [modified] Pin
Kiran Satish26-Jul-07 10:59
Kiran Satish26-Jul-07 10:59 
QuestionRe: Program crash while accessing OnPaint() from a thread!! Pin
David Crow30-Jul-07 2:56
David Crow30-Jul-07 2:56 
QuestionBuffer help Pin
dellthinker26-Jul-07 6:57
dellthinker26-Jul-07 6:57 
AnswerRe: Buffer help Pin
led mike26-Jul-07 7:15
led mike26-Jul-07 7:15 
GeneralRe: Buffer help Pin
dellthinker26-Jul-07 9:41
dellthinker26-Jul-07 9:41 
QuestionRe: Buffer help Pin
David Crow26-Jul-07 10:44
David Crow26-Jul-07 10:44 
AnswerRe: Buffer help Pin
dellthinker26-Jul-07 11:27
dellthinker26-Jul-07 11:27 
GeneralRe: Buffer help Pin
David Crow30-Jul-07 2:55
David Crow30-Jul-07 2:55 
Questionexactly same code, warning C4311: 'type cast' in a MFC dialog, no warning in console application!? Pin
alberthyc26-Jul-07 6:51
alberthyc26-Jul-07 6:51 
AnswerRe: exactly same code, warning C4311: 'type cast' in a MFC dialog, no warning in console application!? Pin
Mark Salsbery26-Jul-07 7:11
Mark Salsbery26-Jul-07 7:11 

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.