ITipAutocompleteClient::PreferredRects method

Allows the client to suggest where to position the auto complete list to avoid overlapping the Input Panel.

Syntax

HRESULT PreferredRects(
  [in]      RECT *prcACList,
  [in]      RECT *prcField,
  [out]     RECT *prcModified,
  [in, out] BOOL *pfShownAboveTip
);

Parameters

prcACList [in]

A rectangle, in screen coordinates, indicating the provider's preferred location and the size of the auto complete list user interface.

prcField [in]

A rectangle, in screen coordinates, indicating the location and the size of the focused field.

prcModified [out]

A rectangle based on the current state of the TIP and the preferred auto complete list location and size specified by prcACList.

pfShownAboveTip [in, out]

TRUE if the modified rectangle is to be shown above the Text Input Panel's target area; otherwise, FALSE. This value must be initialized to the provider's preferred orientation before the method is called.

Return value

This method can return one of these values.

Return code Description
S_OK
Success.
E_INVALIDARG
Call the ITipAutocompleteClient::RequestShowUI Method to set the popup auto complete list window before calling the ITipAutocompleteClient::PreferredRects Method.
E_FAIL
An unspecified error occurred.

Remarks

This is the method that the auto complete provider calls when it is about to show the auto complete user interface. The client modifies the provider's preferred rectangle specified by prcACList through prcModified argument.

Call the ITipAutocompleteClient::RequestShowUI Method to set the popup auto complete list window handle before you call PreferredRects. Failure to do so will cause an E_INVALIDARG error when calling PreferredRects.

Requirements

Requirement Value
Minimum supported client
Windows XP Tablet PC Edition [desktop apps only]
Minimum supported server
None supported
Header
TipAutoComplete.h (also requires Peninputpanel_i.c)
DLL
Tiptsf.dll

See also

ITipAutocompleteClient Interface

ITipAutocompleteClient::RequestShowUI Method

Text Input Panel Reference