home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / os2 / programm / 7294 next >
Encoding:
Internet Message Format  |  1993-01-04  |  2.5 KB

  1. Path: sparky!uunet!munnari.oz.au!ariel.ucs.unimelb.EDU.AU!ucsvc.ucs.unimelb.edu.au!lugb!news
  2. Newsgroups: comp.os.os2.programmer
  3. Subject: Re: Putting Icons onto pushbuttons ?
  4. Message-ID: <1993Jan4.042045.8301@lugb.latrobe.edu.au>
  5. From: DEMOGRB@LUST.LATROBE.EDU.AU (BAKER,Gavin)
  6. Date: Mon, 4 Jan 1993 04:20:45 GMT
  7. Sender: news@lugb.latrobe.edu.au (USENET News System)
  8. References: <1992Dec29.125326.5216@ugle.unit.no> <1992Dec29.171040.955@panix.com>
  9. Organization: La Trobe University
  10. In-Reply-To: os2man@panix.com's message of 29 Dec 92 17:10:40 GMT
  11. X-News-Reader: VMS NEWS 1.24
  12. Lines: 47
  13.  
  14. In <1992Dec29.171040.955@panix.com> os2man@panix.com writes:
  15.  
  16. > In <1992Dec29.125326.5216@ugle.unit.no> benji@Lise.Unit.NO (Jrn Norheim) writes:
  17. > >I am trying to  make a PM application that use pushbuttons quite heavily. I 
  18. > >would like to put Icons or Bitmaps onto these buttons, but I have not figured
  19. > >out quite how to do this. I would prefer to attach the Icons or Bitmaps 
  20. > >to the button without having to make a userbutton and catching the BN_PAINT
  21. > >message.
  22. > >If anyone could help me with this problem, I would appreciate it very much.
  23. > The only way to do this is to make it/them userbutton(s) as you described.
  24. > Of course, I could be wrong (and would appreciate a correction, if so).
  25. > Cheers,
  26. > Q
  27. > -- 
  28. > "If you choose not to decide, you  | "My other body is in the shop" - seen
  29. >  still have made a choice" - Rush  |  on a T-shirt
  30. > ------------------------------------------------------------------------
  31.  
  32. I have been through the PM Ref online docs, as I needed to do the same thing,
  33. and unsuccessfully tried to use the BS_ICON flag.
  34.  
  35. Using a BS_ICON style button, I had to use the pCtlData in WinCreateWindow
  36. filling the BTNCDATA with the appropriate data.  This seemed to fail no
  37. matter what I did.
  38.  
  39. So, I wrote my own button.  It handles text and bitmaps, and can also be
  40. two-state (for a toggle), which was something else I needed.  It wasn't
  41. that hard, really.  If you're interested, I can mail you sample code.
  42.  
  43. Also, have a look at the MMPM toolkit.  (I found this out _after_ I'd
  44. written my own BUTTON control).  IBM have implemented a Bitmap button
  45. which handles text, icons, bitmaps, and animations, as well as two-states.
  46. Exactly what I needed, but until MM is included with the base product,
  47. I can't use it.  Still, once 2.1 comes out it should be included, which
  48. will make things a lot easier.
  49.  
  50. Hope this helps!
  51.  
  52. Gavin
  53. ------
  54. demogrb@lust.latrobe.edu.au
  55. .sig under construction
  56.  
  57.