home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / mswindo / programm / misc / 1515 < prev    next >
Encoding:
Text File  |  1992-08-26  |  2.0 KB  |  48 lines

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