I forgot to mention that they APPEAR in the correct coordinate locations on
the form, but when they refresh (via clicking or via updating the
scrollbar) - the system redraws them in the offset positions.

any help from anyone would be greatly appreciated for this.  I really don't
like using a full-screen form for what I'm doing, but I have no choice..

thanks - bill


>
> I have a question that is in regards to a previous post I had, in summary
> this is it:
> I have (created with the MW constructor) it has a button and a scrollbar
on
> it.
> The coordinates for the form are: 2,2 and 156,156.
> The idea is to have a 2 pixel border around the form.
>
> If I do nothing and just show the form, the form looks and acts as
expected.
> (e.g. if I click the button, it turns black, if I update the scrollbar it
> updates) - Note: nothing moves.
>
> BUT, if I add a function that does this:
>
> WinHandle hwinBuffer = WinCreateOffscreenWindow (156, 146, nativeFormat,
> &error);
> if ( hwinBuffer != NULL )
> {
>       WinSetDrawWindow(hwinBuffer);
>       WinEraseWindow();
>         // perform some WinDrawChars functions
>       WinSetDrawWindow( WinGetDisplayWindow() );
>       RectangleType rect;
>       rect.topLeft.x = 0;
>       rect.topLeft.y = 20;
>       rect.extent.x = 156;
>       rect.extent.y = 126;
>       xDisp = 2;
>       yDisp = 18;
>       MyWinCopyRectangle( hwinBuffer, NULL, &rect, xDisp, yDisp,
winPaint );
> }
>
>  if (hwinBuffer)
>       WinDeleteWindow(hwinBuffer, false);
>
> Then draw the form, both my button and my scrollbar are now off by 2
pixels.
> (e.g. if I click the button, a black button appears -2,-2 pixels from the
> actual button, same goes for the scrollbar)
>
> Of course this does not happen while using a 0,0 and 160x160 form.
>
> Therefore I make the assumption that for some reason when the system calls
> the CtlHandleEvent function, the coordinates of my controls are screen
based
> and not Form based, therefore when it refreshes the controls, it puts them
> where it thinks they should be..
>
> My question is:  Is this an OS issue or a MWCW issue? - Is there a
> workaround?
>
> thanks - bill
>
>
>
>
>
>



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

Reply via email to