文档/视图结构中的各个部分是如何联系到一起的[21]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 coordinate 的 blog

        ……

              activateframe(ncmdshow);

              if (pview != null)

                     pview->onactivateview(true, pview, pview);

       }

 

       // update frame counts and frame title (may already have been visible)

       if (pdoc != null)

              pdoc->updateframecounts();

       onupdateframetitle(true);

}

上面的函数中对视图的操作主要是用setactiveview设置了活动视图,并且调用了视图的onactivateframe函数。在cframewnd类中维护着一个保护成员:cview* m_pviewactive;setacitveview函数主要就是对它进行操作:

void cframewnd::setactiveview(cview* pviewnew, bool bnotify)

{

       cview* pviewold = m_pviewactive;

       if (pviewnew == pviewold)

              return;     // do not re-activate if setactiveview called more than once

 

       m_pviewactive = null;   // no active for the following processing

 

       // deactivate the old one

       if (pviewold != null)

本文关键:文档/视图结构中的各个部分是如何联系到一起的
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top