因为我的Cformview没有跟文档连,你看下MSDN中OnInitiaUpdate的说明就知道了。
另外MSDN中说了
The form-view window and child controls are not created until CWnd::Create is called. CWnd::Create is called by the framework as part of the document and view creation process, which is driven by the document template.
OnCreate中不行也是因为没有跟文档连的原因吧