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

  1. Newsgroups: comp.windows.ms.programmer
  2. Path: sparky!uunet!sun-barr!cs.utexas.edu!wotan.compaq.com!twisto.eng.hou.compaq.com!sword.eng.hou.compaq.com!mccreary
  3. From: mccreary@sword.eng.hou.compaq.com (Ed McCreary)
  4. Subject: Re: Diplaying BMP files under Windows 3.x
  5. Message-ID: <1992Jul21.180439.12547@twisto.eng.hou.compaq.com>
  6. Sender: news@twisto.eng.hou.compaq.com (Netnews Account)
  7. Organization: Compaq Computer Corp.
  8. References: <1682BEB88.SSCHEMA@ibm.gwdg.de>
  9. Date: Tue, 21 Jul 1992 18:04:39 GMT
  10. Lines: 23
  11.  
  12. In article <1682BEB88.SSCHEMA@ibm.gwdg.de> SSCHEMA@ibm.gwdg.de (Stefan Schemat) writes:
  13. >Does anybody knows how to load and display a BMP file with 256
  14. >colors under Windows 3.x?
  15. >First we have tried to display that bitmap with the GDI-command
  16. >"BitBlt()" after including it in the program's ressources. It
  17. >appeared very fast, but only with a few colors.
  18. >Then we loaded and displayed it pixel by pixel with "SetPixel()".
  19. >This method shows all colors, but it is veeeeeery sloooooow.
  20. >Ciao Stefan
  21. >sschema@ibm.gwdg.de
  22.  
  23. I assume you have a video card capable of suporting 256 colors.  If so,
  24. you need to create a logical palette based upon the colors needed in the 
  25. image, select it into the device context and realize it before displaying.
  26. If your using the SDK, there's a section on logical palettes in one
  27. of the volumes.  It's the programmer's guide I believe.  
  28.  
  29. Remember to realized the palette just before creating the bitmap also.
  30.  
  31. --
  32. McCreary@sword.eng.hou.compaq.com     Computers are like Old Testament gods;
  33. Me? Speak for Compaq?  Yeah, right.   lots of rules and no mercy.
  34. "By this time my lungs were aching for air..."               Joseph Campbell
  35.