ITextInputPanel::get_CurrentCorrectionMode 方法 (peninputpanel.h)

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

]

获取由 CorrectionMode 枚举指定的当前更正组合模式。

此属性为只读。

语法

HRESULT get_CurrentCorrectionMode(
  CorrectionMode *Mode
);

参数

Mode

返回值

备注

注意 在 Windows 7 中,ITextInputPanel 接口的行为已更改, 返回时,Mode 参数将始终设置为“不更正”。
 
当平板电脑输入面板或更正梳不可见时,当前模式 CorrectionMode_NotVisible

示例

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