This struct has gained additional fields under Vista which are not supported under previous versions. We don't use these fields but just using a bigger struct makes functions using it fail under pre-Vista systems, so don't do this.
Closes #11057.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61592
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxDateTime::WeekDay *wd)
{
WinStruct<MCHITTESTINFO> hti;
+
+ // Vista and later SDKs add a few extra fields to MCHITTESTINFO which are
+ // not supported by the previous versions, as we don't use them anyhow we
+ // should pretend that we always use the old struct format to make the call
+ // below work on pre-Vista systems (see #11057)
+#ifdef MCHITTESTINFO_V1_SIZE
+ hti.cbSize = MCHITTESTINFO_V1_SIZE;
+#endif
+
hti.pt.x = pos.x;
hti.pt.y = pos.y;
switch ( MonthCal_HitTest(GetHwnd(), &hti) )