How to popup the shortcut menu in a rich edit control?

How to popup the shortcut menu in a rich edit control?

Post by ZhangBi » Mon, 27 Mar 2000 04:00:00



Hello,

I want to know how to popup the shortcut menu in a rich edit control?

Thanks
Bin

 
 
 

1. How to popup the shortcut menu in a CRichEdit control ?

The RichEdit control is different than the other controls.  You have to
provide a implementation of the IRichEditOleCallback interface and let
the RichEdit control know about it by calling
CRichEditCtrl::SetRichEditOleCallback (or something to that effect - I'm
doing this off the top of my head).  One of the functions of that
interface is IRichEditOleCallback::GetContextMenu.  That's where you
provide your context menu.  Check out the RichOLE sample on MSDN.  I
spent many frustrating hours / days trying to figure out how to get the
in-place activation working.  I finally gave up and just return E_NOIMPL
(or whatever it is) from most of the callback functions, but it allows me
to provide some OLE support and the context menu support.  If all you
want is a context menu, you could also implement a right mouse button
click handler and send yourself a context message.

Hope that helps.
- Dan

2. Password Problem in OE.

3. need rich edit control for wince to use with EVC

4. Server Busy error mesage

5. Rich Edit Control

6. XP Pro freezing

7. rich edit control

8. Internal Error??

9. Rich edit control problem: bitmap font shows twice as wide as it should

10. coloring text in a rich edit control

11. need rich edit control for wince to use with EVC

12. Rich edit control problem (Focus not changing with tab)

13. rich edit controls and bitmaps