document和view之间如何互相取得对方指针。
解决方案 »
- CString str="sql语句",str应该处理才能赋给Recordset的open方法?
- WinInet API 设置缓存问题
- 帮忙解释批处理作业调度
- 高手进,关于读取远程文件速度问题?????
- How to show the delta character in the column title of a listbox
- 怎么用代码创建odbc数据源
- opengl在多线程中的使用问题
- 如何在list control中不用点击鼠标左键和键盘放向键而高亮度选中项目?
- 调用GetOpenFileName()函数,程序卡死
- 不用MFC如何通过ODBC编写数据库应用程序?
- 效率是不是差不多啊?
- 指针的问题?
从document中访问所有的view:
用GetFirstViewPosition和GetNextView
void CMyDoc::OnRepaintAllViews()
{
POSITION pos = GetFirstViewPosition();
while (pos != NULL)
{
CView* pView = GetNextView(pos);
pView->UpdateWindow();
}
}从view中访问document:
用GetDocument