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. How i can save DC(CPaintDC) or CDC in CBitmap?

How i can save DC(CPaintDC) or CDC in CBitmap?

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 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.
  • H Offline
    H Offline
    humais
    wrote on last edited by
    #1

    How i can save DC or CDC in CBitmap?? i'm using following code to save CPaintDC (dc) into CDC_(cdc)_ in OnPaint() function...

    cdc=GetWindowDC();
    cdc->BitBlt(100,100,600,600,cdc,0,0,SRCCOPY);

    & now i want to save CDC in CBitmap file...so i can use it in CImage attach function....i have to use CreateCompatableBitmap function or CreateDIBSection Function or anything else...?? :confused:

    L 1 Reply Last reply
    0
    • H humais

      How i can save DC or CDC in CBitmap?? i'm using following code to save CPaintDC (dc) into CDC_(cdc)_ in OnPaint() function...

      cdc=GetWindowDC();
      cdc->BitBlt(100,100,600,600,cdc,0,0,SRCCOPY);

      & now i want to save CDC in CBitmap file...so i can use it in CImage attach function....i have to use CreateCompatableBitmap function or CreateDIBSection Function or anything else...?? :confused:

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Why not try some of the suggestions you have been offered? Endlessly reposting this question will not change the design of the Windows API, GDI or MFC.

      It's time for a new signature.

      H 1 Reply Last reply
      0
      • L Lost User

        Why not try some of the suggestions you have been offered? Endlessly reposting this question will not change the design of the Windows API, GDI or MFC.

        It's time for a new signature.

        H Offline
        H Offline
        humais
        wrote on last edited by
        #3

        thankx GOD . . . atlast i found the solution... :) thank you every one for helping me..

        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