If I use "Windows Explorer" style in MFC application how work with events in CTreeView. For example with OnExpand. Because in MESSAGEMAP it is needed to write name of CTreeView, but name i can't find. How get it?
Printable View
If I use "Windows Explorer" style in MFC application how work with events in CTreeView. For example with OnExpand. Because in MESSAGEMAP it is needed to write name of CTreeView, but name i can't find. How get it?
What "name of CTreeView" do you mean?
What IDE are you using?
In what class are you trying to implement message handler?
Just click on the Class View tab in Visual Studio, select the CTreeView derived class, right click and select properties, click on the messages button and add you handler. (This is for 2008. Other versions may be different).
What "name of CTreeView" do you mean?
For example, in
ON_NOTIFY(TVN_ITEMEXPANDING, IDC_TREE1, OnItemExpandingTree1)
"IDC_TREE1"...
What IDE are you using?
VS2008
In what class are you trying to implement message handler?
In CMainFrame class...
GCDEF, there is OnExpanding absent...
It is NOT a name, it is a control ID
And in CTreeView derived class this macro is not used. Instead theshould be used.Code:ON_NOTIFY_REFLECT(TVN_ITEMEXPANDING, OnItemExpandingTree1)
Well, GCDEF already explained how to add message handler in 2008.
Bad idea! Why in CMainFrame? :confused:
It should be in a CTreeView derived class!
VictorN, thanks I will make such... Now I try use it...