On Friday 29 June 2001 19:20, you wrote:
> if((PalmOSVersion < 5)&&(PalmOSVersionMajor < 4))
> MemMove(bitmapP+1,winP->displayAddrV20, rowBytes * height);
> else
> {
> bitmapSrs = WinGetBitmap (winP);
>
> >>>>> MemMove(bitmapP,bitmapSrs,
>
> MemPtrSize(bitmapSrs));<<<-----------m505 crashes here************
In fact, if I have understood your code, it crash just on the previous line,
which is the same, in fact, in the compiler point of vue.
The problem is that you forget to call BmpGetBits, to get the address of the
screen.
So you should do : bitmapSrs = BmpGetBits( WinGetBitmap (winP) );
Or maybe better, check the result of WinGetBitmap before calling BmpGetBits,
as it can fail.
To retreive the addr of a screen, I would suggest you the following code,
coming from SDK exemples :
if ( PalmOSVersion < PalmOS35 )
{
WindowType *winP;
winP = WinGetWindowHandle( win );
ptr = winP->displayAddrV20;
}
else
{
BitmapType *Bitmap;
Bitmap = WinGetBitmap( win );
if ( Bitmap ) ptr = BmpGetBits( Bitmap );
}
This work whatever PalmOS version you are using and POSER will not complain !
:)
--
Daniel Morais
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/