tried writing the form into an offscreen buffer
and copyin' it to the active window?
"Kelly Morrison" <[EMAIL PROTECTED]> wrote in message
news:60760@palm-dev-forum...
>
> I'm trying to eliminate a temporary "false color" flash when changing
> from one form with a custom palette to another form with a different
custom
> palette, and I was looking for advice on the best way to accomplish this.
>
> Basically, I have an application with several screens, each with its
own
> custom palette. I hacked pilrc to produce bitmaps that use my custom
> palettes without embedding the palettes themselves in the Tbmp resources,
so
> they load and display quickly, and I can set the palette using
WinPalette()
> and view the bitmaps with no problem: they look great. Unfortunately, I'm
> having problems figuring out *where* to change palettes so I don't get a
> quick glimpse of the image with false colors. Using a common palette for
all
> of the forms in my application is not an option (the bitmaps are very
> different).
>
> Here's what I tried so far:
>
> 1. Setting the custom palette before FrmDrawForm() in frmOpenEvent.
> Not only does this violate Palm's programming rules, I get errors in
> POSE. So much for this one.
>
> 2. Setting the custom palette after FrmDrawForm() in frmOpenEvent.
> No good. FrmDrawForm() draws the resouces in my .rcp file, and when I
> switch the palette afterwards, they don't show properly. I could probably
> update the screen here, but it seems inefficient and wasteful to have the
> screen draw twice in a row at the beginning of each form load. Similarly,
I
> know there's an event generated when the palette changes, so I could
refresh
> the screen when I get that event, but again... it seems wasteful for the
> form to have to draw twice in a row.
>
> 3. Erasing the form and then switching palettes in frmCloseEvent.
> I tried using FrmEraseForm() after getting a frmCloseEvent. Nope, got
an
> error about not having a drawing surface.
>
> 4. Setting the palette to all whites or all blacks in frmCloseEvent.
> This hides the image and gives me a blank screen until the next form is
> drawn. Unfortunately, it takes me right back to problem #2 above when I
load
> the next form, and worse, I now have to remember to set either a custom
> palette or the standard palette at the beginning of each form that might
> load next.
>
> Any suggestions? It feels like I'm *so* close I can taste it. :) Thanks
in
> advance for any help!!!
>
> ------> kell
>
> P.S. I just *know* I'm going to have a similar problem with system dialogs
> (e.g., "Find") popping up when I have a custom palette installed... :)
>
>
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/