Good advice.
Also, I don't see you checking the return value or error code of:
SavedRegion = WinSaveBits(&wholeScreenRect, &rectErr);
so my guess is that SavedRegion is NULL, hence WinRestoreBits() fails.
Dennis Leas
-------------------
[EMAIL PROTECTED]
----- Original Message -----
From: "Sean Charles" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Tuesday, March 04, 2003 1:28 PM
Subject: Re: A quite complicated problem
>
> On Tuesday, March 4, 2003, at 05:43 PM, liuchoi wrote:
>
> > I would like to let the user to select a particular area in a graph
screen
> > (The graph screen is now exists). Now I have made a feature that enables
> > the
> > user to "drag" a dotted rectangle using WinDrawGrayRectangleFrame(),
> > like the one in windows for selecting icons.
> >
> Try using WinSetDrawMode( winInvert ) and WinPaintRectangleFrame(); for an
> easier life. You *may* need to set the color to black or white before
> drawing. The advantage is that, being XOR based, you only have to draw the
> rectangle again to remove it from the screen. This means that you should
> be able to have your selection rectangle and not have to save the current
> state of the window.
>
> As we couldn't see the initialisation of wholeScreenRect it's hard to say
> about what might be causing your problems.
>
> Sean Charles.
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/