Compartilhar via


Contact Chooser Flags

4/8/2010

These flags define the behavior of the Contact Chooser.

A bitmask created from the Contact Chooser flags is passed to the ChooseContact function in the dwFlags member of the CHOOSECONTACT Structure.

Flag Value Description

CCF_DEFAULT

0x0000

Default view. The Property Chooser dialog box will be used when the selected Contact item has values for two or more properties specified in CHOOSECONTACT::rgpropidRequiredProperties.

The New Contact menu item is displayed.

CCF_HIDENEW

0x0001

Hides the New Contact menu item, and disables the ability to create a new Contact item from the Contact Chooser control.

CCF_CHOOSECONTACTONLY

0x0002

When set, the Property Chooser dialog box does not appear.

The first non-blank property specified in CHOOSECONTACT::rgpropidRequiredProperties is chosen.

CCF_CHOOSEPROPERTYONLY

0x0004

When set, the Contact Chooser dialog box does not appear.

The OID of the Contact to use is retrieved from the CHOOSECONTACT::oidContactID property.

> [!NOTE] > When you set both the CCF_RETURNCONTACTNAME and CCF_CHOOSEPROPERTYONLY flags, the contact name is not returned.

CCF_RETURNCONTACTNAME

0x0008

When set, the contact name is returned in the CHOOSECONTACT::bstrContactName property.

> [!NOTE] > When you set both the CCF_RETURNCONTACTNAME and CCF_CHOOSEPROPERTYONLY flags, the contact name is not returned.

CCF_RETURNPROPERTYVALUE

0x0010

When set, the property value is returned in the CHOOSECONTACT::bstrPropertyValueSelected property.

CCF_FILTERREQUIREDPROPERTIES

0x0020

When set, contact items without Name or FileAs values are dynamically filtered from the Contact Chooser List View (that is, they do not appear in the list). As such, contact items that have a value for any one of the following propertieswill appear in the Contact Chooser List View.

PIMPR_FIRST_NAME

PIMPR_LAST_NAME

PIMPR_YOMI_FIRSTNAME

PIMPR_YOMI_LASTNAME

PIMPR_FILEAS

PIMPR_YOMI_FILEAS

The Contact Chooser List View is filtered by the communication method specified in the rgpropidRequiredProperties member of the CHOOSECONTACT Structure, when calling the ChooseContact function. For information on communication methods, see ChooseContact Property ID's.

For example, if some of your contacts just have e-mail addresses, and some of your contacts just have telephone numbers, then a rgpropidRequiredProperties value of ContactProperty.AllPhone will allow only those contact items with phone numbers to appear in the Contact Chooser List Viewin addition to those that have Name or FileAs values of CCF_FILTERREQUIREDPROPERTIES is set.

CCF_NOUIONSINGLEORNOMATCH

0x0040

When set, neither the Contact Chooser, nor the Property Chooser dialog boxes display for a single match, or for no matches.

CCF_NOUI

0x0080

When set, neither the Contact Chooser, nor the Property Chooser dialog boxes display.

> [!NOTE] > When CCF_CHOOSECONTACTONLY and CCF_NOUI are both set, CCF_NOUI takes precedence.

CCF_ENABLEGAL

0x0100

When set, an entry point to Global Address Book (GAL) is added as a List View item, and also as a menu item. The List View item is located below New Contact if CCF_ALLOWNEWCONTACTSELECTION is set.

CCF_ALLOWNEWCONTACTSELECTION

0x0200

When set, adds the New Contact option to the top of the Contact Chooser List View.

Remarks

The individual values (constants) in a set of flags follows the sequence 20 , 21, 22, …2n. This approach allows each value to be expressed as a byte with only one bit set (that is, one bit has a value of 1, and the other seven bits all have a value of 0). When an entire set of flags is expressed as bytes, and no two of them have a bit set in the same position, then you can combine these flags using the bitwise OR operator. The result is a "complex bit mask"—a byte with a bit pattern in which the positions of the 1s indicates the flags you want. This is equivalent to adding multiple flags together (that is, I want to set this flag, plus that flag, plus that one…). The benefit is that you can use a complex bit mask in place of an individual flag.

This means you can load the CHOOSECONTACT Structure's dwFlags member with more than one Contact Chooser flag value. For example, if you wanted to give users the ability to create new contact items from the Contact Chooser control, and in addition you only wanted the required properties to appear in the control, then you would achieve it by logically OR-ing the following two flags together:

(CCF_HIDENEW | CCF_FILTERREQUIREDPROPERTIES)

Requirements

Header pimstore.h
Library Pimstore.lib
Windows Mobile Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later

See Also

Reference

Pocket Outlook Object Model Flags
ChooseContact
CHOOSECONTACT Structure
Contact Property IDs
PIMPR_CONTACTTYPE