Hey, I noticed that exact some thing yesterday! I just threw a WinResetClip() at the 
top of my MainFormUpdate() routine and it works now. I checked out this behavior on a 
3.3 ROM and found the same behavior...

It would be nice to know WHY this happens, though...

Alan

>I am noticing some wierd behavior in the color POSE and the debug OS 3.5 and I am 
>wondering what the right thing to do is.
>
>The problem occurs when a FrmUpdateEvent is sent to the form, like after doing a 
>find, and then canceling the find dialog. 
>
>The first thing I noticed is that the window attached to the current active form, is 
>NOT the same as what you get when you call WinGetActiveWindow() at this point. It 
>looks like the WinGetActiveWindow is the Find window, but I can't quite tell. If I 
>draw to the WinGetActiveWindow at this point, the drawing is all shifted down to the 
>top of where the Find window used to be...it is shifted, not clipped.
>
>So, to get around this, I instead got the window out of the active form, and drew to 
>that. Now the problem is that I first call FrmDrawForm, like I am supposed to do, and 
>then start drawing. The FrmDrawForm erases the whole screen, but subsequent drawing 
>is now all CLIPPED to where the Find window used to be. I checked the window 
>structure, and the clipping rectangle is set to where the Find window used to be, so 
>I suspect the clipping is what is supposed to happen. However, it appears the 
>FrmDrawForm is ignoring the current clipping rectangle and blasting the whole screen.
>
>What should I do, reset the clipping rectangle so that my drawing doesn't clip any 
>more?
>
>Here is some source code as an example. The _currentScreen is an offscreen window.
>
>static void DrawingDrawForm(void)
>{
>       RectangleType   r;
>       UInt8*                  pLock = NULL;
>       IndexedColorType curForeColor;
>       FormPtr                 pForm;
>       WinHandle               hWin;
>               
>       pForm = FrmGetActiveForm();
>       FrmDrawForm(pForm); // blasts the whole form
>       
>       //hWin = WinGetActiveWindow(); // not really the active form's window any more
>       hWin = FrmGetWindowHandle(pForm);
>       
>       RctSetRectangle (&r, 0, 0, 160, 140);
>       WinCopyRectangle (_currentScreen, hWin, &r, 0, 0, scrCopy); // clipped to 
>active window's clipping rect
>}
>
>Thanks,
>
>Shannon
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>Hands High Software
>Award winning software for the Palm(tm) Computing platform 
>
><http://www.handshigh.com/> 
>
>[EMAIL PROTECTED]
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>--
>For information on using the Palm Developer Forums, or to unsubscribe, please see 
>http://www.palm.com/devzone/mailinglists.html


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to