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