ITextInputPanel::SetInPlaceHoverTargetPosition method

[ITextInputPanel is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Instead, use IInputPanelConfiguration. ]

Explicitly positions the Tablet PC Input Panel hover target in screen coordinates.

Syntax


HRESULT SetInPlaceHoverTargetPosition(
   int xPosition,
   int yPosition
);

Parameters

xPosition

The horizontal x-coordinate for the top left corner of the hover target, with no correction comb visible.

yPosition

The vertical y-coordinate for the top left corner of the hover target, with no correction comb visible.

Return value

This method can return one of these values.

Return codeDescription
S_OK

Success.

E_FAIL

An unspecified error occurred.

 

Remarks

There are no restrictions on where the hover target can be placed. The application is responsible for making sure the hover target stays on screen.

The SetInPlaceHoverTargetPosition method is synchronous. Positioning occurs before the method returns.

Examples

This C++ example implements an EN_SETFOCUS event handler for an Edit control, IDC_EDIT2. It first checks if an ITextInputPanel object, g_pTip, has been created. If it exists, it sets the position of the Input Panel hover target by calling the ITextInputPanel::SetInPlaceHoverTargetPosition Method. It then reports whether the call was successful to debug output using the TRACE macro.


void CCOMTIPDlg::OnEnSetfocusEdit2()
{
	if (NULL != g_pTip)
	{
		if (SUCCEEDED(g_pTip->SetInPlaceHoverTargetPosition(300, 300)))
		{
			TRACE("Call to SetInPlaceHoverTargetPosition() succeeded.\n");
		}
		else
		{
			TRACE("Call to SetInPlaceHoverTargetPosition() failed.\n");
		}
	}
    else
    {
        TRACE("ITextInputPanel object is NULL.\n");
    }
}


Requirements

Minimum supported client

Windows XP Tablet PC Edition [desktop apps only]

Minimum supported server

None supported

End of client support

Windows 7

End of server support

None supported

Header

Peninputpanel.h (also requires Peninputpanel_i.c)

DLL

Tiptsf.dll

See also

ITextInputPanel Interface
ITextInputPanel::SetInPlacePosition Method
ITextInputPanel::SetInPlaceVisibility Method

 

 

Show: