Detect right click in richeditview

How can I detect a right click in a richeditview?  I create the ctrl itself, and in Class Wizard I cannot see anything that'll let me detect the click.  I manually added this, but it doesn't work...

View's header file:
afx_msg void OnRclickView(NMHDR* pNMHDR, LRESULT* pResult);

View's .cpp file: (message map)
ON_NOTIFY(NM_RCLICK, IDC_EDITVIEW, OnRclickView)

knewton76Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Vinayak KumbarSr Program ManagerCommented:
Hi,

U r creating the control for Urself?. Then do the following.

1. Use the class wizard to create a new class derived from CRichEdit say CMyRichEdit.

2. Then create the control, but this time dont specify CRichEdit, instead specify CMyRichEdit and u have to include the header file MyRichEdit.h to that file.

3. Then Go to class wizard and select the class as CMyRichEdit, u will get the WM_RBUTTONCLICK message handler, map it to CMyRichEdit class.

Now u will get that message.
Hope this helps.
VinExpert
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
knewton76Author Commented:
Maybe I'm doing something wrong, but when I create a new richedit class, I only see messages for WM_RBUTTONDOWN, WM_RBUTTONUP, WM_RBUTTONDBCLK.  Oh well, mapping to WM_RBUTTONDOWN works just as well.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.