Mark Hatsell
2007-08-13 15:45:29 UTC
Hello All
I have a RichEdit control which I have placed in a dialog. I provide a
custom context menu by catching the WM_CONTEXTMENU message for the RichEdit.
WM_COMMAND messages sent by clicking menu items are received and handled
within the control. This all seems to work OK.
However, I have now need some of the OLE functionality of the RichEdit so I
have retreived a IRichEditOleCallback object using the EM_SETOLECALLBACK
message. However, once I have done this, the WM_CONTEXTMENU message is never
sent to the RichEdit any more. I can get around this by providing a
IRichEditOleCallback::GetContextMenu method and creating the context menu in
there. This seems to work. However, whenever I then select a menu item from
the context menu, the WM_COMMAND message is sent to the parent dialog rather
than the RichEdit control itself. Is there any way I can change this
behaviour so that command messages are sent to the control as normal?
Thanks in advance.
Mark
I have a RichEdit control which I have placed in a dialog. I provide a
custom context menu by catching the WM_CONTEXTMENU message for the RichEdit.
WM_COMMAND messages sent by clicking menu items are received and handled
within the control. This all seems to work OK.
However, I have now need some of the OLE functionality of the RichEdit so I
have retreived a IRichEditOleCallback object using the EM_SETOLECALLBACK
message. However, once I have done this, the WM_CONTEXTMENU message is never
sent to the RichEdit any more. I can get around this by providing a
IRichEditOleCallback::GetContextMenu method and creating the context menu in
there. This seems to work. However, whenever I then select a menu item from
the context menu, the WM_COMMAND message is sent to the parent dialog rather
than the RichEdit control itself. Is there any way I can change this
behaviour so that command messages are sent to the control as normal?
Thanks in advance.
Mark