1
解决方案 »
- 网络接收和发送IOCP
- 协议与协议栈
- CHttpFile::SendRequest POST提交 为什么返回页面是乱码
- 一个简单的关于 XML 的读取与保存的问题
- 请问如何在listbox中制作文本超链接?
- 服务端采用完成端口通讯模型,客户端使用普通的阻塞模式,经过测试,客户端发的数据服务端收不到,晕。
- 新人请教,基础vc问题
- 各位,请问在哪里可以下载到正版的ie呀,ie5,ie6都可以呀,只要非试用版就行
- 怎么从AutoCAD绘制的DWG文件中提取文字信息??
- 初学VC,特来送分,先到先得!
- 【请教】CRichEditCtrl 改变鼠标选中文本背景色
- AVICap视频捕捉程序的窗口“没有响应”
case WM_NOTIFY: //如果消息是WM_NOTIFY
{
NMHDR *nhr;
nhr = (NMHDR *)cwps.lParam;
NM_TREEVIEW *ntv =(NM_TREEVIEW *)nhr; //转换为大数据结构
if (ntv->action == TVN_SELCHANGING ||ntv->action == TVN_SELCHANGED)
{
........... //这里怎么样都进不来。。这是为什么?
}另外:捕获树形控件的操作消息,是用TVN_XXX的通知消息好,,还是用TVM_控件消息好???
Description
TVN_BEGINDRAG
Signals the start of a drag-and-drop operation
TVN_BEGINLABELEDIT
Signals the start of in-place label editing
TVN_BEGINRDRAG
Signals the start of a drag-and-drop operation, using the right mouse button
TVN_DELETEITEM
Signals the deletion of a specific item
TVN_ENDLABELEDIT
Signals the end of label editing
TVN_GETDISPINFO
Requests information that the tree control requires to display an item
TVN_ITEMEXPANDED
Signals that a parent item's list of child items was expanded or collapsed
TVN_ITEMEXPANDING
Signals that a parent item's list of child items is about to be expanded or collapsed
TVN_KEYDOWN
Signals a keyboard event
TVN_SELCHANGED
Signals that the selection has changed from one item to another
TVN_SELCHANGING
Signals that the selection is about to be changed from one item to another
TVN_SETDISPINFO
Notification to update the information maintained for an item
看你代码象是WIN API的,但是这个cwps是什么东东?
WIN API代码应该是这样的:case WM_NOTIFY: //如果消息是WM_NOTIFY
{
LPNMTREEVIEW nhr = (LPNMTREEVIEW)lParam;
if (nhr->hdr->code == TVN_SELCHANGING || nhr->hdr->code == TVN_SELCHANGED)
{
//这里应该能进来
}
...
LPNMTREEVIEW 与NM_TREEVIEW *
是同一个结构体。用你的方法也是一样没有捕获到Tree的动作。~~~~~