未收到TVN_SELCHANGING [英] TVN_SELCHANGING not received
问题描述
我有一个WTL81应用程序. CMainFrame有一个子CPaneContainer,有一个子窗口CTreeViewCtrl.问题是CTreeViewCtrl没有收到TVN_SELCHANGING消息.
I have a WTL81 app. CMainFrame has a child CPaneContainer, that has a child window CTreeViewCtrl. The problem is CTreeViewCtrl doesn't receive TVN_SELCHANGING message.
我侦察" CTreeViewCtrl及其父级(CPaneContainer),并且未收到任何通知代码.
I have "spied" CTreeViewCtrl and his parent (CPaneContainer) and no notification code is received.
CMainFrame是从公共CFrameWindowImpl<CMainFrame>
CMainFrame is implemented from public CFrameWindowImpl<CMainFrame>
CPaneContainer的实现是这样的
CPaneContainer is implemented like this
class PaneContainerReflectNotif : public CPaneContainer
{
BEGIN_MSG_MAP(PaneContainerReflectNotif)
CHAIN_MSG_MAP(CPaneContainer)
REFLECT_NOTIFICATIONS()
END_MSG_MAP()
};
树是这样实现的
class MyTreeView :
public CWindowImpl<CatalogTreeView, CTreeViewCtrl>,
public CCustomDraw<CatalogTreeView>,
public CTheme
...
BEGIN_MSG_MAP_EX(MyTreeView )
MSG_WM_CREATE(OnCreate)
MSG_WM_DESTROY(OnDestroy)
REFLECTED_NOTIFY_CODE_HANDLER_EX(NM_DBLCLK, OnDblClick)
REFLECTED_NOTIFY_CODE_HANDLER_EX(TVN_ITEMEXPANDING, OnItemExpanding)
REFLECTED_NOTIFY_CODE_HANDLER_EX(TVN_SELCHANGING, OnSelChanged)
OnDblClick-工作正常
OnItemExpanding-工作正常
OnSelChanged-不起作用
OnDblClick - works fine
OnItemExpanding - works fine
OnSelChanged - doesn't work
关于可能是什么问题的任何想法?
any ideas on what could be the problem ?
推荐答案
已解决.我的问题是,树视图是多选择的,并且这种树不会发送TVN_SELCHANGING通知
Solved. My problem was that treeview was multi-selct and that kind of tree doesn't send TVN_SELCHANGING notifications
这篇关于未收到TVN_SELCHANGING的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!