abDialog

This function launches the Address Book view specified in the ABDIALOGINFO structure.

Syntax

HRESULT abDialog ( LPDIALOGINFO lpABInfo );

Parameters

lpABInfo
[in/out] Long pointer to an ABDIALOGINFO structure.

Return Values

One of the values described in the following table is returned.

Return Code
Value
Description
S_NO_PHONE_NUMS 0x01000001 Contact has no valid phone numbers.
S_USER_NO_TO_DIAL 0x01000002 User answered “No” to the question, “Dial specified phone number?”
S_USER_ABORTED 0x01000003 User cancelled the call.
S_PHONE_ABORTED 0x01000004 Call was cancelled because of hardware problems.
S_CARD_DELETED 0x01000005 User deleted the contact.

Remarks

A user cannot open the address book directly to a specified contact and delete the contact.

The following code example shows how the Address Book main form allows the user to select a contact. After the user selects a contact by pressing ENTER on the contact name on the main form, another form appears that displays all of the phone numbers for the contact. When the user selects one of the phone numbers and presses ENTER, abDialog returns the CEOID that contains the object identifier of the contact the user selected and reads the specified name and surname from the database.

AbOpen(pFrmMgr);
ABDIALOGIN abDl = {
 NULL,
 0,
 NULL,
 ABV_MAINVIEW,
 0
};
abDialog(&abDl);
WORD wNumProp = 2;
CEPROPID cepi[] = {HHPR_GIVEN_NAME, HHPR_SURNAME};
PCEPROPVAL pcepv;
abRead(abDl.ceoid, &wNumProp, cepi, &pcepv);
abClose();

See Also

ABDIALOGINFO, abClose, abOpen, abRead