Resources

Top-level properties

There are some singleton properties that are associated with the project itself, and not one of the resources. These are automatically used by the application, i.e. you don't need to do anything in your code to make these apply.

You can edit these by double-clicking on the root element of the resource tree (the one that initially reads Application).

Properties

Icon caption

The string that will be displayed in the application launcher and the various statistics windows (e.g. the memory usage list)

Version

The string displayed in the Version view of the Info window

Vendor ID

The four character long, case-sensitive vendor ID's should be globally unique -- contact PalmOS.com to register your vendor ID.

String

String resources are used to store static, user-visible strings, separated from the code. To access them from your application, use the following code:

Char *msg = MemHandleLock (DmGetResource (strRsc, string_id));
/* Do something with the string */
MemPtrUnlock (msg);
      

Properties

Resource ID

A unique string ID used for accessing the resource at run-time from the program

String

The contents of the string

Dialog

A dialog is a modal window, with a title, some text, an icon, and one or more buttons. It can also include a reference to a string resource that is used in the pop-up help.

Properties

Resource ID

A unique string ID used for accessing the resource at run-time from the program

Title

The title of the dialog, displayed in the title bar

Type

Specifies the icon shown in the dialog. Please see the PalmOS Reference for a detailed description on when to use which mode

Help ID

The (optional) resource ID of a string that describes the usage of the dialog. If specified, the title bar of the dialog will include a ? button to display the help.

Text

The text to be displayed in the dialog (to the right of the dialog icon). You can use up to three ^ marks (^1, ^2 and ^3 to indicate placeholders for strings that are filled at run-time.

Buttons

The Buttons list is an ordered list of strings. Each of these strings will create a button at the bottom of the dialog. The return value of FrmAlert will be the index of the button pressed (starting at 0).

If the user exits the dialog by switching to another application, FrmAlert will return with the default button's index.

Menu bar

A menu bar is a horizontal strip on the top of the screen, containing drop-down menus. Since selecting a menu item takes numerous clicks, often-used operations should be accessable through other means.

The menus are single-level deep. Each menu item has a unique ID, a user-visible label, and an optional shortcut letter, which can be accessed using the shortcut (/) graffiti sign.

The actual implementation of the menu items are done by looking at the itemID in the menuEvent handler of the form owning the menu bar.

Properties

Resource ID

A unique string ID used for accessing the resource at run-time from the program

Form

Form is the PalmOS term for windows. A form represents a rectangular area on the screen that can hold an arbitary number of widgets. The maximum size of a form is 160 pixels high by 160 pixels wide: this is the same as the size of the Palm screen itself.

You can also use a form as a modal dialog via the FrmDoDialog function. This works just like FrmAlert and will block your application until a button is pressed on the form. The return value of the function will be the ID of the button pressed (or the default button's ID if the form is closed by switching to another application).

Properties

Resource ID

A unique string ID used for accessing the resource at run-time from the program

Title

The title of the form, shown on the top of it. Its actual rendering is dependant on the form's modalness.

If not set, some form decorations are not drawn, thus giving you even more screen real estate to place your widgets on. Category selectors are often placed in the title area's right edge.

Help ID

If this is set to a valid string resource, and the form is modal, a help button is displayed in the title area of the form, which, when clicked, pops up a dialog containing the help text.

Menu ID

WRITE ME

Modal

WRITE ME

Frame

WRITE ME

Save behind

If checked, the form will save the screen contents before it is drawn, and then restore it when closed. Use this for pop-up dialogs, otherwise they might cause artifacts on the screen.

X

Horizontal position, in pixels, counted from left to right. Due to the size of the screen of PalmOS devices, this is an integer value between 0 and 159.

Y

Vertical position, in pixels, counted from top to bottom. Due to the size of the screen of PalmOS devices, this is an integer value between 0 and 159.

Width

Horizontal size, in pixels. Due to the size of the screen of PalmOS devices, this is an integer value between 1 and 160.

Height

Vertical size, in pixels. Due to the size of the screen of PalmOS devices, this is an integer value between 1 and 160.