Another note of interest: the bitmap that works is at address (in memory) 00E37B00, and the one that I get from the database is 03174878.
You don't think I have a dword boundary problem do you?? - if so, how do you think I can fix it? thanks - bill "Ben Combee" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > At 01:52 PM 1/29/2004, Fruber Malcome wrote: > >calling this function, seems to give me a bad bitmap. > > > >I'll provide some additional insight: > >If I call WinDrawBitmap on the pBmp, I get a perfect image. > > > >If I do the following: > >MemHandle resH = NULL; > >resH = DmGetResource( 'Tbmp', 501 ); > >BitmapPtr bitmap = (BitmapPtr)MemHandleLock(resH); > > > >Then call WinDrawBitmap on the bitmap - I get garbage. > > > >Also - is there no other way to load a resource rather than calling the > >above function that performs the unecessary process of searching resource > >databases for the bitmap rather than use one that I know is correct? > > DmGetResource1 will only search the topmost database. > > This should work, but its likely that you aren't saving the bitmap to your > record/resource appropriately. Is the bitmap coming from PilRC or another > resource compiler? If not, is it being saved from your app? When you save > your bitmap to a resource, do you write your own bitmap header and then > copy the bits? Did you follow the examples in the BitmapRsc code from the > palmsource Knowledgebase? Have you tried exporting your resource DB from > PalmSim or POSE and then viewing it with PRC Explorer? > > > -- > Ben Combee <[EMAIL PROTECTED]> > CodeWarrior for Palm OS technical lead > Palm OS programming help @ www.palmoswerks.com > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
