zl程序教程

您现在的位置是:首页 >  工具

当前栏目

【VS开发】CListBox智能滚动设置

vs智能开发 设置 滚动
2023-09-27 14:20:29 时间

添加数据以后,再在下面加句,
int nCount = m_myListBox.GetCount();
if (nCount > 0)
m_myListBox.SetCurSel(nCount - 1);


其实是在output页卡中实现自动滚动显示最新添加的info,因为

    COutputList m_wndOutputInfo;

    m_wndOutput.m_wndOutputInfo.AddString(str);//输出信息
    int nCount = m_wndOutput.m_wndOutputInfo.GetCount();
    if(nCount>0)
        m_wndOutput.m_wndOutputInfo.SetCurSel(nCount - 1);
    str.Empty();

2016-5-4
张朋艺 pyzhangbit2010@126.com