CClientDC dc (this);
   
 m_nCellWidth = dc.GetDeviceCaps (LOGPIXELSX);
    m_nCellHeight = dc.GetDeviceCaps (LOGPIXELSY) / 4;
    m_nRibbonWidth = m_nCellWidth / 2;
    m_nViewWidth = (26 * m_nCellWidth) + m_nRibbonWidth;  //这就是总宽度啦26与m_nRibbonWidth含义:如果完全展开的话就是26个字母+m_nRibbonWidth帮忙下

解决方案 »

  1.   


    我是拷贝的,我看啦一下午啦,
    m_nViewWidth就是全部宽度(全部展开的话)。
      

  2.   


    为甚麽是总宽度呢,tell  me why?
      

  3.   

    For one thing, I can't follow your until now. As my opinion, you want to know why the total with is calculated by this way. Are you? We can see the width  contain 27 columns. They are 26 letters and 1 index. Is it?
      

  4.   

    这个是MFC 程序设计树上的例子