Sign in to follow this  
Damocles

TrackMouseEvent - unknown symbol?

Recommended Posts

I have an odd on here. I'm trying to turn on mouse tracking in windows, and I'm using this code: TRACKMOUSEEVENT tme; tme.cbSize = sizeof(tme); tme.dwFlags = TME_LEAVE; tme.hwndTrack = hWnd; TrackMouseEvent(&tme); This is pretty much what it says to do in MSDN, but VC++ 2005 is refusing to compile with this code, saying it doesn't recognise the TRACKMOUSEEVENT struct. Has this struct changed name or something? I've included winuser.h and windows.h, which MSDN says are the required headers for this, so I'm at a complete loss as to why it won't recognise it. Anyone come across his problem before?

Share this post


Link to post
Share on other sites
In stdafx.h have you defined WINVER? and _WIN32_WINDOWS ?

They need to be defined to a value > 0x0410 since this function is only defined in Windows 98 and greater.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this