WM_UNDO vs EM_UNDO
I was wondering – what’s the reason for some messages being prefixed with WM_ and others with EM_ ? The logic is opaque to me (especially looking at things like EM_UNDO vs. WM_UNDO).
Asked (over two years ago!) and answered.
Thanks Raymond!



September 11th, 2007 at 2:11 pm
In case it wasn’t discussed already …
As for the general question (EM_ versus WM_, but not EM_UNDO versus WM_UNDO specifically) the EM_ messages are commands for the standard edit control specifically. There are also BM_ commands for buttons (e.g.: send BM_CLICK to a button to simulate a button press), TVM_ commands for treeview controls, etc. Then there are *N_ messages (packed in the notify-message header of WM_NOTIFY messages) associated with events sent by particular controls (e.g.: BN_CLICKED when a button is clicked, TVN_BEGINDRAG when dragging a treeview node, etc).
Crude, but less frustrating to work with than the myriad OLE/ActiveX COM interfaces that came afterward.