大哥, 能不能说详细点啊。。 有错啊--------------------Configuration: dd7 - Win32 Debug-------------------- Compiling... dd7View.cpp F:\study\vc\dd74\dd7\dd7View.cpp(240) : error C2039: 'GetSaftHWnd' : is not a member of 'CDd7View' f:\study\vc\dd74\dd7\dd7view.h(13) : see declaration of 'CDd7View' F:\study\vc\dd74\dd7\dd7View.cpp(240) : error C2039: 'GetHDC' : is not a member of 'CDC' c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(636) : see declaration of 'CDC' Error executing cl.exe.dd7.exe - 2 error(s), 0 warning(s)
Sorry,Just I made a spelling mistake.Now write it again: ::SendMessage(pSpecifiedView->GetSafeHWnd(),WM_PAINT,(pSpecifiedViw->GetDC())->GetSafeHdc(),0);
谢谢大哥回答我的问题 但是仍然有错,我的pView后箭头的函数都有了 我得代码:::SendMessage(pView->GetSafeHwnd(),WM_PAINT,(pView->GetDC())->GetSafeHdc(),0); 错误如下: --------------------Configuration: dd7 - Win32 Debug-------------------- Compiling... dd7View.cpp F:\study\vc\dd74\dd7\dd7View.cpp(245) : error C2664: 'SendMessageA' : cannot convert parameter 3 from 'struct HDC__ *' to 'unsigned int' This conversion requires a reinterpret_cast, a C-style cast or function-style cast Error executing cl.exe.dd7.exe - 1 error(s), 0 warning(s)
有错啊--------------------Configuration: dd7 - Win32 Debug--------------------
Compiling...
dd7View.cpp
F:\study\vc\dd74\dd7\dd7View.cpp(240) : error C2039: 'GetSaftHWnd' : is not a member of 'CDd7View'
f:\study\vc\dd74\dd7\dd7view.h(13) : see declaration of 'CDd7View'
F:\study\vc\dd74\dd7\dd7View.cpp(240) : error C2039: 'GetHDC' : is not a member of 'CDC'
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(636) : see declaration of 'CDC'
Error executing cl.exe.dd7.exe - 2 error(s), 0 warning(s)
::SendMessage(pSpecifiedView->GetSafeHWnd(),WM_PAINT,(pSpecifiedViw->GetDC())->GetSafeHdc(),0);
但是仍然有错,我的pView后箭头的函数都有了
我得代码:::SendMessage(pView->GetSafeHwnd(),WM_PAINT,(pView->GetDC())->GetSafeHdc(),0);
错误如下:
--------------------Configuration: dd7 - Win32 Debug--------------------
Compiling...
dd7View.cpp
F:\study\vc\dd74\dd7\dd7View.cpp(245) : error C2664: 'SendMessageA' : cannot convert parameter 3 from 'struct HDC__ *' to 'unsigned int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
Error executing cl.exe.dd7.exe - 1 error(s), 0 warning(s)
但是
假设有A、B两个视图,他们基于一个文档,当A画完,B画另一个与A不同的视图时,
若移动B视图会调用WM_ONPAINT,A仍会刷新。
你说的方法没有能把A保持住。请问还有什么办法啊
UpdateAllViews(this,0,NULL)也不行啊。。
分送上,反正我也没有什么用。