Hello All,
I got the code to get my application's name at run-time frm KB. How to
replace tAIB (application icon identifer) to some other bitmap resource?
static Err FindApplicationName()
{
LocalID theDBID;
UInt16 theCardNo;
MemHandle theStringHandle=0;
char theAppName[dmDBNameLength];
Err theErr;
// Get the database Local ID and card number of our application.
theErr = SysCurAppDatabase( &theCardNo, &theDBID );
if (!theErr)
{
// Try to get db name from tAIN resource
theStringHandle = DmGetResource(ainRsc, ainID);
if (theStringHandle != NULL)
{
StrCopy(theAppName, (char *)MemHandleLock(theStringHandle));
FrmCustomAlert(AaaAlert,theAppName,"theAppName FROM TAIN",NULL);
MemHandleUnlock(theStringHandle);
DmReleaseResource(theStringHandle);
}
else
{
// No tAIN resource, so use the name of the application's database
DmDatabaseInfo( theCardNo, theDBID, theAppName, NULL, NULL,
NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL);
//FrmCustomAlert(AaaAlert,theAppName,"theAppName FROM APP
DB",NULL);
}
}
return theErr;
}
Jeff
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/