我去网上查了单文档多视图的使用方法,也成功了,第二个视图类是从CView派生下来的,但是如果第二个视图类我从CScrollView派生下来的话就会出问题,只要一切换到第二个视图就会出错,这是哪里的问题?错误是这样的:
---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Assertion Failed!Program: C:\Users\123\Documents\VC\123\Debug\123.exe
File: viewscrl.cpp
Line: 134For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.(Press Retry to debug the application)
---------------------------
中止(A) 重试(R) 忽略(I)
---------------------------
---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Assertion Failed!Program: C:\Users\123\Documents\VC\123\Debug\123.exe
File: viewscrl.cpp
Line: 134For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.(Press Retry to debug the application)
---------------------------
中止(A) 重试(R) 忽略(I)
---------------------------
解决方案 »
- 我想再image上显示验证码?
- vs2005的程序xp下运行正常,win7下出现奇怪错误,为什么?
- SendMessage 要不要把消息投递消息队列中
- 菜鸟提问,非常感谢!!!文件中内容查找及替换
- LINK : error LNK2034: metadata inconsistent with COFF symbol table: symbol '??$primCollectionKey@VMYCopyInstructionsCollection@@
- 共享目录
- 关于ListView的问题
- 大放送啦!!!!!
- 如何在VC中调用MATLAB的一些函数,将VC中的数据用MATLAB中的坐标图绘制出来?
- VC小问
- 校验和算法的疑惑
- 如何改变静态文本框的背景色和字体颜色??
以下来自 http://hi.baidu.com/shidagis/blog/item/b7b83e24fc481b3e8644f976.html
To correct this you have to insert a call to SetScrollSizes(...) before your view will be shown.I did it the following way:Code:
BOOL CMyView::PreCreateWindow(CREATESTRUCT& cs)
{SetScrollSizes(MM_TEXT, CSize(1000,1000));return CScrollView::PreCreateWindow(cs);
}.