1. Let me explain what I'm trying to accomplish by leaving it open. Probably you would advise me some more robust way. I want my application to be able to wake up (as resident application in DOS world) through the command bar menu. So, I want (even with my application quit) to show an icon in command bar and get notifications related. The problem is that command bar icons are drawn outside the scope of my application, so I have to keep some temporal database with my icon opened even if my application is not running, otherwise OS won't find bitmap resource with my icon. This approach works for all preCobalt devices.
I'm not sure that this technique will work under Cobalt. The new OS doesn't have a true concept of a resource database stack -- this is why all the Protein APIs that use resources require that you pass in a database reference from which it will grab resources.
Because of this, leaving your DB open doesn't really work to ensure that the bitmap is available for the toolbar. You probably will need to port your toolbar-based app to be a Palm OS Protein application; the new MenuCmdBarAddButton routine takes both a database reference and a resource ID for the bitmap to use.
-- Ben Combee, senior DTS engineer, PalmSource, Inc. Read "Combee on Palm OS" at http://palmos.combee.net/
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
