Share via


ITextInputPanel::get_CurrentInteractionMode 方法 (peninputpanel.h)

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

]

取得 由 InteractionMode 列舉所指定之平板電腦輸入面板的位置。

這個屬性是唯讀的。

語法

HRESULT get_CurrentInteractionMode(
  InteractionMode *CurrentInteractionMode
);

參數

CurrentInteractionMode

傳回值

備註

目前的互動模式是由用戶所決定。 不過,應用程式可以依每個欄位停用 InteractionMode_InPlace 模式。

範例

這個 C++ 範例會實作 EN_SETFOCUS 編輯控制元件 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 介面