I have a hierarchy of classes one base B, several derived D from B.
There is a protected member m_treeID, which is the ID of each tree inside.
I want at the base class to fill the message map like
ON_NOTIFY(NM_CLICK, m_treeID, OnNMClickTree)
instead of going for each D to do
ON_NOTIFY(NM_CLICK, TREE_A, OnNMClickTree)
ON_NOTIFY(NM_CLICK, TREE_B, OnNMClickTree)
... and so on.
Is it possible?
If I understand you right, have you looked at using ON_NOTIFY_RANGE?
It explains how to use it in the article. As long as
TREE_A,TREE_Betc. are sequentially numbered then you can have one message handler for all of them.