Wow, I just don't get it - here's some more information: I've verified that cbMem is correct - by comparing it to the actual bitmap header. so it is 320 rowbytes (160 across - 16bitdepth) and 32 rows (320x32), then what's not listed below is that I need to take into account the bitmap header - which is 10 bytes.
Within the debugger I compare pBmp and bitmap, they both seem to match. - why do you think I'm running into this problem? 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/
