Microsoft NONCLIENTMETRICS doesnt work in XP :(

They have done it again!
In the RTM of the Vista SDK they have added a new member to the NONCLIENTMETRICS struct.
#if(WINVER >= 0x0600)
int     iPaddedBorderWidth;
#endif /* WINVER >= 0x0600 */
So if you set WINVER to 0x0600 and compile your application it will no longer work on XP.
If you look at the documentation in MSDN it doesn’t mention anything about the struct size change for Vista so how are developers supposed to know this will break backward compatibility?

Definitely ugly, and will hit a lot of people who forgot or didn’t set WINVER in their app, but it’s not unprecedented.  Example would be MENUITEMINFO with the hbmpItem structure (however in that case they got it wrong, it works fine on Windows 98 SE not just WINVER >=0x0500 as it is in the SDK headers).
If a user defines _WIN32_WINNT but not WINVER, then WINVER is defined as the value of _WIN32_WINNT.  However, if a user defines both _WIN32_WINNT and WINVER, then they are separate.    But if neither are set, then WINVER is defaulted to 0x0600, a bad thing in this case.
So try using _WIN32_WINNT = 0x0600 and WINVER = 0x0501.    Not sure how many definitions would be missing with this combination.  If too many are missing then set cbSize at runtime based on the current OS (e.g. (BYTE)GetVersion() < 6 )

http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=930256&SiteID=1