Solved

OnPreparePrinting error

Posted on 1997-04-07
2
948 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Suggested Courses

752 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