> > The bmp conversion code -------
> > BitmapType *bmpP;
> > WinHandle win;
> > Err error;
> > RectangleType *onScreenRect;
>
> what do you initialize this to? :)
>
> you need to specify the rectangle contents that
> you want to copy.
> right now, your just passing a pointer.. which
> probably contains
> garbage... you are lucky your not getting bus
> errors :)
oh! i was getting those errors .....but I removed
them... ;)
I get ur point....but see this....
WinSetDrawWindow(win);
drawHand = WinGetDrawWindow () ;
WinCopyRectangle (drawHand, win, &bounds , 0, 0,
winPaint);
WinSetWindowBounds(win, &bounds);
So, this WinCopyRectangle is not doing that....??
(I changed to &bounds as u said...)
>
> you should declare the contents of onScreenRect!
>
> ---
> RectangleType onScreenRect = { { topLeft, topLeft },
> { extent, extent }};
Should I do that in globals.... Doing just this in the
function gets u some error.....
> ---
>
> and then pass it to the routine using
> &onScreenRect
>
I did that..... but I think something's going wrong
elsewhere........
WHat abour my retrieve function......is this fine....
if (DmNumRecords ( DrawDB ) > 0 )
{
theRecHandle = DmGetRecord ( DrawDB, theIndex );
if (theRecHandle)
{
theRecPtr = MemHandleLock( theRecHandle );
theSize = MemPtrSize(theRecPtr);
bmpP = MemPtrNew( theSize );
MemMove( bmpP, theRecPtr, theSize );
MemHandleUnlock( theRecHandle );
DmReleaseRecord (DrawDB, theIndex, false) ;
}
}
if ( bmpP )
{
WinDrawBitmap(bmpP, 0,0);
}
I am showing the DB part as well....
Thanx Su
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/