fork download
  1. LRESULT CALLBACK WndProc(HWND hWindow,UINT msg,WPARAM wParam,LPARAM lParam)
  2. {
  3. //this switch statement processes the message sent, here you can program the code
  4. //for each type of message's reaction
  5. switch(msg)
  6. {
  7. //WM_PAINT is a render command
  8. case WM_PAINT:
  9. ValidateRect( hWindow, NULL );
  10. return 0;
  11. break;
  12. //WM_LBUTTONDOWN is a message send every time the left mouse button is clicked over the Client area
  13. case WM_TIMER:
  14. switch(wParam)
  15. {
  16. case Refresh:
  17. Render(hWindow);
  18. break;
  19. }
  20. return 0;
  21. break;
  22. case WM_LBUTTONDOWN:
  23. //m_BackGround->SetScrollVelocity(Vector2D(-m_BackGround->GetScrollVelocity().x,0));
  24. return 0;
  25. break;
  26. //the WM_DESTROY message is the message sent when the program is going to terminate
  27. case WM_DESTROY:
  28. DestroyWindow( hWindow );
  29. m_running = false;
  30. PostQuitMessage(0);
  31. return 0;
  32. break;
  33. case WM_MOUSEMOVE:
  34. float xPos = (float)GET_X_LPARAM(lParam);
  35. float yPos = (float)GET_Y_LPARAM(lParam);
  36. m_game->scene->SetMousePosition(xPos, yPos);
  37. }
  38. //it returns default processing for any window message that an switch statement does not process
  39. return DefWindowProc(hWindow,msg,wParam,lParam);
  40. }
  41.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1: error: ‘LRESULT’ does not name a type
stdout

Standard output is empty