It's pretty easy...

Something like this should do it:


MemHandle gAppNamesH = NULL;
UInt16 gNumApps = 0;

SysCreateDataBaseList( 'appl', 0, &gNumApps, &gAppNamesH, true );

LstSetDrawFunction( GetObjectPtr( ListID ), ListDrawDataFunc );
LstSetListChoices( GetObjectPtr( ListID ), NULL, gNumApps);


Then ListDrawDataFunc simply draws each item... don't forget you need to
lock/unlock the gAppNamesH handle as appropriate.


Gavin.

matro <[EMAIL PROTECTED]> wrote in message news:94691@palm-dev-forum...
>
> hi there,
>
> I'd like to have a listbox filled with installed applications, such as
> the preferences->button dialog, when an user decides which app to
> associate with an hw button.
>
> I read about the SysCreateDatabaseList, so I'm asking you some source
> code which correctly queries the system and loads a listbox: because I
> think this is a common situation, perhaps someone has got an example
> in order to save time.
>
> thank you.
>
> --------
>
> MATRO
>
> RealPopup, the freeware winpopup replacer
> http://www.realpopup.it
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to