Jump to content
  • Advertisement
Sign in to follow this  
Damocles

TrackMouseEvent - unknown symbol?

This topic is 4062 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

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
Advertisement
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
Actually, you need to #define _WIN32_WINNT to greater than or equal to 0x0400. Check winuser.h and find the function in question.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!