As far as my research reading hundreds of back posts on the Lyris server
goes, I don't think this topic was ever answered.
I have saved BMPs to a PDB file. Having done that, I want to display
the BMPs from the PDB file. I created the PDB file with PilRC. An
Internet utility pdbdump.exe allowed me to verify that the PDB was
created ok. (I think its ok).
Now the task is to display the BMP data from the PDB file using
WinDrawBitmap. My code looks like this:
Void DisplayBMP(Int BitmapNum)
{
VoidHand hBitmap;
BitmapPtr p;
DmOpenRef gDB = 0;
gDB = DmOpenDatabaseByTypeCreator('data','A123', dmModeReadOnly);
if (gDB) {
hBitmap = DmQueryRecord(gDB, BitmapNum);
if (hBitmap) {
p = (BitmapPtr) MemHandleLock (hBitmap);
WinDrawBitmap (p, x, y);
MemPtrUnlock(p);
DmCloseDatabase(gDB);
}
}
The above code crashes at p = (BitmapPtr) MemHandleLock (hBitmap). Note
here error cases have been omitted for brevity.
There are numerous examples of source code for reading PDB files on the
Internet - the problem is all of them I have seen so far are for the
Microsoft Windows environment. Give Palm OS a hand....
Michael Yokoyama
Palm Powered Expert Guide - Japan
Mountainside Productions
Click here to study Japanese! > KanjiKun1 at Mountainside Productions
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/