tags:

views:

25

answers:

1

Using a EM_SETEVENTMASK message can set which notifications a rich edit control sends to its parent window. How can I intercept/be notified of these messages?

Ideally, I'd have a callback that I could register with certain notifications.

A: 

Seems like any traditional approach will do:

  • Instance subclassing (replace parent's window procedure with your own and check the messages coming from the control of interest). Refer to MSDN's CallWindowProc.
  • Hooking. Refer to MSDN's SetWindowsHookEx.
Andrey