TrackMouseEvent - unknown symbol?

Started by
3 comments, last by Damocles 16 years, 11 months ago
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?
------------------------------------------[New Delta Games] | [Sliders]
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.
That wasn't it :( Seemed like a good idea too.
------------------------------------------[New Delta Games] | [Sliders]
Actually, you need to #define _WIN32_WINNT to greater than or equal to 0x0400. Check winuser.h and find the function in question.
That was it - thanks for your help.
------------------------------------------[New Delta Games] | [Sliders]

This topic is closed to new replies.

Advertisement