ignore requested height for non-menubar ownerdraw popups

Rein Klazes wijn at wanadoo.nl
Sun May 8 09:21:46 CDT 2005


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.



More information about the wine-devel mailing list