Skip to content

Latest commit

 

History

History
286 lines (201 loc) · 9.63 KB

nf-textserv-itexthost-txnotify.md

File metadata and controls

286 lines (201 loc) · 9.63 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:textserv.ITextHost.TxNotify
ITextHost::TxNotify (textserv.h)
Notifies the text host of various events.
ITextHost interface [Windows Controls]
TxNotify method
ITextHost.TxNotify
ITextHost::TxNotify
TxNotify
TxNotify method [Windows Controls]
TxNotify method [Windows Controls]
ITextHost interface
_win32_ITextHost_TxNotify
_win32_ITextHost_TxNotify_cpp
controls.ITextHost_TxNotify
controls._win32_ITextHost_TxNotify
textserv/ITextHost::TxNotify
controls\ITextHost_TxNotify.htm
Controls
VS|Controls|~\controls\richedit\windowlessricheditcontrols\windowlessricheditcontrolsreference\windowlessricheditcontrolinterfaces\itexthost\itexthosttxnotify.htm
12/05/2018
ITextHost interface [Windows Controls],TxNotify method, ITextHost.TxNotify, ITextHost::TxNotify, TxNotify, TxNotify method [Windows Controls], TxNotify method [Windows Controls],ITextHost interface, _win32_ITextHost_TxNotify, _win32_ITextHost_TxNotify_cpp, controls.ITextHost_TxNotify, controls._win32_ITextHost_TxNotify, textserv/ITextHost::TxNotify
textserv.h
Windows
Windows Vista [desktop apps only]
Windows Server 2003 [desktop apps only]
Msftedit.dll
Windows
19H1
ITextHost::TxNotify
textserv/ITextHost::TxNotify
c++
APIRef
kbSyntax
COM
Msftedit.dll
ITextHost.TxNotify

ITextHost::TxNotify

-description

Notifies the text host of various events.

-parameters

-param iNotify [in]

Type: DWORD

Event to notify host of. One of the EN_ notification codes.

-param pv [in]

Type: void*

Extra data, dependent on iNotify.

-returns

Type: HRESULT

Return S_OK if the method succeeds.

Return S_FALSE if the method fails. For more information on COM error codes, see Error Handling in COM.

-remarks

Note that there are two basic categories of events, direct and delayed . Direct events are sent immediately because they need some processing, for example, EN_PROTECTED. Delayed events are sent after all processing has occurred; the control is thus in a stable state. Examples of delayed notifications are EN_CHANGE, EN_ERRSPACE, and EN_SELCHANGE.

The notification events are the same as the notification codes sent to the parent window of a rich edit window. The firing of events may be controlled with a mask set through the EM_SETEVENTMASK message.

In general, it is legal to make calls to the text services object while processing this method; however, implementers are cautioned to avoid excessive recursion.

The following is a list of the notifications that may be sent.

Notification Meaning
EN_CHANGE Sent after the system updates the screen, when the user takes an action that may have altered text in the control.
EN_DROPFILES Sent when either a WM_DROPFILES message or an IDropTarget::DragEnter notification is received.
EN_ERRSPACE Sent when a control cannot allocate enough memory to meet a specified request.
EN_HSCROLL Sent when the user clicks the control's horizontal scroll bar before the screen is updated.
EN_KILLFOCUS Sent when the control loses the keyboard focus.
EN_LINK Sent when a rich edit control receives various messages, such as mouse click messages, when the mouse pointer is over text that has the CFE_LINK effect.
EN_MAXTEXT Sent when the current text insertion has exceeded the maximum number of characters for the control.
EN_OLEOPFAILED Sent when a user action on an OLE object has failed.
EN_PROTECTED Sent when the user takes an action that changes the protected range of text.
EN_REQUESTRESIZE Sent when a rich edit control's contents are different from the control's window size.
EN_SAVECLIPBOARD Sent when an edit control is being destroyed. The text host should indicate whether OleFlushClipboard should be called. Data indicating the number of characters and objects to be flushed is sent in the ENSAVECLIPBOARD data structure. Mask value is nothing.
EN_SELCHANGE Sent when the current selection has changed. A SELCHANGE data structure is also sent, which indicates the new selection range at the type of data the selection is currently over. Controlled through the ENM_SELCHANGE mask.
EN_SETFOCUS Sent when the edit control receives the keyboard focus. No extra data is sent; there is no mask.
EN_STOPNOUNDO Sent when an action occurs for which the control cannot allocate enough memory to maintain the undo state. If S_FALSE is returned, the action will be stopped; otherwise, the action will continue.
EN_UPDATE Sent before an edit control requests a redraw of altered data or text. No additional data is sent. This event is controlled through the ENM_UPDATE mask. Rich Edit 2.0 and later: The ENM_UPDATE mask is ignored and the EN_UPDATE notification code is always sent. However, when Microsoft Rich Edit 3.0 emulates Microsoft Rich Edit 1.0, the ENM_UPDATE mask controls this notification.
EN_VSCROLL Sent when the user clicks an edit control's vertical scroll bar or when the user scrolls the mouse wheel over the edit control, before the screen is updated. This is controlled through the ENM_SCROLL mask; no extra data is sent.
 
Note  The EN_MSGFILTER is not sent to TxNotify. To filter window messages, use TxSendMessage.
 

-see-also

Conceptual

EM_SETEVENTMASK

EN_CHANGE

EN_DROPFILES

EN_ERRSPACE

EN_HSCROLL

EN_KILLFOCUS

EN_LINK

EN_MAXTEXT

EN_OLEOPFAILED

EN_PROTECTED

EN_REQUESTRESIZE

EN_SAVECLIPBOARD

EN_SELCHANGE

EN_SETFOCUS

EN_STOPNOUNDO

EN_UPDATE

EN_VSCROLL

ITextHost

Reference

Windowless Rich Edit Controls