none
发送单击事件失败 RRS feed

  • 问题

  •    LRESULT hItem = 0;
       hItem = ::SendMessage(hWnd,TVM_GETNEXTITEM,TVGN_ROOT,NULL);
       hItem =::SendMessage(hWnd,TVM_SELECTITEM,TVGN_CARET,(LPARAM)hItem);
       hItem = ::SendMessage(hWnd,TVM_GETNEXTITEM,TVGN_NEXT,(LPARAM)hItem);

       
       
        ::SendMessage(hWnd,TVM_GETITEMRECT,NULL,(LPARAM)hItem);

         NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)hWnd;
        CTreeCtrl m_TreeCtrl;
        m_TreeCtrl.Attach(hWnd);
       RECT   rc;  
       
       ::SendMessage(hWnd,TVM_GETITEMRECT,(WPARAM)FALSE,(LPARAM)&rc);

       ::SendMessage(hWnd,   WM_LBUTTONDBLCLK,(WPARAM)FALSE,(LPARAM)&rc);
       

       m_TreeCtrl.Detach();

    2011年5月14日 9:02

答案