Re: How does Windows determine the height of a combo box?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jeff Partch [MVP] (jeffp_at_mvps.org)
Date: 02/06/05


Date: Sun, 6 Feb 2005 04:39:15 -0600


"Morten Aune Lyrstad" <wants@nospam.all> wrote in message
news:hclNd.7421$Sl3.178366@news4.e.nsc.no...
> Hi! I need to determine the height of a combo box before actually
> creating it. How does Windows determine how tall the combo box will be?

I think it's something like the height of a representative (uppercase, full
staff, no over/underhang) character obtained via GetTextExtentPoint -- with
the current WM_GETFONT selected into the HDC, and
2*GetSystemMetrics(SM_CYFIXEDFRAME) and 1*GetSystemMetrics(SM_CYEDGE) added
to it. Of course, XP themes or an ownerdraw style will no doubt complicate
things.

-- 
Jeff Partch [VC++ MVP]


Relevant Pages

  • Re: Linux is free...So where is it?
    ... > I suspect the real reason is because Linux sucks and Windows does ... Why complicate matters by paying for running a system that is infested with ... whole windows xp home install directory 531 MB ...
    (alt.os.linux)
  • Re: Web + Email server bundle
    ... Ivan Marsh wrote: ... I've never had to use Windows for anything ..." ... Let's not complicate our relationship ... by trying to communicate with each other. ...
    (alt.os.linux)
  • Re: I Plan to build a community portal site for Linux resources -- HELP Requested
    ... Paul Rubin wrote: ... different than the zillion linux sites that already exist? ... He's gonna do it all from Windows. ... Let's not complicate our relationship ...
    (comp.os.linux.portable)