-
July 16th, 2013, 05:02 AM
#1
Migration of Print Preview code from VC++ 6.0 to VC++ 2008
Hi,
I am migrating my project from VC++ 6.0 to VC++ 2008.I have been successful in doing so until now,where I am stuck up with Priint Preview part of the project.I have googled for this, and made some changes to my code.I find no compilation errors in the code,but The Print Preview editor doesn't launches itself.
I found that,making
CPrintDocument::IsPrintPreview_S()
forcefully false in the code while running,launches the Print Preview editor after some assertions.It launches with inaccuracies in the display.i.e., Scrollbar is not moving properly and others.
As I said before,I have made these following code changes,
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);
CWnd* pToolBar = pParent->GetDlgItem(AFX_IDW_PREVIEW_BAR);
Thanks to anyone who helps me in this.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|