Advertisement

Should this work?

Started by February 20, 2000 08:21 PM
2 comments, last by Esap1 24 years, 10 months ago
case WM_KEYDOWN: switch( wParam ) { case VK_ESCAPE: { PostQuitMessage(0); } case VK_DOWN: { D3DXMatrixTranslation(&m_App->matPosition, 0.0f, 0.0f, 10.0f); } case VK_UP: { D3DXMatrixTranslation(&m_App->matPosition, 0.0f, 0.0f, -10.0f); } } break; } m_App->matView+=m_App->matPosition; m_App->m_pD3DDev->SetTransform(D3DTRANSFORMSTATE_VIEW, m_App->matView); ----------cut here------------------------------- Should that work(in WinProc), caus it doesnt, anyone one know what I should do? Thanks in Advance!
you need breaks after each cast ''section''. So stick one after PostQuitMessage and D3DXMatrixTranslation. Other than that i see no problems. btw you dont need all those {} pairs just a case and any statements and then a break.

Josh
Advertisement
It still doesnt work, and I cant believe I was putting brakets around each case, but it still doesnt work!
PLEASE HELP!!
What exactly is going wrong? Compile error?
One thing I noticed, is that you have an extra }. The one before the break closes the switch statement.

This topic is closed to new replies.

Advertisement