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