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. SnapShot

SnapShot

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

    I want my Program to take SnapShots while it's running without Pressing any Keys on the Keyboard. What Methods/Functions will I use?! please provide sample codes... thanks!!!

    E 1 Reply Last reply
    0
    • L Liger_Zero_X

      I want my Program to take SnapShots while it's running without Pressing any Keys on the Keyboard. What Methods/Functions will I use?! please provide sample codes... thanks!!!

      E Offline
      E Offline
      erkanina
      wrote on last edited by
      #2

      Use DirectDraw, SnapShot PrimarySurface.

      L 1 Reply Last reply
      0
      • E erkanina

        Use DirectDraw, SnapShot PrimarySurface.

        L Offline
        L Offline
        Liger_Zero_X
        wrote on last edited by
        #3

        Will it be able to Capture the Contents of my Screen?! pls, Help... I badly need this Information... Thanks!!!

        E T 2 Replies Last reply
        0
        • L Liger_Zero_X

          Will it be able to Capture the Contents of my Screen?! pls, Help... I badly need this Information... Thanks!!!

          E Offline
          E Offline
          erkanina
          wrote on last edited by
          #4

          Of course you can capture full contents of your screen, or a rectangle on the screen. This is the best solution for your purpose. There is lots of samples on the internet about this matter. Create DirectDraw Primary Surface Lock The surface and get the surface pointer Create a bitmap file Copy memory from surface pointer to file. (You have to take into account screen pixel depth (16,24,32 bit) for bitmap, these should be same bit depth)

          L 1 Reply Last reply
          0
          • E erkanina

            Of course you can capture full contents of your screen, or a rectangle on the screen. This is the best solution for your purpose. There is lots of samples on the internet about this matter. Create DirectDraw Primary Surface Lock The surface and get the surface pointer Create a bitmap file Copy memory from surface pointer to file. (You have to take into account screen pixel depth (16,24,32 bit) for bitmap, these should be same bit depth)

            L Offline
            L Offline
            Liger_Zero_X
            wrote on last edited by
            #5

            I think, this Info is for AVI or Video purpose... Am I right?! I only want to Get a SnapShot of the Whole Screen(like Pressing "PrtScr" Key)... Anyway, Thanks for the Info...

            1 Reply Last reply
            0
            • L Liger_Zero_X

              Will it be able to Capture the Contents of my Screen?! pls, Help... I badly need this Information... Thanks!!!

              T Offline
              T Offline
              ThatsAlok
              wrote on last edited by
              #6

              hain bussy i told you last day whole procedure ,u ra enot pressing the key on keyborad for taking snapdhot,this work will done by api for you pls do take note for this ----------------------------- "I Think It will Work" ----------------------------- Alok Gupta visit me at http://www.thisisalok.tk

              L 3 Replies Last reply
              0
              • T ThatsAlok

                hain bussy i told you last day whole procedure ,u ra enot pressing the key on keyborad for taking snapdhot,this work will done by api for you pls do take note for this ----------------------------- "I Think It will Work" ----------------------------- Alok Gupta visit me at http://www.thisisalok.tk

                L Offline
                L Offline
                Liger_Zero_X
                wrote on last edited by
                #7

                please tell me the whole procedure... i wasn't able to view the Thread that I made 2 days ago...

                1 Reply Last reply
                0
                • T ThatsAlok

                  hain bussy i told you last day whole procedure ,u ra enot pressing the key on keyborad for taking snapdhot,this work will done by api for you pls do take note for this ----------------------------- "I Think It will Work" ----------------------------- Alok Gupta visit me at http://www.thisisalok.tk

                  L Offline
                  L Offline
                  Liger_Zero_X
                  wrote on last edited by
                  #8

                  ok, i already got it!!! thanks alot!!! :-D:-D:-D:-D:-D

                  1 Reply Last reply
                  0
                  • T ThatsAlok

                    hain bussy i told you last day whole procedure ,u ra enot pressing the key on keyborad for taking snapdhot,this work will done by api for you pls do take note for this ----------------------------- "I Think It will Work" ----------------------------- Alok Gupta visit me at http://www.thisisalok.tk

                    L Offline
                    L Offline
                    Liger_Zero_X
                    wrote on last edited by
                    #9

                    How will I be able to Save it on a Bitmap/JPEG File?! thanks alot!!! AWESOME!!!:-D:-D:-D:-D:-D

                    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