// pParentWnd is a pointer to the parent window.
extern CWnd* pParentWnd;
// The pointer to my list view control.
extern CListCtrl* pmyListCtrl;pmyListCtrl->Create(
   WS_CHILD|WS_VISIBLE|WS_BORDER|LVS_REPORT,
   CRect(10,10,400,200), pParentWnd, 1);msdn的例子,看看CListCtrl的相关帮助

解决方案 »

  1.   

    我在写DLL,没有Dialog或是窗口,那么CWnd* pParentWnd参数该怎么设置呢???
      

  2.   

    在dll中写一个函数
    createList(CWnd * pPanrentWnd,ClistBox lstBox,CRect rect)
    {
       lstBox->Create(
       WS_CHILD|WS_VISIBLE|WS_BORDER|LVS_REPORT,
       rect, pParentWnd, 1);
       lstBox.ShowWindow(SW_SHOW);}
      

  3.   

    CWnd 可以用
    FindWindow();
    GetActiveWindow
    GetDesktopWindow
      

  4.   

    我用的是MFC(DLL),没有任何Dialog,想在代码中创建ListBox,然后用其.AddString插入文件,该怎样写代码????
      

  5.   

    那么,你想让你得list显示在什么地方呢?就把那个cwnd*传给dll就是了