Re: Context menu question
I would suggest subclassing the edit control and handling its WM_CONTEXTMENU messages.
Re: Context menu question
Ok, that's along the lines of what I was thinking I needed to do. I derived a 'wrapper' class from CRichEditCtrl, where I handle the WM_CONTEXTMENU message. My question is, how do I go about implementing the subclassing? Thanks very much.
-Matt
Re: Context menu question
can you be more specigic about your problem?
Re: Context menu question
Certainly. Here is what I'm doing: I have an application with 2 windows. The main window is a Rich Edit Control used for editing, and uses doc/view. I also have a dialog bar docked at the bottom of the screen with a CRichEditCtrl embedded in it, used for an output window. The CRichEditCtrl is a member of the dialog bar class and is created dynamically using the Create() function. I want to be able to create a context menu for the CRichEditCtrl embedded in the dialog bar. I tried deriving a class from CRichEditCtrl, and trapping WM_CONTEXTMENU, but that didn't work. It was suggested here that I need to use subclassing (a concept I understand, but haven't used before). I basically need to know how, and where to use the subclassing. If you need any more info, please let me know. Thanks for all your help.
cheers,
-Matt
Re: Context menu question
I beleived that by deriving a class from CRichEditCtrl and using that WAS subclassing.
Why didn't trapping WM_CONTEXTMENU work?
Sally