At 03:39 PM 10/9/2004, you wrote:
This is what I have so far:

MemHandle bmphandle = DmGetResource(((UInt32)'T'<<24)|((UInt32)'B'<<16)|((UInt32)'M'<<8)|(UInt32)('P'),1000);
MemPtr *bmpptr;
bmpptr = MemHandleLock( bmphandle );
WinDrawBitmap( (BitmapType *)bmpptr, 50, 50 );


I got that DmGetResource line from the zodiacgamer forums... But I'm not sure if my bitmap is of the "TBMP" type. And when it gets to the MemHandleLock line, it gives this error:

First, the type can be expressed as 'Tbmp', or even better, the macro bitmapRsc from UIResource.h.


ANSI C++ forbids implicit conversion from `void *' in assignment

You need to cast the result of MemHandleLock to the right type, e.g.

    bmpptr = (BitmapType *)MemHandleLock( bmphandle );

and declare your bmpptr as a BitmapType rather than a MemPtr.



-- Ben Combee, Technical Lead, Developer Services, PalmSource, Inc.
   "Combee on Palm OS" weblog: http://palmos.combee.net/
   Developer Fourm Archives:   http://news.palmos.com/read/all_forums/


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

Reply via email to