IContactManagerInterop::ShowContactCardForWindow method
Displays the UI for a contact on the specified window.
Syntax
HRESULT ShowContactCardForWindow( [in] HWND appWindow, [in] IUnknown *contact, [in] RECT const *selection, [in] FLYOUT_PLACEMENT preferredPlacement );
Parameters
- appWindow [in]
-
Type: HWND
The HWND of the foreground window of the app from which the contact card is launched and where focus is returned when the contact card is dismissed.
- contact [in]
-
Type: IUnknown*
A pointer to the contact object. Use a Windows.ApplicationModel.Contacts.Contact object but cast to IUnknown here because classic COM IDL can't use Windows Runtime types.
- selection [in]
-
Type: RECT const*
The Rect is the rectangular area of user selection (for example, pressing a button), around which the operating system displays the contact card, not within that rectangular area. For example, if an app uses a button to show the contact card, pass the Rect of the button so the contact card displays around the button, not overlapping it.
- preferredPlacement [in]
-
Type: FLYOUT_PLACEMENT
A FLYOUT_PLACEMENT-typed value that describes the preferred placement of the contact card.
Return value
Type: HRESULT
ShowContactCardForWindow returns:
- S_OK if the contact card is successfully displayed
- E_POINTER if appWindow is NULL or contact is NULL or selection is NULL
- E_INVALIDARG if contact isn't a Windows.ApplicationModel.Contacts.Contact object or preferredPlacement is an invalid enumeration value
Other HRESULT values are possible.
Requirements
|
Minimum supported client |
Windows 8.1 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2012 R2 [desktop apps only] |
|
Header |
|
|
IDL |
|
See also