Previous Page Table of Contents Index Next Page

Palm OS SDK Reference


Palm Logo 22 Miscellaneous User Interface Functions

This chapter provides descriptions of miscellaneous user interface functions. You can find declarations for the functions described in this chapter in the header files PhoneLookup.h, and UIResources.h.

Miscellaneous User Interface Functions




PhoneNumberLookup

Purpose

This routine calls the Address Book application to lookup a phone number.

Prototype

void PhoneNumberLookup (FieldType *fldP)

Parameters

  fldP
Field object in which the text to match is found.

Comments

When trying to match a field, this function first tries to match selected text.

  • If there is some selected text, the function replaces it with the phone number if there is a match.

  • If there is no selected text, the function replaces the text in which the insertion point is with the phone number if there is a match.

  • If there is no match, the function displays the Address Book short list.

Result

Nothing returned; it's locked.

Compatibility

Implemented only if 2.0 New Feature Set is present.



ResLoadConstant

Purpose

Load a constant from a 'tint' resource and return its value.

Prototype

UInt32 ResLoadConstant (UInt16 rscID)

Parameters

  -> rscID
The ID of the 'tint' resource (symbolically named constantRscType) to load.

Result

The four-byte value of the constant in the resource, or 0 if the resource could not be found. The return value may be cast as necessary.

Comments

Use this function to load constant values that are stored as 'tint' resources. (All open resource databases are searched for the resource ID you specify.) You should store a constant value as a resource when its value changes depending on the locale.

As an example, consider the maximum length of the Alarm Sound trigger label in the Datebook application's preferences panel. The list displayed by this trigger uses the localized name for each sound stored in the system. Because localized names are used, the maximum length that the Datebook application allows for the label differs depending on the current locale. The maximum length is stored as a resource constant so that each overlay database can specify a different value for the constant.

Compatibility

Implemented only if 3.5 New Feature Set is present.

See Also

DmGetResource, DmGet1Resource



ResLoadForm

Purpose

Copy and initialize a form resource. The structures are complete except pointers updating. Pointers are stored as offsets from the beginning of the form.

Prototype

void* ResLoadForm (UInt16 rscID)

Parameters

  rscID
The resource ID of the form.

Result

The handle of the memory block that the form is in, since the form structure begins with the WindowType, this is also a WinHandle.



ResLoadMenu

Purpose

Copy and initialize a menu resource. The structures are complete except pointers updating. Pointers are stored as offsets from the beginning of the menu.

Prototype

void* ResLoadMenu (UInt16 rscID)

Parameters

  rscID
The resource ID of the menu.

Result

The handle of the memory block that the form is in, since the form structure begins with the WindowType this is also a WinHandle.



Palm OS SDK Reference

  Previous Page Table of Contents Index Next Page  

This is page 24 of 85 in this book

Palm Computing Platform Development Zone
Copyright © 2000, Palm, Inc. All rights reserved.