iTextInputPanel::get_CurrentInteractionMode 方法 (peninputpanel.h)

[ITextInputPanel 可在“要求”部分指定的操作系统中使用。 它可能在后续版本中变更或不可用。 请改用 IInputPanelConfiguration

]

获取 由 InteractionMode 枚举指定的 Tablet PC 输入面板的位置。

此属性为只读。

语法

HRESULT get_CurrentInteractionMode(
  InteractionMode *CurrentInteractionMode
);

参数

CurrentInteractionMode

返回值

备注

当前交互模式由用户决定。 但是,应用程序可以按字段禁用 InteractionMode_InPlace 模式。

示例

此 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 接口