Desktop Window

This is a discussion on Desktop Window within the Windows Programming forums, part of the Platform Specific Boards category; I am using Visual C++ 6.0 and I want to know how to get a picture of the desktop of ...

  1. #1
    Unregistered
    Guest

    Desktop Window

    I am using Visual C++ 6.0 and I want to know how to get a picture of the desktop of my computer as a bitmap or whatever image format I can get it in.

    I know that there's this functon called GetDesktopWindow() but it how can I use it to get a visual image of the Desktop ?

    Can anyone please help ?

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    GetDesktopWindow() returns the HWND (handle to the window)

    Will not get the wallpaper/desktop.

    I don't know of a function that will. I would be looking for a screen capture function.

  3. #3
    Registered User ski6ski's Avatar
    Join Date
    Aug 2001
    Posts
    133

    hmmm......

    This is what i do know:
    1) The button called [Print Scrn] (next to [Scroll Lock]) allows you to capture the screen.
    2) You can open paint and paste the captured picture and view/save/whatever.
    3) Find a way to automate this process.

    That is how i would get started on this project.
    C++ Is Powerful
    I use C++
    There fore I am Powerful

  4. #4
    Registered User johnnie2's Avatar
    Join Date
    Aug 2001
    Posts
    186
    http://msdn.microsoft.com/library/de...tmaps_5a5h.asp gives an example of capturing the desktop window and writing it to a bitmap using BitBlt().
    "Optimal decisions, once made, do not need to be changed." - Robert Sedgewick, Algorithms in C

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 09:23 AM
  2. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 11:06 AM
  3. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 01:34 PM
  4. problem with open gl engine.
    By gell10 in forum Game Programming
    Replies: 1
    Last Post: 08-21-2003, 05:10 AM
  5. OpenGL and Windows
    By sean345 in forum Game Programming
    Replies: 5
    Last Post: 06-24-2002, 11:14 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21