On Wed, Apr 12, 2006 at 08:55:09AM -0700, Duane Clark wrote: > Huw D M Davies wrote: > > > >I had some fun with this a month or two ago. See the > >test_margins_font_change test and calc_min_margin_size in the actual > >code. The deal seems to be that for 'small' edit controls > >EC_USEFONTINFO results in no margin. 'Small' is currently defined to > >be smaller than the extents of the (four character) string "'**'", > >that's close but not quite how Windows does it. > > The fields in my case are 4 numbers.
Note that this size has nothing to do with what's in the control. The '**' thing is just something the scales with font size that seems to be close to the 'magic' size in Windows. > >Now your problem could simply be that you don't have the font that the > >app wants to use in this edit control... > > What the "right" font should be is a bit of a mystery to me. From traces > with the font and edit debug channels turned on, it appears to me the > application was selecting "MS Shell Dlg". So in my test app, I > duplicated the selected font: > > afont = CreateFont(-11, 0, 0, 0, 400, 0, 0, 0, DEFAULT_CHARSET, > OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, PROOF_QUALITY, DEFAULT_PITCH, > "MS Shell Dlg"); > SendMessage(g_hControl,WM_SETFONT,(WPARAM)afont,0); MS Shell Dlg maps to either Microsoft Sans Serif or Tahoma depending on Windows version; the default wine.inf maps it to Tahoma so you should check whether you have tahoma.ttf installed. If in doubt a +font log will tell you what Wine picks for this font. Huw. -- Huw Davies [EMAIL PROTECTED]