Thread: Capturing window content

  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    39

    Question Capturing window content

    Hi all,

    This is what I have:
    A program that will take the handle of a window that is in the foreground and then take a printout (in postscript format) of whatever is visible in that window.

    This is what I would like to do:
    1) To get the handle of the window when it is in a minimized state.
    2) Take a printout of the contents of the window while it is still in the minimized state.

    Can anyone help me achieve goal 1 and 2.

    Regards

  2. #2

  3. #3
    Registered User
    Join Date
    May 2005
    Posts
    39

    Lightbulb hmm...looks interesting!

    Hey anonytmouse...

    I think this might contain just what I want!
    Will try it and come back to you in a couple of days (day off at office )

  4. #4
    Registered User
    Join Date
    May 2005
    Posts
    39

    good progress...

    alright, here's the update

    As I will be generating my own window, I decided to go with technique number 1 as mentioned in that article.
    It worked just as I wanted, but there are few issues left to resolve.
    1) I am interested in capturing only the client area of the window. I tried using WM_PRINTCLIENT, but it doesn't work. So I decided to try something else. How about creating a window without toolbars or scroll bars, just the client area? now is that possible?
    2) My final step would be to attach an ActiveX control with the window and paste a flash object and then try to capture it. Will the above method work here? Does WM_PRINT take a pixel by pixel snapshot of the window? b'coz if it does, then I won't need to worry.

    Regards,

  5. #5
    Registered User
    Join Date
    May 2005
    Posts
    39

    Unhappy problems again

    I have managed to capture contents of hidden windows and dialog boxes. But just as I had feared, the technique used doesn't help me in capturing any 'Shockwave Flash Object' that has been added to the window.
    The Flash Object acts like some kind of transparent window, and the window doesn't even recognize what is on it. I guess I may have to get the data from the flash object somehow.
    Any one feels they can suggest some other techniques?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Just starting Windows Programming, School me!
    By Shamino in forum Windows Programming
    Replies: 17
    Last Post: 02-22-2008, 08:14 AM
  2. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 08:23 AM
  3. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 11:06 AM
  4. Pong is completed!!!
    By Shamino in forum Game Programming
    Replies: 11
    Last Post: 05-26-2005, 10:50 AM
  5. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM