Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Adds a context to the top of the context stack.
HRESULT Push(
[in] ITfContext *pic
);
[in] pic
Pointer to the ITfContext object to be added to the stack. This object is obtained from a previous call to ITfDocumentMgr::CreateContext.
This method can return one of these values.
Value | Description |
---|---|
|
The method was successful. |
|
pic is invalid. |
|
No space exists on the stack for the context. The context stack has a limit of two contexts. |
|
This method was called during an ITfDocumentMgr::Pop call. |
The first context added to the stack becomes the main document context.
The TSF manager and text services only interact with the context at the top of the stack. Normally, only the main document context is on the stack. Occasionally, it is necessary to add a second context to the stack. For example, when a text service must display a modal UI, such as a candidate list. During this time, the text service will add its context to the stack. When the text service UI is no longer required, the text service removes the context from the stack. The main context then returns to the top of the stack. To simplify this process and prevent multiple modal UIs from being displayed, there is a maximum of two contexts allowed on the stack.
This method causes the ITfThreadMgrEventSink::OnPushContext method of all installed thread manager event sinks to be called. If this is the first context to be added to the stack, this method causes the ITfThreadMgrEventSink::OnInitDocumentMgr method of all installed thread manager event sinks to be called.
ITfDocumentMgr::Pop must be called to remove this context from the context stack.
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps | UWP apps] |
Minimum supported server | Windows 2000 Server [desktop apps | UWP apps] |
Target Platform | Windows |
Header | msctf.h |
DLL | Msctf.dll |
Redistributable | TSF 1.0 on Windows 2000 Professional |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today