MFC CTreeCtrl Multiselection在Windows 7上不起作用. [英] MFC CTreeCtrl Multiselection does not work on Windows 7.

查看:96
本文介绍了MFC CTreeCtrl Multiselection在Windows 7上不起作用.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的代码

this is my code

BOOL treesample::SetItemState(HTREEITEM hItem, UINT nState, UINT nStateMask)
...

//focus
if (...)
{
    CTreeCtrl::SelectItem(NULL);
    CTreeCtrl::SetItemState(hFocus, TVIS_SELECTED, TVIS_SELECTED);
    UpdateWindow();
}

if (!CTreeCtrl::SelectItem(hItem)) {
     return FALSE;
}
...



它可以在WindowsXP上运行,但不能在Windows7上运行.

我认为CTreeCtrl :: SelectItem(hItem)之后的CTreeCtrl :: SetItemState(hFocus ...)
选定的"hFocus"树项目消失.

在此先感谢

*环境:Win7,Visual Studio 2008,MainFrame-CMDIFrameWndEx(RibbonToolbar)
CTreeCtrl



It works on WindowsXP but do not work on Windows7.

I think CTreeCtrl::SetItemState(hFocus...) After CTreeCtrl::SelectItem(hItem)
selected "hFocus" tree item disappears.

Thanks in advance

* Environment : Win7, Visual Studio 2008, MainFrame - CMDIFrameWndEx (RibbonToolbar)
CDockablePane on CTreeCtrl

推荐答案

上的CDockablePane已解决.清单的原因.
comctl32.dll(ver6.0)<-使用selectitem时,
的焦点
先前选择的项目会突出显示
Has been resolved. Cause of the manifest.

comctl32.dll (ver6.0) <-- when using the selectitem, The focus of the

previously selected item sticks out


这篇关于MFC CTreeCtrl Multiselection在Windows 7上不起作用.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆