views:

123

answers:

2

Hello, 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.

A: 

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).

Nick Meyer
Thanks, that is not a bad start. Shame it doesn't follow up with all notifications but it is definitely worth a bookmark.
YoungPony
@neeul, I think most of the documentation for notifications are on the pages of the controls that emit them -- so stuff like HDN_DIVIDERDBLCLICK would be on the page for CHeaderCtrl.
Nick Meyer
@Nick, Ah yes, you're right. Thanks for your help. Maybe if you could edit your main post with this info that would be good, should make it easier for other searchers to find the useful information.
YoungPony
@neeul, Of course. Editing...
Nick Meyer
A: 

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.

ted_j