利用CSplitterWnd的CreateStatic函数
m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CLegendView),CSize(100,100),pContext);
m_wndSplitter.CreateView(0,1,RUNTIME_CLASS(CLFView), CSize(100,100),pContext);
两个View类均由CFormView类继承而来
编译时报告如下错误:
d:\motest\lf\lfview.h(32) : error C2143: syntax error : missing ';' before '*'
d:\motest\lf\lfview.h(32) : error C2501: 'CLFDoc' : missing storage-class or type specifiers
d:\motest\lf\lfview.h(32) : error C2501: 'GetDocument' : missing storage-class or type specifiers
发生错误的行为:LFView.h中的 CLFDoc* GetDocument();
奇怪的时将此行注释掉,编译报告一个错误,
D:\motest\LF\LFView.cpp(130) : error C2509: 'GetDocument' : member function not declared in 'CLFView'
d:\lf\lfview.h(17) : see declaration of 'CLFView'
取消注释,再编译,通过!!!真是让我费解,请高手指点!
m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CLegendView),CSize(100,100),pContext);
m_wndSplitter.CreateView(0,1,RUNTIME_CLASS(CLFView), CSize(100,100),pContext);
两个View类均由CFormView类继承而来
编译时报告如下错误:
d:\motest\lf\lfview.h(32) : error C2143: syntax error : missing ';' before '*'
d:\motest\lf\lfview.h(32) : error C2501: 'CLFDoc' : missing storage-class or type specifiers
d:\motest\lf\lfview.h(32) : error C2501: 'GetDocument' : missing storage-class or type specifiers
发生错误的行为:LFView.h中的 CLFDoc* GetDocument();
奇怪的时将此行注释掉,编译报告一个错误,
D:\motest\LF\LFView.cpp(130) : error C2509: 'GetDocument' : member function not declared in 'CLFView'
d:\lf\lfview.h(17) : see declaration of 'CLFView'
取消注释,再编译,通过!!!真是让我费解,请高手指点!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货