1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

TRACKMOUSEEVENT (error C2065)

Discussion in 'Win32' started by Irwan, Jul 14, 2010.

  1. Irwan

    Irwan New Member

    Joined:
    Jul 14, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Guy,


    In a child window WndProc(), I would like to use TrackMouseEvent(), inside WM_MOUSEMOVE block so I can fired up message on WM_MOUSELEAVE.

    To use TrackMouseEvent(), i need to declare TRACKMOUSEEVENT structure and fill up its data members. However, my MS Visual Studio 2005, keep telling me it I have error C2065: undeclared identifier.

    I have include windows.h in the header file.

    It is have been outdated?


    Thanks


    Code:
    LRESULT CALLBACK SplitterPanel::WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
    {
    	static HCURSOR		hcursor1, hcursor2;
    	static bool			isHovering;
    	TRACKMOUSEEVENT tm; //the error pointing to
    
    	
    	switch(iMsg){
    		case WM_CREATE :	
    			hcursor1 = ::LoadCursor(NULL, IDC_SIZEWE);
    			hcursor2 = ::LoadCursor(NULL, IDC_ARROW);
    			break;
    
    		case WM_MOUSEMOVE:
    			break;
    		
    		case WM_CLOSE :
    			DestroyWindow(hwnd);		  
    			break;
    
    		case WM_DESTROY :
    			PostQuitMessage(0);		  
    			break;
    	}
    	
    	
    	
    	return ::DefWindowProc(hwnd, iMsg, wParam, lParam);
    }
    
    
     

Share This Page