Displays the UI for a contact on the specified window.
HRESULT ShowContactCardForWindow( [in] HWND appWindow, [in] IUnknown *contact, [in] Rect selection, [in] FLYOUT_PLACEMENT preferredPlacement );
- appWindow [in]
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]
- selection [in]
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]
A FLYOUT_PLACEMENT-typed value that describes the preferred placement of the contact card.
- 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.
Default browsers use ShowContactCardForWindow to specify an HWND from which the contact card is launched and where focus is returned when the contact card is dismissed.
Minimum supported client
|Windows 8.1 [desktop apps only]|
Minimum supported server
|Windows Server 2012 R2 [desktop apps only]|