Click here to Skip to main content
15,902,635 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Clear the debug output window Pin
Mark Salsbery7-Aug-07 10:28
Mark Salsbery7-Aug-07 10:28 
GeneralRe: Clear the debug output window Pin
bob169727-Aug-07 19:44
bob169727-Aug-07 19:44 
AnswerRe: Clear the debug output window Pin
Hans Dietrich7-Aug-07 15:46
mentorHans Dietrich7-Aug-07 15:46 
GeneralRe: Clear the debug output window Pin
bob169727-Aug-07 19:31
bob169727-Aug-07 19:31 
GeneralRe: Clear the debug output window Pin
Hans Dietrich8-Aug-07 2:50
mentorHans Dietrich8-Aug-07 2:50 
GeneralRe: Clear the debug output window Pin
bob169728-Aug-07 3:18
bob169728-Aug-07 3:18 
GeneralRe: Clear the debug output window Pin
Mark Salsbery8-Aug-07 4:57
Mark Salsbery8-Aug-07 4:57 
Questionerror C2051: case expression not constant Pin
Cuziyq7-Aug-07 8:25
Cuziyq7-Aug-07 8:25 
I am writing an event handler for the menu bar. In response to the WM_COMMAND message, my WndProc is supposed to send wParam to the function like this:

...<br />
case WM_COMMAND:<br />
guiObject->OnMenuSelection((UINT) wParam);<br />
...


Here is the code for the menu handler:

void GuiObject::OnMenuSelection(UINT menuID)<br />
{<br />
	switch(menuID)<br />
	{<br />
	case ID_FILE_QUIT:<br />
		break;<br />
	default:<br />
		break;<br />
	}<br />
}

So why is the compiler giving me this error? How do I fix it?
AnswerRe: error C2051: case expression not constant Pin
Mark Salsbery7-Aug-07 8:40
Mark Salsbery7-Aug-07 8:40 
GeneralRe: error C2051: case expression not constant Pin
Cuziyq7-Aug-07 8:44
Cuziyq7-Aug-07 8:44 
GeneralRe: error C2051: case expression not constant Pin
Mark Salsbery7-Aug-07 8:53
Mark Salsbery7-Aug-07 8:53 
GeneralRe: error C2051: case expression not constant Pin
Cuziyq7-Aug-07 9:01
Cuziyq7-Aug-07 9:01 
GeneralRe: error C2051: case expression not constant Pin
Mark Salsbery7-Aug-07 9:17
Mark Salsbery7-Aug-07 9:17 
GeneralRe: error C2051: case expression not constant Pin
led mike7-Aug-07 9:33
led mike7-Aug-07 9:33 
GeneralRe: error C2051: case expression not constant Pin
Mark Salsbery7-Aug-07 9:37
Mark Salsbery7-Aug-07 9:37 
GeneralRe: error C2051: case expression not constant Pin
led mike7-Aug-07 10:16
led mike7-Aug-07 10:16 
AnswerRe: error C2051: case expression not constant Pin
David Crow7-Aug-07 8:48
David Crow7-Aug-07 8:48 
QuestionAfxGetResourceHandle() assertion failure on LoadFrame() Pin
p_4737-Aug-07 7:28
p_4737-Aug-07 7:28 
AnswerRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
Mark Salsbery7-Aug-07 7:55
Mark Salsbery7-Aug-07 7:55 
GeneralRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
p_4738-Aug-07 6:37
p_4738-Aug-07 6:37 
GeneralRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
Mark Salsbery8-Aug-07 7:17
Mark Salsbery8-Aug-07 7:17 
QuestionRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
p_4739-Aug-07 6:31
p_4739-Aug-07 6:31 
AnswerRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
Mark Salsbery9-Aug-07 6:46
Mark Salsbery9-Aug-07 6:46 
GeneralRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
p_4739-Aug-07 21:30
p_4739-Aug-07 21:30 
GeneralRe: AfxGetResourceHandle() assertion failure on LoadFrame() Pin
Mark Salsbery10-Aug-07 4:49
Mark Salsbery10-Aug-07 4:49 

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.