Ben Combee a écrit :

> At 10:29 PM 2/19/2005, you wrote:
> >When my app initializes its preferences for the first time, it computes
> >color indexes based on certain RGB values. By calling WinRGBToIndex, I
> >am sure to get indexes based on the current screen resolution. This
> >works fine on real devices, but POSE brings up a fatal alert (with no
> >Continue button, just Debug and Reset) stating that I called a Win API
> >before establishing a valid draw window. I'm not drawing anything, just
> >performing RGB conversions.  Should I worry? Since I found no way of
> >turning off this specific error detection, I should minimaly detect
> >whether I'm running on POSE and skip that code that prevents any further
> >debugging.
>
> The pointer to the palette table used in the RGB lookup is in the current
> draw window structure, so without a draw window, the system can't do the
> conversion.  As Chris noted, setting a draw window based on the full screen
> is the proper approach to get something setup in the absense of a drawn form.

Even that is not enough. I tried calling WinSetDrawWindow(WinGetDisplayWindow())
just before calling my init routine, and yet, POSE still stops on the first call
to WinRGBToIndex again asking for a valid draw window.


--
Luc Le Blanc


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to