Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
R

raytheonthenak

@raytheonthenak
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • MFC printing extra blank page
    R raytheonthenak

    Actually its nothing like that. If you research the MFC underlying infrastructure, the CPrintInfo object has default min, max page values of 1 & 0xFFFF respectively. Thus when printing it will print to those pages, until it encounters a page with no data. As far as Ive found the only way to get rid of this is to SetMaxPage to the correct number of pages. But the textmetrics & sizes that some Printer DeviceContexts return to you arent correct, so Im still having problems determining exactly how to calculate this. Also strangely, in my font, the boldface char's seem to take up barely more space than the regular ones. Im still working on this problem, so Im not sure what the solution is yet

    C / C++ / MFC c++ tutorial question

  • MFC printing extra blank page
    R raytheonthenak

    Yes, Im using DEVICECAPS and other methods to calc the drawable area. The extra page does not print my headers and footers on it, so it must not be calling OnPrint for the last blank page. As per the other response I have tried it on different printers and different documents and it always prints the extra page. I was wondering if theres any way to override OnEndPrint or some "cheap" way to just stop it from spitting out that extra page. (Could the printer be receiving some line feed or something after the actual document that makes it print a blank page?)

    C / C++ / MFC c++ tutorial question

  • MFC printing extra blank page
    R raytheonthenak

    I created an SDI MFC app, and print preview shows the correct range of pages, but when actually printing (on any printer) it will print a trailing blank page. I have overloaded the functions OnPrint, OnBeginPrinting, OnPreparePrinting (for a CRichEditView derived class). Ive tried calculating the value for SetMaxPage() using char heights and lines per document, etc. but it never comes out right. Any suggestions as to how to get the framework to stop printing the extra blank page every time? nak

    C / C++ / MFC c++ tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups