• Advertisement
Sign in to follow this  

TRACKMOUSEEVENT

This topic is 3561 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

All I want to do is declare a TRACKMOUSEEVENT and use the BOOL _TrackMouseEvent function. When I try to declare the TRACKMOUSEEVENT like so TRACKMOUSEEVENT me; I'm slapped with this: C:\Projects\GM08\GMGUI.cpp(295) : error C2065: 'TRACKMOUSEEVENT' : undeclared identifier C:\Projects\GM08\GMGUI.cpp(295) : error C2146: syntax error : missing ';' before identifier 'me' C:\Projects\GM08\GMGUI.cpp(295) : error C2065: 'me' : undeclared identifier I've included windows.h, which includes winuser.h, which is where I can plainly see that TRACKMOUSEEVENT is declared like so #if(_WIN32_WINNT >= 0x0400) typedef struct tagTRACKMOUSEEVENT { DWORD cbSize; DWORD dwFlags; HWND hwndTrack; DWORD dwHoverTime; } TRACKMOUSEEVENT, *LPTRACKMOUSEEVENT; WINUSERAPI BOOL WINAPI TrackMouseEvent( IN OUT LPTRACKMOUSEEVENT lpEventTrack); #endif /* _WIN32_WINNT >= 0x0400 */ It must be that the condition (_WIN32_WINNT >= 0x0400) is not met. I give up. What's going on here?

Share this post


Link to post
Share on other sites
Advertisement
I was a little hasty in posting this. Writing

#define _WIN32_WINNT 0x0500

before #include <windows.h> solves the problem.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement