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

Print Picture

Scheduled Pinned Locked Moved C / C++ / MFC
graphicsperformancehelpquestion
4 Posts 3 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.
  • V Offline
    V Offline
    vancouver777
    wrote on last edited by
    #1

    I am trying to print out everything in Picturebox. I can't print out anything except blank. Here is my source in MyViewClass::OnPrint(CDC* pDC, CPrintInfo* pInfo ) and please help me how I am doing wrong? CRect rect; GetWindowRect(&rect); //CDC* pTempDC = GetWindowDC(); CDC memDC; //IGBMapViewCtrl d; //d.GetDC(); memDC.CreateCompatibleDC( pDC ); // create bitmap with my window-pDC and set it in the memory-DC CBitmap bitmap; bitmap.CreateCompatibleBitmap( m_MapView.GetDC(), rect.Width(), rect.Height()); memDC.SelectObject(&bitmap); // open printer dialog // detach DCs bitmap.Detach();

    C 1 Reply Last reply
    0
    • V vancouver777

      I am trying to print out everything in Picturebox. I can't print out anything except blank. Here is my source in MyViewClass::OnPrint(CDC* pDC, CPrintInfo* pInfo ) and please help me how I am doing wrong? CRect rect; GetWindowRect(&rect); //CDC* pTempDC = GetWindowDC(); CDC memDC; //IGBMapViewCtrl d; //d.GetDC(); memDC.CreateCompatibleDC( pDC ); // create bitmap with my window-pDC and set it in the memory-DC CBitmap bitmap; bitmap.CreateCompatibleBitmap( m_MapView.GetDC(), rect.Width(), rect.Height()); memDC.SelectObject(&bitmap); // open printer dialog // detach DCs bitmap.Detach();

      C Offline
      C Offline
      cje
      wrote on last edited by
      #2

      to print a bitmap, you need to use a device independent bitmap (DIB), not a device dependent bitmap

      V S 2 Replies Last reply
      0
      • C cje

        to print a bitmap, you need to use a device independent bitmap (DIB), not a device dependent bitmap

        S Offline
        S Offline
        sdfdsfa
        wrote on last edited by
        #3

        Thank you, I will test it. Shin

        1 Reply Last reply
        0
        • C cje

          to print a bitmap, you need to use a device independent bitmap (DIB), not a device dependent bitmap

          V Offline
          V Offline
          vancouver777
          wrote on last edited by
          #4

          Thank you, I will test it. Shin

          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