如何取得对话框上的 CListCtrl 左上角的坐标?

解决方案 »

  1.   

    lz的意思是,ClistCtrl在对话框中的位置吗?RECT rc;
    GetWindowRect(hWndListCtrl, &rc);
    ScreenToClient(hWndListCtrl, &rc);
      

  2.   

    在这真好 可以好好学习了,不错的地方http://www.mtwjh.cn 顶
      

  3.   

    ScreenToClient(hWndListCtrl, &rc);1楼  这个形参不对啊
      

  4.   

    不好意思,我用win32 API的,所以要加个全局变量符合吧。::GetWindowRect(hWndListCtrl, &rc); 
    ::ScreenToClient(hWndListCtrl, &rc);如果是用MFC或者其他类库,可以参照MSDN或者相关资料。
      

  5.   

    如果有MFC则是CListCtrl 对象如m_wndList;
    m_wndList.GetWindowRect(&rc);
    m_wndList.ScreenToClient(&rc); 
    若为SDK则为LS