ITextInputPanel::AttachedEditWindow property

[ITextInputPanel is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Instead, use IInputPanelConfiguration. ]

Gets or sets the window handle of the object to which the ITextInputPanel object is attached.

This property is read/write.

Syntax


HRESULT put_AttachedEditWindow(
  [in]          LONG_PTR AttachedEditWindow
);

HRESULT get_AttachedEditWindow(
  [out, retval] LONG_PTR *AttachedEditWindow
);

Property value

The window handle of the object to which the ITextInputPanel object is attached.

Error codes

NameMeaning
S_OK

Success. The parameter contains the window handle of the control to which the Input Panel is attached.

E_INVALIDARG

The parameter contains an invalid value.

E_FAIL

An unspecified error occurred.

Remarks

The window handle of an object may change.

Examples

This C++ example creates an ITextInputPanel object, g_pTip, and attaches it to the window handle of an InkEdit control, IDC_EDIT3, by setting the ITextInputPanel::AttachedEditWindow Property property.


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


Requirements

Minimum supported client

Windows XP Tablet PC Edition [desktop apps only]

Minimum supported server

None supported

End of client support

Windows 7

End of server support

None supported

Header

Peninputpanel.h (also requires Peninputpanel_i.c)

DLL

Tiptsf.dll

See also

ITextInputPanel Interface

 

 

Show: