> Hmm. Are people ignoring me, or do my messages not get through.
> Either way, Shaw Cable sucks. ;) I really do need help with this
> problem...
we got the email (at least, this is the second copy for me) :P
just too busy to post any solutions/answers *g*
> 01 FtrGet ( appCreator, 2048, (UInt32 *)&iconRsrc );
> 02 if ( iconRsrc ) DmCloseDatabase(appRsrc);
> 03 error = DmCreateDatabase(0, "QBSharedIcons", appCreator,
> iconDbType, true);
> 04 iconRsrc = DmOpenDatabaseByTypeCreator (
> iconDbType, appCreator, dmModeReadOnly );
> 05 if ( !error ) {
> 06 CommandBarIconH = DmGetResource ( bitmapRsc, BarBackupAllBitmap );
> 07 DmAttachResource (
> iconRsrc, CommandBarIconH, bitmapRsc, BarBackupAllBitmap+3 );
> 08 }
> 09 FtrSet ( appCreator, 2048, (UInt32)iconRsrc );
>
> - Lines 1 and 2 check for the existance of an already open icon database.
> - Line 3 creates a new icon database. Yes, I don't check to see if the
file
> exists because the OS already does ;)
> - Line 4 opens either the newly created database, or the previous one.
> - Line 5 checks to see if the database was created.
> - If the database was created, line 6 gets a handle to the bitmap in my
> application. Line 7 attempts to attach that handle to the new
database.
> Can you not have one handle in multiple databases? It'd be spiffy, but
I
> could see why they wouldn't like me to do this...
this is probably where you get your problems. when i copy a resource, i
just dont do it this way :)
---
dbRef = DmOpenDatabase(card, dbID, dmModeReadWrite);
// remove old
resIndex = DmFindResource(dbRef, resType, resID, NULL);
if (resIndex != -1)
DmRemoveResource(dbRef, resIndex);
// write new
newHandle = DmNewResource(dbRef, resType, resID,
MemHandleSize(memHandle));
DmWrite(MemHandleLock(newHandle), 0, srcData, MemHandleSize(memHandle));
MemHandleUnlock(newHandle);
DmReleaseResource(newHandle);
DmCloseDatabase(dbRef);
---
> - Line 9 copies the pointer to the open resource file so I can check
later.
>
> Ideas, anyone?
try to attach the resource as above :)
merry xmas and happy new year, best wishes to all
---
Aaron Ardiri [EMAIL PROTECTED]
CEO - CTO +46 70 656 1143
Mobile Wizardry http://www.mobilewizardry.com/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/