谢谢.

解决方案 »

  1.   

    BOOL SelectItem( HTREEITEM hItem );
      

  2.   

    可是 hItem 如果得到啊?
      

  3.   

    POSITION pos=m_ctlFindList.GetFirstSelectedItemPosition();
    if(pos==NULL)
    {
    MessageBox(_T("Please choose a record"),_T("Warning"),MB_ICONWARNING);
    return;
    }
    if(pos!=NULL)
    {
    int item=m_ctlFindList.GetNextSelectedItem(pos);
    dlg.m_strName=m_ctlFindList.GetItemText(item,1);
      

  4.   

    //获得选中
    int nItem = listctrl.GetNextItem (-1, LVNI_SELECTED);
    //取消选中
    listctrl.SetItemState(nItem,NULL,NULL);
    //设置选中
    listctrl.SetItemState(nItem+1,LVNI_SELECTED,LVNI_SELECTED);
      

  5.   

    //获得选中
    int nItem = listctrl.GetNextItem (-1, LVNI_SELECTED);
    //取消选中
    listctrl.SetItemState(nItem,NULL,NULL);
    //设置选中
    listctrl.SetItemState(nItem+1,LVNI_SELECTED,LVNI_SELECTED);