Originally posted by: Allen Friend
Problem was the program would work fine when compiled
I was compiling a 16 Bit application with Visual C++
Many thanks Richard, for this great Printing Class Library !
void CPage::Table(TABLEHEADER* TheTable)
Fix for floating point error in the Printing Class Library.
in the debuging mode, but would casue a floating point
error to occurr when printing a Table when compiled in the
release mode. This problem was very random and would not
always crash in the same place. I found that the variable
" TheTable->EndRow " was being used without being
initialized first. This was the random cause for the
floating point error.
1.52 when this occurred. I also have and compile with
Visual C++ 6.0, but have not tried these functions in that
environment. The fix is listed here.
I have had the most programming problems with printing and
this Class is one BIG HELP to me.
{
////////////////////////////////////////////
// Not a part of original code but is needed
// because it is used here without being
// initialized first.
//
// This caused a floating point error to occure at
// random when compiled in the release mode using VC 1.52c
// Allen Friend 08/02/1999
//
// Note: The header file says not to set this, that it is
// calculated for you...., but without this being set here
// it is calculated from a random value at the start and
// the numbers generated are huge values.....
//
TheTable->EndRow = 0.00;
////////////////////////
Originally posted by: Snehraj Merchant
Hi,
when used in a project with settings for "use MFC in static library" there are no errors or warnings during compile but the application crashes when
CPrintRegion *Region1=pPage->CreateRegion(.5,0.0,1.5,3.9); is used.
when used as "use MFC in shared DLL" the linker generates a warning "LNK4089: all references to msvcp60.dll discarded by /opt:ref" and the application works without crashing.
any ideas what could be wrong. I would like to compile it and run it using "use MFC in static library"
all help will be appreciated
thanks
sneh
Originally posted by: Paul S
The demo crashes in when I chose Preview, Demo form.
I can see that it stops at Region2->DrawBorder() in void PrintForm1(CPage* pPage) ?
Originally posted by: John Stewart
anyone ever encounter the problem that the tables does not
print properly (the rows shrinked to unreadable height) on
even number of pages printed. (not necessarily the even
pages of the document)
but in preview mode, everything looks fine. i have looked
at the source code but nothing indicates what could be
right in preview mode and so wrong in actual printing mode.
anyone has any idea at all? any help would be much appreciated.
regards,
john
Originally posted by: Andrew Bantly
The prior section on this topic only addresses the document/view architecture. If you are manually creating the print dialog, this method doesn't work.
Why does the following code fail?
CPrintDialog dlg(FALSE, PD_NOPAGENUMS|PD_HIDEPRINTTOFILE|PD_NOSELECTION);
PRINTDLG pd;
LPDEVMODE plpDevMode;
pd = dlg.m_pd;
// plpDevMode = (LPDEVMODE)pd.hDevMode;
plpDevMode = (LPDEVMODE)dlg.GetDevMode();
plpDevMode->dmOrientation = DMORIENT_LANDSCAPE;
Originally posted by: Cramer
can a bitmap be added as a table entry?
thanks
Cramer
Originally posted by: Reinier Heeres
I wrote some printing code, of course with this (almost)
perfect code, and it worked on a winNT system with a
minolta PP20, also tested with nec pinwrite 62 (I think).
BUT: when I run the program on win98 it won't print. I
tried a HP printer, the nec printer, and it just won't work.
Any ideas, thanks in advance?
Originally posted by: Joseph Kiernan
At the bottom of the function, when the "old brush" is selected back into the DC, the "new brush" is deleted since it is no longer needed. However this "new brush" is a system stock object that probably should not be deleted. We have seen some strange display problems that can not be exactly traced back to this, but....
ReplyOriginally posted by: Joseph M. Newcomer
Please clarify. Do you mean Ctrl+C, Ctrl+X and Ctrl+V don't work, or that the Cut/Copy/Paste menu items don't work? If the latter, they should not be expected to work unless you add code explicitly routing them to the control. Note that standard MFC routing of cut/copy/paste menu items won't work because the MFC routing won't recognize the existence of the edit control in the status bar.
ReplyOriginally posted by: Ray Tomcej
I have implemented the printing class library in one of our applications, and have encountered no serious problems as long as output is directed to a local printer. When the application is run on a network, the program crashes occasionally, but not always. Is the class library restricted to local printers only?
Reply