[comp.windows.ms.programmer] need height of menu

chryses@xurilka.UUCP (Phong Co) (04/25/91)

Hi there,

I have a window in which I want to draw a bitmap, and I want to
resize the window to fit the bitmap exactly before I draw.  If I use
MoveWindow(), the height I have to give is

	client area + caption + (window frame * 2) + menu

The height of the client area is just the height of my bitmap, and I
can get the height of the caption and window frame from
GetSystemMetrics().  However, I've got a fairly long menu bar, and if
the width is not large enough the bar will get scrunched up into 2 or
more lines.  GetSystemMetrics() will give me the height of a
single-line menu, but how do I find out how many lines my menu would
take up if I set the window width to X units?

Sorry for the long-winded question.


Phong.


-- 

=========================================================================
Phong T. Co		|
chryses@xurilka.UUCP	|	Nice girls don't explode.
dada Indugu Inc.	|			-- Dave Sim (Cerebus #110)
Montreal, CANADA	|