- ::SendMessage(GetHwnd(), UDM_SETRANGE, 0,
- (LPARAM) MAKELONG((short)maxVal, (short)minVal));
+
+#ifdef UDM_SETRANGE32
+ if ( wxTheApp->GetComCtl32Version() >= 471 )
+ {
+ // use the full 32 bit range if available
+ ::SendMessage(GetHwnd(), UDM_SETRANGE32, minVal, maxVal);
+ }
+ else // we're limited to 16 bit
+#endif // UDM_SETRANGE32
+ {
+ ::SendMessage(GetHwnd(), UDM_SETRANGE, 0,
+ (LPARAM) MAKELONG((short)maxVal, (short)minVal));
+ }