home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!cs.utexas.edu!usc!rpi!utcsri!torsqnt!geac!alias!bmcphers
- From: bmcphers@alias.com (Brent McPherson)
- Subject: Re: Using extended character set in menus
- Message-ID: <1992Aug26.171018.5909@alias.com>
- Keywords: Windows 3.0
- Sender: news@alias.com (News Owner)
- Organization: Alias Research Inc., Toronto ON Canada
- References: <55864@olivea.atc.olivetti.com> <kbbnz+=.whedon@netcom.com> <55877@olivea.atc.olivetti.com>
- Date: Wed, 26 Aug 1992 17:10:18 GMT
- Lines: 35
-
- In article <55877@olivea.atc.olivetti.com> os2dev@flash.ATC.Olivetti.Com (Bruce Rienzo) writes:
- >In article <kbbnz+=.whedon@netcom.com> whedon@netcom.com (Bill Whedon) writes:
- >>>I would like to display arrow symbols next to a menu item to indicate
- >>>that the arrow key is the accelerator for this item.
- >>>
- >>>How do I do it?
- >>See "Programming Windows" by Charles Petzold, Microsoft Press,
- >>ISBN 1-55615-264-7, the section titled "USING BITMAPS IN MENUS"
- >>Cheers,
- >>Bill Whedon
- >
- >Thanks for this Bill but I don't have quick access to this book. I have
- >looked at the section on using bitmaps in menus but it seems to me
- >that the entire menu item that is changed
- >with ModifyMebu has to be a bit map.
- >
-
- Yes, the entire item has to be a bitmap but it isn't that hard to do.
- I wrote a similar function that took a bitmap and a string and
- produced a bitmap menu item that had the bitmap prepended to the string.
-
- You just create a bitmap big enough for the symbol bitmap and the string
- (GetTextExtents) and draw the bitmap and the string (in the correct font).
- The result is great and looks exactly like an ordinary menu item.
- Also, the Petzold example is a great place to start and should give
- you all the info you need to do this.
-
- Warning: if you use a color bitmap for the image I found
- that the selected menu item looked really ugly since the inversion did
- not extend to the edges of the menus (at least it worked this way in
- Windows 3.0). Therefore, stick to black and white bitmaps.
-
- Hope this helps!
- --
- Brent McPherson (bmcphers@alias.com)
-