From 63c9412922be78ade412b2e4738ed0e0fb0505ec Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Wed, 10 Oct 2012 23:05:15 +0400 Subject: [PATCH] enable huge value range in highgui sliders on Windows (patch #941) --- modules/highgui/src/window_w32.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/highgui/src/window_w32.cpp b/modules/highgui/src/window_w32.cpp index 29cdda8e2..02c69115c 100644 --- a/modules/highgui/src/window_w32.cpp +++ b/modules/highgui/src/window_w32.cpp @@ -2296,7 +2296,8 @@ icvCreateTrackbar( const char* trackbar_name, const char* window_name, trackbar->maxval = count; /* Adjust slider parameters */ - SendMessage(trackbar->hwnd, TBM_SETRANGE, (WPARAM)TRUE, (LPARAM)MAKELONG(0, count)); + SendMessage(trackbar->hwnd, TBM_SETRANGEMIN, (WPARAM)TRUE, (LPARAM)0); + SendMessage(trackbar->hwnd, TBM_SETRANGEMAX, (WPARAM)TRUE, (LPARAM)count); SendMessage(trackbar->hwnd, TBM_SETTICFREQ, (WPARAM)1, (LPARAM)0 ); if( val ) pos = *val;