wjdashwood
asked on
Disable right-click context nenu in a HTML dialog based application
Although there are many similar questions asked on EE I have scanned through many of them and haven’t found an answer to my question. I’ve made a dialog based wizard-style application which inherits from CmultiPageDHtmlDialog. I want to prevent the user from displaying the right-click context menu. The main reason is so that they don’t navigate without using by navigation buttons.
Any suggestions? Thanks!
Any suggestions? Thanks!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Ooops, ite "return TRUE"
Rosj :o)
Rosj :o)
ASKER
Thanks everyone for your contributions! Roshmon’s code worked perfectly except I don’t know what the equivalent of m_hHTMLWnd is in my app. Why do I need this line (pMsg->hwnd == m_hHTMLWnd) and how do I find the correct vairable name in my app?
Hopefully I'll share some points out this evening; I'm on dial-up at moment :(
Thanks!
Hopefully I'll share some points out this evening; I'm on dial-up at moment :(
Thanks!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In your dlg override the PreTranslateMessage fn.
then add
if(pMsg->message == WM_RBUTTONDOWN) //possibly also trap WM_RBUTTONUP
return TRUE;
returning true tells the app it has been handled - so it is hopefully not passed on and generates the context menu