home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / windows / ms / programm / 7315 < prev    next >
Encoding:
Text File  |  1992-07-22  |  1.8 KB  |  50 lines

  1. Newsgroups: comp.windows.ms.programmer
  2. Path: sparky!uunet!uunet.ca!hyper.hyper.com!bonneau
  3. From: bonneau@hyper.hyper.com (Paul Bonneau)
  4. Subject: Re: HELP: Load an icon from a .EXE file
  5. Message-ID: <1992Jul22.161746.1939@hyper.hyper.com>
  6. Reply-To: bonneau@hyper.UUCP (Paul Bonneau,,)
  7. Organization: HyperCube Inc.
  8. References: <1992Jul21.023757.24588@vela.acs.oakland.edu> <1992Jul21.144036.26772@hyper.hyper.com> <1992Jul21.172030.4078@vela.acs.oakland.edu>
  9. Date: Wed, 22 Jul 1992 16:17:46 GMT
  10. Lines: 38
  11.  
  12. In article <1992Jul21.172030.4078@vela.acs.oakland.edu> mclellan@vela.acs.oakland.edu (Candy M. McLellan) writes:
  13. >
  14. >Paul,
  15. >
  16. [ stuff deleted ]
  17. >    How can I keep a Bitmap Selected into memory with an
  18. >    Owner-Draw ListBox?
  19. >
  20. >    The ODA messages seem to work on a item by item basis
  21. >    with no sequence (asynchronous) with lp->hDC having
  22. >    no beginning.
  23. >
  24. >    IOW, I want to select a bitmap into memory for the first
  25. >    item in a re-paint and then not select again for further
  26. >    items (this speeds things up considerable when doing
  27. >    one's own custom controls).
  28. >
  29. >    However, as I said, the Owner-Draw does not seem to have
  30. >    a synchrous state where one can tell when the hDC is
  31. >    first being claimed for any given # of item re-paints.
  32. >
  33. >    I thought of subclassing ListBox but I don't see how
  34. >    one could intercept WM_PAINT for the hDC I'm referring to
  35. >
  36. >    Any suggestions are greatly appreciated.
  37. >
  38. Sorry, I don't understand what you are asking.  Surely the
  39. hDC in the WM_DRAWITEM's DRAWITEMSTRUCT is a screen DC and
  40. not a memory DC?  You can't select a bitmap into a screen DC.
  41.  
  42. Are you trying to mimimize the redrawing required for each
  43. WM_DRAWITEM message?  If so, could you not just change the
  44. state according to itemAction?  I.e., if you get itemAction
  45. == IDA_FOCUS, maybe yoy could just XOR your caret on or off.
  46.  
  47. Maybe we should take this offline, feel free to send e-mail.
  48.  
  49. cheers - Paul.
  50.