On Sun, 8 May 2005 13:30:30 +0200, you wrote:
On 05/08/2005 12:25:18 PM, Rein Klazes wrote:
That does not seem correct on the Win2k system that I am using for testing.
Right. Windows sets itemHeight before and not after WM_MEASUREITEM. Sorry for that.
And it also seems not to be GetSystemMetrics(SM_CYMENU)-1 but a rather strange magic value of 16. (with my test it looked 100% the same ... sigh. I'll go to bed soon. ;)
How about this patch?
Much better. About the magic number: I looked at the value on Win2k and WinME with different resolutions ( desktop->properties->settings, click on advanced tab and change what windows calls "font size" but is really changing the DPI, dots-per-inch, which is also reported).
DPI Win2k WinME ================== 96 16 13 120 20 16
I assume that you are using a DPI of 96, and XP and 2k behave the same way. The DPI you can retrieve with GetDeviceCaps( hdc, LOGPIXELSY). I would recommend using the Win2k values computed by: DPI/6.
Rein.
On 05/08/2005 04:21:46 PM, Rein Klazes wrote:
About the magic number: I looked at the value on Win2k and WinME with different resolutions ( desktop->properties->settings, click on advanced tab and change what windows calls "font size" but is really changing the DPI, dots-per-inch, which is also reported).
DPI Win2k WinME
96 16 13 120 20 16
Looks like a font-height in pixels for me then - maybe some system font has a different size on your Win2k and WinME box? (I'm reinstalling Windows ATM - can't test it)
-flx
On Sun, 8 May 2005 21:00:28 +0200, you wrote:
On 05/08/2005 04:21:46 PM, Rein Klazes wrote:
About the magic number: I looked at the value on Win2k and WinME with different resolutions ( desktop->properties->settings, click on advanced tab and change what windows calls "font size" but is really changing the DPI, dots-per-inch, which is also reported).
DPI Win2k WinME
96 16 13 120 20 16
Looks like a font-height in pixels for me then - maybe some system font has a different size on your Win2k and WinME box? (I'm reinstalling Windows ATM - can't test it)
Everything else that I can think of is the same on those boxes. Changing menu font size is also irrelevant. I tested also a box with WinXP: same results as the Win2k column.
Rein.