Solved

OnPreparePrinting error

Posted on 1997-04-07
2
924 Views
Last Modified: 2013-11-20
I have an app. which uses the "OnPreparePrinting" class.
in this function I set my max page i.e
pInfo->SetMaxPage(2), and then call
BOOL bRet = DoPreparePrinting(pInfo);

At this point when I run my app. my print dialog comes up where I choose my printer type, number of pages.. and then click on OK.  Somewhere in the DoPreparePrinting, I get
an assertion failed error.

File: viewprnt.cpp line 211 which shows as follows:

VERIFY(pInfo->m_strPageDesc.LoadString(AFX_IDS_PREVIEWPAGEDESC));
I don't know how to get around this verify.  I am not sure what I have to set in my pInfo struct. to get around this error.

Can anyone help?
Thanking you in advance,

Sunjoy
0
Comment
Question by:parmar
2 Comments
 
LVL 1

Accepted Solution

by:
serge010697 earned 50 total points
ID: 1300907
Try to include AFXPRINT.RC file in your project.
It should be in MFC\INCLUDE subdirectory of your VC++ directory.
At least this is truth for VC++ 4.2.
0
 
LVL 4

Expert Comment

by:mbhakta
ID: 1300908
Tell us which/what version of VC++ are you using ??
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to monitor remote shell execution on linux 9 97
VBA "SendKeys" Syntax for Multiple Keystrokes 7 103
ShiftLeft challenge 21 76
scoreUp challenge 14 56
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now