IContactManagerInterop::ShowContactCardForWindow method (shobjidl_core.h)
Displays the UI for a contact on the specified window.
Syntax
HRESULT ShowContactCardForWindow(
[in] HWND appWindow,
[in] IUnknown *contact,
[in] const RECT *selection,
[in] FLYOUT_PLACEMENT preferredPlacement
);
Parameters
[in] appWindow
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.
[in] contact
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.
[in] selection
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.
[in] preferredPlacement
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
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8.1 [desktop apps only] |
Minimum supported server | Windows Server 2012 R2 [desktop apps only] |
Target Platform | Windows |
Header | shobjidl_core.h |
See also
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για