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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. print problem

print problem

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++cssquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • _ Offline
    _ Offline
    _crs_
    wrote on last edited by
    #1

    hello, I have a big problem, I want to print a page (with MFC) and everything worked fine until I tried to print a colored text .... if I try to draw on printer CDC a color line or rectangle it works but with text don't ! why ?... if my color is less then RGB(255,128,0) the text is black if my color is greater the text is white ... please help ... thanks!

    B 1 Reply Last reply
    0
    • _ _crs_

      hello, I have a big problem, I want to print a page (with MFC) and everything worked fine until I tried to print a colored text .... if I try to draw on printer CDC a color line or rectangle it works but with text don't ! why ?... if my color is less then RGB(255,128,0) the text is black if my color is greater the text is white ... please help ... thanks!

      B Offline
      B Offline
      Bernhard
      wrote on last edited by
      #2

      maybe a silly answer.. but maybe your printer driver has got gray-scale set as default? check out the DEVMODE -structur (membervar in CPrintDlg). It has a member dmColor. It can be set to DMCOLOR_COLOR or DMCOLOR_MONOCHROME. Set it correctly and it should work.

      CPrintDialog dlg;
      m_DC = new CDC;
      
      // Attach a printer DC
      m_DC->Attach(r_printdlg.GetPrinterDC());
      m_DC->m_bPrinting = TRUE;
      	
      DEVMODE* pDevMode = r_printdlg.GetDevMode();
      pDevMode->dmColor = DMCOLOR_COLOR;
      m_DC->ResetDC (pDevMode);
      

      Maybe this works..


      "I'm from the South Bronx, and I don't care what you say: those cows look dangerous."
      U.S. Secretary of State Colin Powell at George Bush's ranch in Texas

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

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