home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / cplus / 12339 < prev    next >
Encoding:
Text File  |  1992-08-13  |  1.1 KB  |  37 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!mcsun!Germany.EU.net!news.netmbx.de!zrz.tu-berlin.de!ceres.fokus.gmd.de!tom
  3. From: tom@fokus.gmd.de (Tom Pfeifer)
  4. Subject: Turbo Vision Color Palette
  5. Message-ID: <1992Aug14.111011.21807@fokus.gmd.de>
  6. Sender: news@fokus.gmd.de (News system)
  7. Organization: GMD-FOKUS, Hardenbergplatz 2, 1000 Berlin 12, Germany
  8. Date: Fri, 14 Aug 1992 11:10:11 GMT
  9. Lines: 26
  10.  
  11.  
  12. I would appreciate some help with saving the color palette in Turbo Vision.
  13. As I already learned the palette string differs from C style having the length
  14. stored in the first byte.
  15.  
  16. I tried the following in a member function inheriting getPalette() from TApplication:
  17.  
  18. char myPalString[256];
  19. TPalette * xx = (TPalette *) myPalString;
  20. *xx = getPalette();
  21.  
  22. According to TFM the overloaded operator = should copy the string. All I get is 4 bytes
  23. for the complete application. Can't be all.
  24. When I try:
  25.  
  26. getPalette() = *xx;
  27. redraw();
  28.  
  29. the colors are messed up completely.
  30.  
  31. Tnx for help
  32. Tom
  33.  
  34. BTW, does getPalette() work with all three palettes (color, mono, b/w) or do I have
  35. to switch the modes before access?
  36. Tom
  37.