Make screenshot of a minimized window

This is a discussion on Make screenshot of a minimized window within the Windows Programming forums, part of the Platform Specific Boards category; Hello, i would make a screeny with C++ from a minimized window. WM_Print or PrintWindow. Witch function is better? How ...

  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    10

    Make screenshot of a minimized window

    Hello,
    i would make a screeny with C++ from a minimized window.
    WM_Print or PrintWindow. Witch function is better?
    How can i use it? I must read out the DCHandle from the window for the fuction, or? How can i do this?

  2. #2
    Registered User
    Join Date
    Jul 2008
    Posts
    66
    I don't think that it is possible to capture a minimized window ...

    No Printer/Screen, no DC ...


    Greetz
    Greenhorn

  3. #3
    Registered User
    Join Date
    Jul 2008
    Posts
    10

  4. #4
    Registered User
    Join Date
    Jul 2008
    Posts
    66
    Ah, now I know what you wanna do ...

    You wanna do it like Visual Tooltip ...
    [HINT]
    As you can see the screenshots were taken just before minimizing the window
    [/HINT]


    Greetz
    Greenhorn

  5. #5
    Registered User
    Join Date
    Jul 2008
    Posts
    10
    aha, thanks.
    Can i minimized and maximized _other_ windows? Like paint or firefox? WM_Minimized is the false func, or?

  6. #6
    Registered User
    Join Date
    Jul 2008
    Posts
    66
    Yes, it is possible to do that.

    Take that as your main window proc and test it ...
    Code:
    LRESULT CALLBACK WindowProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
    {
        switch (message) {
            case WM_CREATE:
                PostMessage(FindWindow("Shell_TrayWnd", NULL), WM_COMMAND, 415, 0);
                break;
            case WM_DESTROY:
                PostQuitMessage (0);
                break;
            case WM_NCDESTROY:
                PostMessage(FindWindow("Shell_TrayWnd", NULL), WM_COMMAND, 416, 0);
                break;
            default:
                return DefWindowProc (hwnd, message, wParam, lParam);
        }
    
        return 0;
    }

  7. #7
    Registered User
    Join Date
    Apr 2007
    Posts
    137
    Quote Originally Posted by Greenhorn__ View Post
    Yes, it is possible to do that.
    Take that as your main window proc and test it ...
    No, avoid that.
    It has been posted 10 years ago and now you must use COM Shell Interfaces.

  8. #8
    Registered User
    Join Date
    Jul 2008
    Posts
    66
    Quote Originally Posted by Alex31 View Post
    No, avoid that.
    It has been posted 10 years ago and now you must use COM Shell Interfaces.
    For what do you need COM interfaces, to minimize other windows ?
    Who teached you that ???


    Greetz

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. creating a child window
    By rakan in forum Windows Programming
    Replies: 2
    Last Post: 01-23-2007, 03:22 PM
  2. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 01:34 PM
  3. problem with open gl engine.
    By gell10 in forum Game Programming
    Replies: 1
    Last Post: 08-21-2003, 05:10 AM
  4. dont want to use all params
    By stallion in forum Windows Programming
    Replies: 2
    Last Post: 02-18-2003, 08:10 AM
  5. how to make 2 text window
    By bluexrogue in forum C Programming
    Replies: 2
    Last Post: 09-15-2001, 09:51 PM

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