I would like to be able to create a bitmap dynamically and then save it to a resource database. I have something like:
------------------------------ void SaveBitmap () { BitmapType *bmpP; WinHandle win; Err error; RectangleType onScreenRect; // making a simple b&w (depth=1) bitmap bmpP = BmpCreate(10, 10, 1, NULL, &error); if (bmpP) { win = WinCreateBitmapWindow(bmpP, &error); if (win) { WinSetDrawWindow(win); WinDrawLine (4,4,8,8); WinDrawLine (0,0,9,2); WinDrawLine (9,0,0,9); WinDrawPixel (3,3); // is it necessary to set the bounds? onScreenRect.topLeft.x = 0; onScreenRect.topLeft.y = 0; onScreenRect.extent.x = 9; onScreenRect.extent.y = 9; WinSetBounds(win, &onScreenRect); // now what? ------------------------------ And a couple of questions.. (1) Do I need to even set the bounds on this? (2) I can do a DmAttachResource ... but I need a handle to the bitmap. How do I convert the bitmap pointer to a handle? (3) Would it be better (or possible) to use DnNewResource to obtain a handle and then copy the bitmap into it? (That just seems inefficient.) Thank you for any help, Ellen _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/