Changelog: Oops, initial thumb length doesn't appear to depend on SM_CYCAPTION after all.
Thumb length DOES depend on GetSystemMetrics( SM_CYCAPTION) on a native platform. ( thumb_length = GetSystemMetrics( SM_CYCAPTION) + 2 [with no select range]) If wine uses standard values from windows there's no matter. But if a user decides to change these values in its registry, trackbars won't reflect those changes in their sizes.
So i think that thumb length still need to depend on this metrics value.
Stephan
/* initial thumb length */ clientMetric = GetSystemMetrics(SM_CYCAPTION);
....
BiGgUn wrote:
Changelog: Oops, initial thumb length doesn't appear to depend on SM_CYCAPTION after all.
Thumb length DOES depend on GetSystemMetrics( SM_CYCAPTION) on a native platform. ( thumb_length = GetSystemMetrics( SM_CYCAPTION) + 2 [with no select range]) If wine uses standard values from windows there's no matter. But if a user decides to change these values in its registry, trackbars won't reflect those changes in their sizes.
So i think that thumb length still need to depend on this metrics value.
Well, as I mentioned elsewhere, on Win2K for me GetSystemMetrics(SM_CYCAPTION) returns 20, while the initial thumb size is 21. So any relationship appears to depend on the Windows version.
By all means feel free to figure out exactly how it works, and submit a patch. But I think it needs to be tested on a few different versions of Windows. I find the explanation of SM_CYCAPTION in the SDK to not be too clear:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/win9x/verdi...
could someone send me the testcase and i will run it on a win2k machine, a win98 machine and a winxp machine?
--- Duane Clark dclark@akamail.com wrote:
BiGgUn wrote:
Changelog: Oops, initial thumb length doesn't appear to depend on SM_CYCAPTION after all.
Thumb length DOES depend on GetSystemMetrics( SM_CYCAPTION) on a native platform. ( thumb_length = GetSystemMetrics( SM_CYCAPTION) + 2 [with no select range]) If wine uses standard values from windows there's no matter. But if a user decides to change these values in its registry, trackbars won't reflect those changes in their sizes.
So i think that thumb length still need to depend on this metrics value.
Well, as I mentioned elsewhere, on Win2K for me GetSystemMetrics(SM_CYCAPTION) returns 20, while the initial thumb size is 21. So any relationship appears to depend on the Windows version.
By all means feel free to figure out exactly how it works, and submit a patch. But I think it needs to be tested on a few different versions of Windows. I find the explanation of SM_CYCAPTION in the SDK to not be too clear:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/win9x/verdi...
===== -- Dustin Navea
Minor Contributor, http://www.winehq.com Bugzilla Janitor, http://bugs.winehq.com Network Admin, irc://irc.blynk.net (down)
__________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com
Dustin Navea wrote:
could someone send me the testcase and i will run it on a win2k machine, a win98 machine and a winxp machine?
Hmm, an executable for determining the SM_CYCAPTION metric is small, so I'll attach that. It comes from this code.
#include "windows.h" #include "stdio.h"
main() { printf("GetSystemMetrics(SM_CYCAPTION) = %d\n", GetSystemMetrics(SM_CYCAPTION)); }
For determing thumb size, I use MS ControlSpy, available here: http://www.microsoft.com/msj/0798/controlspy.aspx
That includes binaries. Just run the Trackbar binary, click on "TBM_GETTHUMBLENGTH" in the window on the lower left, and then click the "Send" button. In the window below that button, it should say something like: lResult: 21 (0x15) which means the thumb size is 21.