Running the system metrics sample in the Petzold in both Wine and Windows 98 showed a lot of differences. So I started hacking windows/sysmetrics.c and the result of this is the attached patch. With this patch all the differences listed below disapeared. But I have the feeling that system metrics is a delicate subject, especially because of the platform variations: win3.1, win9x, win nt, win2000. I hope to run compare the results with a Windows 95 machine tonight but I don't have access to the other platforms. So I would like your feed-back on the attached patch. Is there some parts that belong to a Win9x only section? Does anyone know if it breaks things for Windows 3.1? sw=screen-width sh=screen-height Wine Win98 SM_CYVTHUMB 15 16 SM_CXHTHUMB 15 16 SM_CYVSCROLL 15 16 SM_CXHSCROLL 15 16 SM_CXSIZE 17 18 SM_CYSIZE 17 18 SM_CXSIZEFRAME 5 4 SM_CYSIZEFRAME 5 4 SM_CXSMSIZE 15 13 SM_CXMENUSIZE 19 18 SM_CYMENUSIZE 19 18 SM_CXMAXTRACK sw+14 sw+12 SM_CYMAXTRACK sh+14 sh+12 SM_CXMAXIMIZED sw+10 sw+8 SM_CYMAXIMIZED sh-45 sh+8 SM_CXMENUCHECK 2 13 SM_CYMENUCHECK 2 13 -- Francois Gouget [EMAIL PROTECTED]
Index: windows/sysmetrics.c =================================================================== RCS file: /home/wine/wine/windows/sysmetrics.c,v retrieving revision 1.16 diff -u -r1.16 sysmetrics.c --- windows/sysmetrics.c 2000/07/31 23:32:49 1.16 +++ windows/sysmetrics.c 2000/09/22 07:55:15 @@ -65,7 +65,7 @@ PROFILE_GetWineIniInt("Tweak.Layout", "DialogFrameWidth", (TWEAK_WineLook > WIN31_LOOK) ? 3 : 4); sysMetrics[SM_CYDLGFRAME] = sysMetrics[SM_CXDLGFRAME]; - sysMetrics[SM_CYVTHUMB] = sysMetrics[SM_CXVSCROLL] - 1; + sysMetrics[SM_CYVTHUMB] = sysMetrics[SM_CXVSCROLL]; sysMetrics[SM_CXHTHUMB] = sysMetrics[SM_CYVTHUMB]; sysMetrics[SM_CXICON] = 32; sysMetrics[SM_CYICON] = 32; @@ -97,9 +97,9 @@ sysMetrics[SM_CXMIN] = (TWEAK_WineLook > WIN31_LOOK) ? 112 : 100; sysMetrics[SM_CYMIN] = (TWEAK_WineLook > WIN31_LOOK) ? 27 : 28; - sysMetrics[SM_CXSIZE] = sysMetrics[SM_CYCAPTION] - 2; + sysMetrics[SM_CXSIZE] = sysMetrics[SM_CYCAPTION] - 1; sysMetrics[SM_CYSIZE] = sysMetrics[SM_CXSIZE]; - sysMetrics[SM_CXFRAME] = GetProfileIntA("Windows", "BorderWidth", 4) + 1; + sysMetrics[SM_CXFRAME] = GetProfileIntA("Windows", "BorderWidth", 4); sysMetrics[SM_CYFRAME] = sysMetrics[SM_CXFRAME]; sysMetrics[SM_CXMINTRACK] = sysMetrics[SM_CXMIN]; sysMetrics[SM_CYMINTRACK] = sysMetrics[SM_CYMIN]; @@ -124,12 +124,12 @@ sysMetrics[SM_CYEDGE] = sysMetrics[SM_CXEDGE]; sysMetrics[SM_CXMINSPACING] = 160; sysMetrics[SM_CYMINSPACING] = 24; - sysMetrics[SM_CXSMICON] = sysMetrics[SM_CYSIZE] - (sysMetrics[SM_CYSIZE] % 2); + sysMetrics[SM_CXSMICON] = sysMetrics[SM_CYSIZE] - 2; sysMetrics[SM_CYSMICON] = sysMetrics[SM_CXSMICON]; sysMetrics[SM_CYSMCAPTION] = 16; - sysMetrics[SM_CXSMSIZE] = 15; - sysMetrics[SM_CYSMSIZE] = sysMetrics[SM_CXSMSIZE]; - sysMetrics[SM_CXMENUSIZE] = sysMetrics[SM_CYMENU]; + sysMetrics[SM_CXSMSIZE] = 13; + sysMetrics[SM_CYSMSIZE] = 15; + sysMetrics[SM_CXMENUSIZE] = sysMetrics[SM_CYMENU]-1; sysMetrics[SM_CYMENUSIZE] = sysMetrics[SM_CXMENUSIZE]; /* FIXME: What do these mean? */ @@ -145,7 +145,7 @@ sysMetrics[SM_CXMAXIMIZED] = sysMetrics[SM_CXSCREEN] + 2 * sysMetrics[SM_CXFRAME]; sysMetrics[SM_CYMAXIMIZED] = - sysMetrics[SM_CYSCREEN] - 45; + sysMetrics[SM_CYSCREEN] + 2 * sysMetrics[SM_CXFRAME]; sysMetrics[SM_NETWORK] = 3; /* For the following: 0 = ok, 1 = failsafe, 2 = failsafe + network */ @@ -154,8 +154,8 @@ sysMetrics[SM_CXDRAG] = 2; sysMetrics[SM_CYDRAG] = 2; sysMetrics[SM_SHOWSOUNDS] = 0; - sysMetrics[SM_CXMENUCHECK] = 2; - sysMetrics[SM_CYMENUCHECK] = 2; + sysMetrics[SM_CXMENUCHECK] = 13; + sysMetrics[SM_CYMENUCHECK] = 13; /* FIXME: Should check the type of processor for the following */ sysMetrics[SM_SLOWMACHINE] = 0;