ITextInputPanel::get_ExpandPostInsertionCorrection 方法 (peninputpanel.h)

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

]

获取或设置一个值,该值指示是否自动展开平板电脑输入面板上的更正梳子。

此属性是可读写的。

语法

HRESULT get_ExpandPostInsertionCorrection(
  BOOL *Expand
);

参数

Expand

返回值

备注

注意 在 Windows 7 中, ITextInputPanel 接口的行为已更改。 返回时 ,Expand 参数将始终设置为“未展开”。 设置此属性不再执行任何操作。
 

示例

此 C++ 示例创建 ITextInputPanel 对象 g_pTip,并通过设置 ITextInputPanel::AttachedEditWindow 属性将其附加到 InkEdit 控件IDC_EDIT3的窗口句柄。 它还设置,然后获取 ITextInputPanel::ExpandPostInsertionCorrection 属性

if (SUCCEEDED(CoInitialize(NULL)))
{
    if (SUCCEEDED(CoCreateInstance(CLSID_TextInputPanel, NULL, CLSCTX_INPROC, IID_ITextInputPanel, (VOID**)&g_pTip)))
    {
        if (SUCCEEDED(g_pTip->put_AttachedEditWindow(GetDlgItem(IDC_EDIT3)->m_hWnd)))
        {
            g_pTip->put_DefaultInPlaceState(InPlaceState_Expanded);
            InPlaceState ips;
            g_pTip->get_DefaultInPlaceState(&ips);
            TRACE("DefaultInplaceState: %d\n", ips);
            
            g_pTip->put_DefaultInputArea(PanelInputArea_CharacterPad);
            PanelInputArea pia;
            g_pTip->get_DefaultInputArea(&pia);
            TRACE("DefaultInputArea: %d\n", pia);

            g_pTip->put_ExpandPostInsertionCorrection(FALSE);
            BOOL epic;
            g_pTip->get_ExpandPostInsertionCorrection(&epic);
            TRACE("ExpandPostInsertionCorrection: %d\n", epic);

            g_pTip->put_InPlaceVisibleOnFocus(TRUE);
            BOOL ipvof;
            g_pTip->get_InPlaceVisibleOnFocus(&ipvof);
            TRACE("InPlaceVisibleOnFocus: %d\n", ipvof);

            g_pTip->put_PreferredInPlaceDirection(InPlaceDirection_Top);
            InPlaceDirection direction;
            g_pTip->get_PreferredInPlaceDirection(&direction);
            TRACE("PreferredInPlaceDirection: %d\n", direction);
        }
    }
    else
    {
        TRACE("Failed to create ITextInputPanel object.\n");
    }
}

要求

   
最低受支持的客户端 Windows XP Tablet PC Edition [仅限桌面应用]
最低受支持的服务器 无受支持的版本
目标平台 Windows
标头 peninputpanel.h
DLL Tiptsf.dll

请参阅

ITextInputPanel 接口