Upgraded code form VC6.0 to VS2005 platforma
I have upgraded code from vc6.0 to vs 2005. After removing all the compiler error i ran the code and found some breaking of the functionality like print preview. I debugged the code and found out that in vc6 version viewprev.cpp platform file was using
CFrameWnd* pParent = STATIC_DOWNCAST(CFrameWnd, AfxGetMainWnd());
to get the parent and in vs2005 viewprev.cpp is using
CWnd* pMainWnd = GetParentFrame();
if (DYNAMIC_DOWNCAST(CFrameWnd, pMainWnd) == NULL)
// if it's not a frame, we'll try the main window
pMainWnd = AfxGetMainWnd();
CFrameWnd* pParent = STATIC_DOWNCAST(CFrameWnd, pMainWnd);
to get the parent. I thought this was breaking the functionality than i did
CWnd* pMainWnd = AfxGetMainWnd();
to achieve the same effect and it worked. but after doing this i was getting the print preview with no toolbar(which was present in vc6). And it is crashing when i close it.
Can anybody explain me the reason and answer why i am not getting the toolbar and why it is crashing or the soln to solve the problem?
Re: Upgraded code form VC6.0 to VS2005 platforma
Hello mcfnewbee. You'll probably find that MFC does not have that capability. You'd probably be better asking at a Microsoft forum.
|All times are GMT +5.5. The time now is 16:03.|