次の方法で共有


IVsIME.AttachContext(IntPtr, Int32, VSIME_ERR[]) Method

Definition

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

public:
 int AttachContext(IntPtr hwnd, int fAttach, cli::array <Microsoft::VisualStudio::Shell::Interop::VSIME_ERR> ^ perr);
public int AttachContext (IntPtr hwnd, int fAttach, Microsoft.VisualStudio.Shell.Interop.VSIME_ERR[] perr);
abstract member AttachContext : nativeint * int * Microsoft.VisualStudio.Shell.Interop.VSIME_ERR[] -> int
Public Function AttachContext (hwnd As IntPtr, fAttach As Integer, perr As VSIME_ERR()) As Integer

Parameters

hwnd
IntPtr

nativeint

[in] The handle of the editor window.

fAttach
Int32

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

perr
VSIME_ERR[]

[out] Pointer to an error value, a value from the VSIME_ERR enumeration. IMENORMAL indicates no error. IMENTOLD indicates there is no IME active.

Returns

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

Applies to