The FrmDrawForm() is clearing the screen after you draw the bitmap, so do it first!

Also this is the hard way to draw a bitmap on a form. Why not specify the bitmap as a form object?

If you continue do this manually, you also have to put code on the frmUpdateEvent to redraw the bitmap after calling FrmDrawForm() yourself, and return handled=true, so the form manager doesn't overdraw your bitmap.


At 04:15 AM 7/8/2007, you wrote:
From: V. Sriram <[EMAIL PROTECTED]>
To: Palm Developer Forum <[email protected]>
Sent: Saturday, July 7, 2007 2:16:47 AM
Subject: WinDrawBitmap not working

Hi all,
I want to display bitmap on the form programatically. This is the code snippet:

MemHandle bitmapH;
bitmapH = DmGet1Resource('Tbmp', 1010);//I have 1010 in resources
if (bitmapH)
{
   BitmapType *bitmap;
   bitmap = (BitmapPtr)MemHandleLock(bitmapH);
   WinDrawBitmap(bitmap, 20, 20);
   MemHandleUnlock(bitmapH);
   DmReleaseResource(bitmapH);
   FrmDrawForm(pForm);
}
The code gets the image(it enters the if condition, I checked) but image is not getting displayed.

Roger Stringer
Marietta Systems, Inc. (www.rf-tp.com)


--
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to