Solved

OnPreparePrinting error

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Replacement selected text 2 61
Complete beginner needs help making a cron job 9 116
format the code in java 6 93
Problem to App source 6 39
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

770 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