Link to home
Start Free TrialLog in
Avatar of FSmullin
FSmullin

asked on

WM_CONTEXTMENU and CEdit

I am programming online help, F1 and Shift-F1 for my application.  I am able to cause the "What's this?" context menu to be displayed for every control on my CFormView except for the CEdit and CCombobox controls.  The edit control does not seem to pass the WM_CONTEXTMENU (VC++ 4.1)  message to it's parent.  Is there a way to append the "What's this?" item to the default edit control context menu?  I'd like to be able to do it from the parent without subclassing the control(s).
ASKER CERTIFIED SOLUTION
Avatar of chensu
chensu
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of prabha040297
prabha040297

You can catch "WM_INITMENUPOPUP" message. The framework sends this message when a pop-up menu is about to become active. This allows an application to modify the pop-up menu before it is displayed without changing the entire menu.

Note:   This member function is called by the framework to allow your application to handle a Windows message. The parameters passed to your function reflect the parameters received by the framework when the message was received. If you call the base-class implementation of this function, that implementation will use the parameters originally passed with the message and not the parameters you supply to the function.