在你的机器上能找到msflxgrd.ocx文件吗?
    如果不能,拷贝到system目录,并且regsvr32 msflxgrd.ocx即可.

解决方案 »

  1.   

    Of course I have msflxgrd.ocx in system directory and I have run "regsvr32 msflxgrd.ocx"
      

  2.   

    To evelan:看情形,他当然能在目标机器上找到了,要不怎么能re-register呢?To mikeyu:可以把情况说得详细些吗?
      

  3.   

    I've checked the code and found that if I put a grid on a dialog when designing, it's OK; but if I create it dynamically in a view, the problem happens. My code is here: (First add the component into the project)int CChildView::OnCreate(LPCREATESTRUCT lpCreateStruct) 
    {
    if (CWnd ::OnCreate(lpCreateStruct) == -1)
    return -1;

    m_grid.Create(NULL,NULL,WS_VISIBLE|WS_CHILD,CRect(0,0,100,100),this,IDC_GRID); m_grid.SetAppearance(0); //Flat
    m_grid.SetAllowUserResizing(1); //Column Resizing
    m_grid.SetAllowBigSelection(FALSE);
    m_grid.SetHighLight(2); m_grid.SetFixedRows(1);
    m_grid.SetFixedCols(1);
    m_grid.SetColWidth(0,800);
    m_grid.SetColAlignment(0,3);

    return 0;
    }void CChildView::OnSize(UINT nType, int cx, int cy) 
    {
    CWnd ::OnSize(nType, cx, cy);

    m_grid.MoveWindow(0,0,cx,cy);
    }
      

  4.   

    The m_grid is not a pointer, so there is no problem with memory leak. The strange thing is that if the machine has already installed VC, everything is OK; but if the machine is clean, the area belonging to grid is a whole white.
    Also my program is statically linked.
      

  5.   

    I have solved the problem!
      

  6.   

    how do you solve it?Could you tell me the methods?
    Thank you very much!
      

  7.   

    No one can tell me!I am so regretted!
      

  8.   

    probably you setup program is not correct.