Click to Rate and Give Feedback
MSDN
MSDN Library
Tablet PC
Interfaces
 ITextInputPanel::InPlaceBoundingRec...
ITextInputPanel::InPlaceBoundingRectangle Property

Gets the bounding rectangle for Tablet PC Input Panel.

Syntax (get)

C++
 HRESULT get_InPlaceBoundingRectangle(
  [out, retval]  Rect *BoundingRectangle
);

Parameters

BoundingRectangle [out]

The bounding rectangle for the in-place Input Panel when the largest input area for the current input language is showing.

This property is read-only.

Return Value

The method can return one of the following values.

Return codeDescription
S_OK

Success.

E_FAIL

An unspecified error occurred.

 

Remarks

If the Writing Pad or Character Pad is active, then the height of the Insert button is included in the bounding rectangle for the in-place Input Panel. The bounding rectangle does not include the height of the correction comb. When the in-place Input Panel auto grows, the ITextInputPanelEventSink::InPlaceSizeChanging Method/ITextInputPanelEventSink::InPlaceSizeChanged Method event pair is fired and the value of this property is updated to include the additional writing area or writing line.

This element is declared in Peninputpanel.h.

Applies To

ITextInputPanel Interface

Examples

This C++ example implements an EN_SETFOCUS event handler for an Edit control, IDC_EDIT3. It first checks if an ITextInputPanel object, g_pTip, has been created. If it exists, it reports the values of several ITextInputPanel Interface properties to debug output using the TRACE macro.

void CCOMTIPDlg::OnEnSetFocusEdit3()
{
    if (NULL != g_pTip)
    {
		CorrectionMode mode;

		if (SUCCEEDED(g_pTip->get_CurrentCorrectionMode(&mode)))
        {
			TRACE("CurrentCorrectionMode: %d\n", mode);
		}

		InPlaceState state;

		if (SUCCEEDED(g_pTip->get_CurrentInPlaceState(&state)))
        {
			TRACE("CurrentInPlaceState: %d\n", state);
		}

		PanelInputArea area;

		if (SUCCEEDED(g_pTip->get_CurrentInputArea(&area)))
        {
			TRACE("CurrentInputArea: %d\n", area);
		}

		InteractionMode iMode;

		if (SUCCEEDED(g_pTip->get_CurrentInteractionMode(&iMode)))
        {
			TRACE("CurrentInteractionMode: %d\n", iMode);
		}

        RECT rect;

		if (SUCCEEDED(g_pTip->get_InPlaceBoundingRectangle(&rect)))
        {
	        TRACE("InPlaceBoundingRectangle.top: %d\n", rect.top);
	        TRACE("InPlaceBoundingRectangle.left: %d\n", rect.left);
	        TRACE("InPlaceBoundingRectangle.bottom: %d\n", rect.bottom);
	        TRACE("InPlaceBoundingRectangle.right: %d\n", rect.right);
        }

	    int nHeight;

		if (SUCCEEDED(g_pTip->get_PopDownCorrectionHeight(&nHeight)))
        {
	        TRACE("PopDownCorrectionHeight: %d\n", nHeight);
        }

	    if (SUCCEEDED(g_pTip->get_PopUpCorrectionHeight(&nHeight)))
        {
	        TRACE("PopUpCorrectionHeight: %d\n", nHeight);
        }

		if (SUCCEEDED(g_pTip->SetInPlacePosition(300, 300, CorrectionPosition_Bottom)))
		{
			TRACE("Call to SetInPlacePosition() succeeded.\n");
		}
		else
		{
			TRACE("Call to SetInPlacePosition() failed.\n");
		}
    }
    else
    {
        TRACE("ITextInputPanel object is NULL.\n");
    }
}

Requirements

Minimum supported clientWindows XP Tablet PC Edition
Minimum supported serverNone supported
HeaderPeninputpanel.h (also requires Peninputpanel_i.c)
DLLTiptsf.dll

See Also

ITextInputPanel

Send comments about this topic to Microsoft

Build date: 10/8/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker