TWin32WSCustomCalendar.HitTest returns 0 in unthemed application on Vista and up
Original Reporter info from Mantis: Bart @flyingsheep
-
Reporter name: Bart Broersma
Original Reporter info from Mantis: Bart @flyingsheep
- Reporter name: Bart Broersma
Description:
TWin32WSCustomCalendar.HitTest returns 0 in unthemed application on Vista and up
Steps to reproduce:
Create an application with themes disabled and ru it on Vista or higher:
-Invoke a CalendarPopup or CalendarDialog.
- Click or Double click on a date
- Date does not change.
TCustomCalendar.HitTest returns cpNowhere wherever you click.
Additional information:
The MCHITTESTINFO structure seems to not only depends on Windos version but also on wether or not the application is themed
It seems this works:
if (WindowsVersion >= wvVista) and (GetFileVersion(comctl32) < ComCtlVersionIE6) then
HitTestInfo.cbSize := SizeOf(HitTestInfo)
else
HitTestInfo.cbSize := 32;
Needs more testing.
Mantis conversion info:
- Mantis ID: 29975
- OS: Windows
- OS Build: Win7
- Platform: i386
- Fixed in version: 1.6.2
- Fixed in revision: r52117 (#c8f24216)
- Target version: 1.6.2