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. Only Desktop capturing without some active windows or capture only Desktop i.e Desktop Background and Icons

Only Desktop capturing without some active windows or capture only Desktop i.e Desktop Background and Icons

Scheduled Pinned Locked Moved C / C++ / MFC
help
8 Posts 4 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.
  • N Offline
    N Offline
    narmadha_s
    wrote on last edited by
    #1

    I need to capture Desktop and Filter with some active windows Or I need to capture only Desktop i.e Desktop Background and Icons if some other active windows are maximized. Please help me to do this. In my project this is main concept. Thanks to spend your valuable times for this. Thanks & Regards Narmadha

    L D S 3 Replies Last reply
    0
    • N narmadha_s

      I need to capture Desktop and Filter with some active windows Or I need to capture only Desktop i.e Desktop Background and Icons if some other active windows are maximized. Please help me to do this. In my project this is main concept. Thanks to spend your valuable times for this. Thanks & Regards Narmadha

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

      narmadha_s wrote:

      I need to capture Desktop and Filter with some active windows

      You need to explain better what you mean by this. What exactly are you trying to capture, and what do you want to do with it?

      N 1 Reply Last reply
      0
      • N narmadha_s

        I need to capture Desktop and Filter with some active windows Or I need to capture only Desktop i.e Desktop Background and Icons if some other active windows are maximized. Please help me to do this. In my project this is main concept. Thanks to spend your valuable times for this. Thanks & Regards Narmadha

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        If you already know how to initiate a "print screen" command to capture windows, then you could precede that with something like the following to minimize all windows first:

        CoInitialize(NULL);
        IShellDispatch4 *pShellDisp = NULL;
        HRESULT sc = CoCreateInstance(CLSID_Shell, NULL, CLSCTX_SERVER, IID_IDispatch, (LPVOID *) &pShellDisp);
        sc = pShellDisp->ToggleDesktop();
        // do screen capture here
        sc = pShellDisp->ToggleDesktop();
        pShellDisp->Release();

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

        N 1 Reply Last reply
        0
        • L Lost User

          narmadha_s wrote:

          I need to capture Desktop and Filter with some active windows

          You need to explain better what you mean by this. What exactly are you trying to capture, and what do you want to do with it?

          N Offline
          N Offline
          narmadha_s
          wrote on last edited by
          #4

          I want to capture total desktop. In that i have to filter my application window only. i.e Have to capture entire desktop with some restrictions. This is for like call center application. Without my application window, i have to capture entire desktop. But my application will be visible and active window on desktop. Please kindle help me... Thanks to spend your valuable time for this..... Regards, Narmadha

          L 1 Reply Last reply
          0
          • D David Crow

            If you already know how to initiate a "print screen" command to capture windows, then you could precede that with something like the following to minimize all windows first:

            CoInitialize(NULL);
            IShellDispatch4 *pShellDisp = NULL;
            HRESULT sc = CoCreateInstance(CLSID_Shell, NULL, CLSCTX_SERVER, IID_IDispatch, (LPVOID *) &pShellDisp);
            sc = pShellDisp->ToggleDesktop();
            // do screen capture here
            sc = pShellDisp->ToggleDesktop();
            pShellDisp->Release();

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

            N Offline
            N Offline
            narmadha_s
            wrote on last edited by
            #5

            Thank you for the reply... But i have to capture without minimize the windows. Actually, My requirement is, I have to capture Entire desktop without my application window. My application will be visible and active window on desktop. Please do you have any idea on this help me... Regards, Narmadha

            D 1 Reply Last reply
            0
            • N narmadha_s

              I want to capture total desktop. In that i have to filter my application window only. i.e Have to capture entire desktop with some restrictions. This is for like call center application. Without my application window, i have to capture entire desktop. But my application will be visible and active window on desktop. Please kindle help me... Thanks to spend your valuable time for this..... Regards, Narmadha

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

              See Various methods for capturing the screen[^].

              1 Reply Last reply
              0
              • N narmadha_s

                I need to capture Desktop and Filter with some active windows Or I need to capture only Desktop i.e Desktop Background and Icons if some other active windows are maximized. Please help me to do this. In my project this is main concept. Thanks to spend your valuable times for this. Thanks & Regards Narmadha

                S Offline
                S Offline
                Software_Developer
                wrote on last edited by
                #7

                First. Minimize All running apps. Run the code below.

                #include #include using namespace std;

                int main()
                {
                keybd_event(VK_MENU, 0, 0, 0); //Alt Press
                keybd_event(VK_SNAPSHOT, 0, 0, 0); //PrntScrn Press

                keybd\_event(VK\_SNAPSHOT, 0, KEYEVENTF\_KEYUP, 0); //PrntScrn Release
                keybd\_event(VK\_MENU, 0, KEYEVENTF\_KEYUP, 0); //Alt Release
                

                return 0;
                }

                1 Reply Last reply
                0
                • N narmadha_s

                  Thank you for the reply... But i have to capture without minimize the windows. Actually, My requirement is, I have to capture Entire desktop without my application window. My application will be visible and active window on desktop. Please do you have any idea on this help me... Regards, Narmadha

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #8

                  narmadha_s wrote:

                  I have to capture Entire desktop without my application window.

                  So then minimize just your app and then capture the desktop.

                  "One man's wage rise is another man's price increase." - Harold Wilson

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                  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