Question

Is there a list any where of C++ Events/Notifications & Default handling method list. For example, it would be useful to know that by default, the HDN_DIVIDERDBLCLICK notification is normally handled by the CWnd::OnLButtonDblClk method.

This would make it easier to find the correct method when wanting to call it when you write your own handler for the notification.

I currently cant find any simple way of finding this information.

Thanks.

Was it helpful?

Solution

This page at MSDN lists the WM_XXX messages and the signatures of the corresponding handler methods.

For notification messages that are emitted by controls, you'll want to look on the documentation page for the control. So, for example, the documentation for HDN_DIVIDERDBLCLICK is on the reference page for CHeaderCtrl (also see this page which briefly states that they are handled by the OnChildNotify handler function).

OTHER TIPS

I fear the problem may be that there does not exist a complete graph of the current handlers for an application, in data, that you CAN query.

I don't know if it's changed underlying implementation in the last couple years, but formerly MFC had the message-handler assignments coded into static data arrays.

From the base arrays, it would hand off the message to the appropriate user-code method.

However, at this point, the user-code method could process, or hand-off to other code for processing of the message.

Similarly, applications can define the entire control structure for this in-code.

Injected functions or other systemic-changes may alter this behavior also (think hot-key managers, that kind of thing).

It'd be cool to hear that someone with more recent knowledge knows of some MFC-fu though.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top