Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ITfDocumentMgr::Pop method

Syntax


HRESULT Pop(
  [in]  DWORD dwFlags
);

Parameters

dwFlags [in]

If this value is 0, only the context at the top of the stack is removed. If this value is TF_POPF_ALL, all of the contexts are removed from the stack.

Return value

This method can return one of these values.

ValueDescription
S_OK

The method was successful.

E_FAIL

The stack is empty or this method is called without the TF_POPF_ALL flag and only a single context is on the stack.

E_UNEXPECTED

This method was called during another ITfDocumentMgr::Pop call.

E_INVALIDARG

dwFlags is invalid.

 

Remarks

This method must be called from the same thread as the corresponding ITfDocumentMgr::Push call.

The first context added to the stack becomes the primary context. The primary context cannot be removed from the stack without using the TF_POPF_ALL flag. When the document is uninitialized, this method should be called with the TF_POPF_ALL flag. This causes the document manager to remove all contexts from the context stack and terminate any text service UI. Do not use the TF_POPF_ALL flag at any other time.

This method causes the ITfThreadMgrEventSink::OnPopContext method of all installed thread manager event sinks to be called. If the last context is removed from the stack, this method causes the ITfThreadMgrEventSink::OnUninitDocumentMgr method of all installed thread manager event sinks to be called.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Redistributable

TSF 1.0 on Windows 2000 Professional

Header

Msctf.h

IDL

Msctf.idl

DLL

Msctf.dll

See also

ITfDocumentMgr
ITfDocumentMgr::Push
ITfThreadMgrEventSink::OnPopContext
ITfThreadMgrEventSink::OnUninitDocumentMgr

 

 

Community Additions

Show:
© 2014 Microsoft