Share via


ITextInputPanel::get_InPlaceBoundingRectangle 方法 (peninputpanel.h)

[ITextInputPanel 可用於需求一節中指定的操作系統。 它在後續版本中可能會變更或無法使用。 請改用 IInputPanelConfiguration

]

取得平板電腦輸入面板的周框。

這個屬性是唯讀的。

語法

HRESULT get_InPlaceBoundingRectangle(
  RECT *BoundingRectangle
);

參數

BoundingRectangle

傳回值

備註

如果 [寫入板] 或 [字元板] 為使用中,則 [插入] 按鈕的高度會包含在就地輸入面板的周框內。 周框不包含更正組合的高度。當就地輸入面板自動成長時, 就會引發 ITextInputPanelEventSink::InPlaceSizeChanging 方法/ITextInputPanelEventSink::InPlaceSizeChanged 方法 事件組,並更新此屬性的值以包含額外的寫入區域或寫入行。

範例

這個 C++ 範例會EN_SETFOCUS實作 Edit 控制件的事件處理程式。 IDC_EDIT3 它會先檢查是否已建立 ITextInputPanel 物件 g_pTip。 如果存在,它會報告數 個 ITextInputPanel 介面 屬性的值,以使用 TRACE 宏對輸出進行偵錯。

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");
    }
}

規格需求

需求
最低支援的用戶端 Windows XP Tablet PC Edition [僅限傳統型應用程式]
最低支援的伺服器 都不支援
目標平台 Windows
標頭 peninputpanel.h
Dll Tiptsf.dll

另請參閱

ITextInputPanel 介面