# WM_MOUSELEAVE Message

## Recommended Posts

I want to process the WM_MOUSELEAVE message, but my compiler doesn't recognize it. I already checked to see if I included windows.h. What else do I need?

##### Share on other sites
Drew_Benton    1861
According to MSDN, a minimal OS of 'Windows 98' or 'Windows NT 4.0'. Since I assume you have either or and you have #include <windows.h>, make sure you have not done any of the #define VCLEANMEAN, etc.. Those might remove a few things that you need. Lastly what compiler are you using?

- Drew

##### Share on other sites
Evil Steve    2017
According to the MSDN it's in Winuser.h (included from windows.h). Make sure you have the latest version of the platform SDK (MSVC 6 has an old version).

##### Share on other sites
webjeff    241
Windows Messages are just defines, so at the top of your wndproc or wherever just put this:

#define WM_MOUSELEAVE 0x02A3

and you should be fine

Jeff.

##### Share on other sites
Quote:
 Original post by Drew_BentonAccording to MSDN, a minimal OS of 'Windows 98' or 'Windows NT 4.0'. Since I assume you have either or and you have #include , make sure you have not done any of the #define VCLEANMEAN, etc.. Those might remove a few things that you need. Lastly what compiler are you using?- Drew

Drew was partly right here.

You have to define these values before you #include <windows.h>

// for NT4 min#define WINVER       0x0400#define _WIN32_WINNT 0x0400// or for 98 min#define WINVER       0x0410#define _WIN32_WINNT 0x0410

HTH,

##### Share on other sites
No, I have XP, but I think Evil Steve was right - I haven't updated in a while. Thanks for the quick replies!

##### Share on other sites
Quote:
 Original post by thejoshinatorNo, I have XP, but I think Evil Steve was right - I haven't updated in a while. Thanks for the quick replies!

This has nothing to do with your OS. These defines aloow you to use features that targets at least these OS. You can use XP to build programs that will target Win95 machines. Or you can use Win98 to build programs that will target only XP SP2.

Regards,