home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / os2 / misc / 41915 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  2.2 KB

  1. Path: sparky!uunet!paladin.american.edu!howland.reston.ans.net!usc!enterpoop.mit.edu!eru.mt.luth.se!lunic!sunic!dkuug!diku!gogol
  2. From: gogol@diku.dk (Peter Skov Knudsen)
  3. Newsgroups: comp.os.os2.misc
  4. Subject: Re: Palette Manager problems (save-bits don't save palette)
  5. Message-ID: <1993Jan11.103212.3275@odin.diku.dk>
  6. Date: 11 Jan 93 10:32:12 GMT
  7. References: <16329@goanna.cs.rmit.oz.au>
  8. Sender: gogol@rimfaxe.diku.dk
  9. Organization: Department of Computer Science, U of Copenhagen
  10. Lines: 41
  11.  
  12. steveh@goanna.cs.rmit.oz.au (Steven Hayes) writes:
  13.  
  14. >Hi Netters,
  15.  
  16. >I'm sure this has been posted about before, but I couldn't remeber the 
  17. >solution to the problem, so...
  18.  
  19. >I've been writing a image viewing program for OS/2 2.0 which uses the
  20. >palette manager. Its pretty simple at the moment - displays pgm format images
  21. >of any size and 'depth' and lets you scroll around the image in a window.
  22.  
  23. >Everything was whoopy (sassi, froody ;-) until I added a menu to the window.
  24. >Now when a drop-down menu goes away the portion of the client area obscured
  25. >by the menu gets redrawn with an incorrect palette. The only repaint
  26. >messages that don't work properly are when the obscuring window uses the
  27. >SAVEBITS option (which doesn't actually cause a WM_PAINT message to get
  28. >sent, instead the window 'remembers' what is was covering)
  29.  
  30. >So, what do I have to do to insure that SAVEBITS redraws work with the correct
  31. >palette entries?
  32.  
  33. >Cheers
  34.  
  35. >Steve
  36. >-- 
  37. >   Steven Hayes                                    |  steveh@rmit.edu.au
  38. >   Royal Melbourne Institute of Technology (RMIT)  |  +61 3 660-2693
  39.  
  40. The problem with SAVEBITS obscuring the palette is, according to the
  41. discussion on the net, a driver bug in the palette manager, which 
  42. strangely enough seems to be present in all the drivers that implement
  43. palette management! Evidently there is no solution at present, though
  44. there is a rather brute workaround: If you omit the SAVEBITS flag, your
  45. window wikk receive a WM_PAINT message when it needs to be redrawn after
  46. having been covered by a application menu. You should of course make
  47. sure that your WM_PAINT routine redraws the relevant parts of the window.
  48.  
  49. Hope this helps
  50.  
  51. Peter Skov Knudsen, email gogol@diku.dk
  52. Computer science student, University of Copenhagen
  53.