Condividi tramite


IVsIME.AttachContext Method

Associates or disassociates an Input Method Editor (IME) context with an editor window. For more information about IME contexts, see Input Context.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
Function AttachContext ( _
    hwnd As IntPtr, _
    fAttach As Integer, _
    <OutAttribute> perr As VSIME_ERR() _
) As Integer
int AttachContext(
    IntPtr hwnd,
    int fAttach,
    VSIME_ERR[] perr
)
int AttachContext(
    [InAttribute] IntPtr hwnd, 
    [InAttribute] int fAttach, 
    [OutAttribute] array<VSIME_ERR>^ perr
)
abstract AttachContext : 
        hwnd:IntPtr * 
        fAttach:int * 
        perr:VSIME_ERR[] byref -> int
function AttachContext(
    hwnd : IntPtr, 
    fAttach : int, 
    perr : VSIME_ERR[]
) : int

Parameters

  • hwnd
    Type: IntPtr

    [in] The handle of the editor window.

  • fAttach
    Type: Int32

    [in] Boolean. Set to true to attach an IME context to the window. Set to false to destroy an attached IME context.

Return Value

Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsIME::AttachContext(
   [in] HWND hwnd, 
   [in] BOOL fAttach, 
   [out] VSIME_ERR * perr
);

.NET Framework Security

See Also

Reference

IVsIME Interface

Microsoft.VisualStudio.Shell.Interop Namespace