我相应了click消息好像没反应,传过来的结构体根本就是空的,看了msdn说这个click消息只要在tree view控件里面点击就会产生,怪不得没用,那么要用哪个消息?我现在只好用selet changed.还有要让一个item加了子item以后自己张开,应该向他发什么消息?
解决方案 »
- 求救怎么让AfxMessageBox不阻塞啊
- 我玩游戏时的流量是:30K/s 这是指 "上传流量" 加上 "下载流量"吗?
- 我学了C++现在在看WINDOWS程序设计这本书看不懂
- 使用GetModuleFileName()时张冠李戴的问题。
- 如何在程序中得到当前应用的窗体句柄,GetActiveWindow有的时候工作失败!
- 数字图像识别(算法)(急!!!!)
- 小小申请版主,希望各位大大支持
- How to catch the HDN_TRACK notification message?
- 我用stretchBlt函数显示一个图象时为什么颜色不能正常显示。
- 关于CMetaFileDC的问题
- 请问在一个对话框中,如何取到VIEW中的变量?
- ★★★ 再线等------------轻松取分,有关文件操作,内附代码,请进! ★★★
{
NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR; HTREEITEM CurItem=m_TreeCtrl.GetSelectedItem();
}
ScreenToClient(&point);
// Get the HTREEITEM of the drop target and exit now if it's NULL.
UINT nFlags;
HTREEITEM hItem = HitTest (point, &nFlags);
if (hItem == NULL)
return;
// Display an error message if the move is illegal.
if (hItem == m_hDragItem) {
MessageBox (_T ("An item can't be dropped onto itself"));
return;
}
else if (hItem == GetParentItem (m_hDragItem)) {
MessageBox (_T ("An item can't be dropped onto its parent"));
return;
}
else if (IsChildOf (hItem, m_hDragItem)) {
MessageBox (_T ("An item can't be dropped onto one of its " \
"children"));
return;
}
// Move the dragged item and its subitems (if any) to the drop point.
MoveTree (hItem, m_hDragItem);
m_hDragItem = NULL;