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
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.
  • L Offline
    L Offline
    Liger_Zero_X
    wrote on last edited by
    #1

    Hi, I want to Get a SnapShot of my System, somewhat like pressing "PrtScr" Key on the Keyboard... Anyone, Sample Code please... Thanks!!! :-D:-D:-D:-D:-D

    R T 2 Replies Last reply
    0
    • L Liger_Zero_X

      Hi, I want to Get a SnapShot of my System, somewhat like pressing "PrtScr" Key on the Keyboard... Anyone, Sample Code please... Thanks!!! :-D:-D:-D:-D:-D

      R Offline
      R Offline
      Ryan Binns
      wrote on last edited by
      #2

      Look at the keybd_event() function to synthesize keystrokes, with the VK_SNAPSHOT virtual key code. Make sure you generate a key press and a key release (see the dwFlags parameter). Hope this helps,

      Ryan

      "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

      1 Reply Last reply
      0
      • L Liger_Zero_X

        Hi, I want to Get a SnapShot of my System, somewhat like pressing "PrtScr" Key on the Keyboard... Anyone, Sample Code please... Thanks!!! :-D:-D:-D:-D:-D

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

        ::keybd_event(VK_SNAPSHOT,0x45,KEYEVENTF_EXTENDEDKEY|0,0); use this api to get snapshot. and getting that image into your Application you have to querry Clipboard like this //paste HANDLE hBitmap=NULL; if (OpenClipboard()) hBitmap=GetClipboardData(CF_BITMAP); CloseClipboard(); and you got the image handle in hBitmap var I Think It will Work ----------------------------- Alok Gupta visit me at http://www.thisisalok.tk

        L 1 Reply Last reply
        0
        • T ThatsAlok

          ::keybd_event(VK_SNAPSHOT,0x45,KEYEVENTF_EXTENDEDKEY|0,0); use this api to get snapshot. and getting that image into your Application you have to querry Clipboard like this //paste HANDLE hBitmap=NULL; if (OpenClipboard()) hBitmap=GetClipboardData(CF_BITMAP); CloseClipboard(); and you got the image handle in hBitmap var 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
          #4

          what if, i don't want to press a key?! coz, i want to make it automated... thanks for the info!!!

          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