Article View: comp.windows.ms.programmer
Article #2305need height of menu
From: Phong Co
Date: Thu, 25 Apr 1991 15:57
Date: Thu, 25 Apr 1991 15:57
30 lines
1390 bytes
1390 bytes
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 |
Technical Details
Message-ID:
<2816fc80@xurilka.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!xurilka.UUCP!chrysesShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!xurilka.UUCP!chryses From: chryses@xurilka.UUCP (Phong Co) Newsgroups: comp.windows.ms.programmer Subject: need height of menu Message-ID: <2816fc80@xurilka.UUCP> Date: 25 Apr 91 15:57:52 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: dada Indugu Inc. Lines: 30