List Control能否嵌在窗口中?
通过什么途径可以实现??

解决方案 »

  1.   

    是不是现实在view里啊?
    在OnCreate里建ListCtrl。
    m_pList=new CMyList;
    DWORD style;
    style = WS_CHILD |WS_VISIBLE | LVS_REPORT;
    if(!m_pList->Create(style,CRect(0,0,0,0),this,IDD_LIST_VIEW))
    {
    TRACE("创建listctrl出现错误!");
    }
    m_pList->InitListCtrl();
    m_pList->ShowWindow(SW_SHOW);
    m_pList->SetBkColor(RGB(255,255,255));
    然后OnSize修改大小,全view显示
    if( m_pList->GetSafeHwnd())
    {
    m_pList->MoveWindow( 0, 0, cx, cy );
    }
      

  2.   

    楼上的代码可行,就是create出来就可以了