Solved

OnPreparePrinting error

Posted on 1997-04-07
2
939 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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 …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

856 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