Recent versions of the ContDB library support ContactLists which allow the user to select more than one contact at a time, either by selecting contacts one by one or by choosing contact groups. This feature is available on devices with version numbers "Responder Build 4...." and higher. See Software Version Numberfor information about finding out the software version of the user's device.)
To create such a ContactList, give it the hint
HINT_CONTACT_LIST_NON_EXCLUSIVE_LIST
.
If your application is running on a
device recent enough to support contact groups, then
ATTR_CONTACT_LIST_ALLOW_GROUP_AS_CALL_TYPE
will allow the user to select a group.
There are two ways to obtain the list of selected contacts:
CLF_SELECT_CONTACT_NUMBER
in
ATTR_GEN_CONTROL_REQUIRE_UI
, and set
ATTR_CONTACT_LIST_NOTIFY_MULTIPLE_CONTACTS_SELECTED_MSG
to the
message which will be sent whenever one or more contacts are selected from
the contact list. This message must be of the prototype:@prototype void CONTACT_LIST_NOTIFY_MULTIPLE_CONTACTS_SELECTED_MSG( MemHandle block = cx, word num = dx);
The passed memory handle block will contain the set of
ContactListSelectedEntry
s, and num will contain
the number of these entries.
Your method must free the passed memory block.
ContactList
directly.
Call MSG_CONTACT_LIST_GET_IDS_OF_SELECTED_RECORDS
;
the ContactList
will return a
ContactListSelectedRecordsData
structure containing
the number of selected entries and the handle to a memory block
containing the IDs of the selected entries stored as
ContactListSelectedEntry
structures.