| Author |
Message |
|
M.Ranganatha #1 / 14
|
 How to grab image from window in WIN NT/95?
Hello! I am designing an application under windows NT where I would like to grab the contents of a window and generate a gif or ppm file. Under X I usually use " xwd window_id | xwdtoppm > filename " to achieve this. How can I achieve the same effect under windows NT or windows 95? Is there a tool that will do the same thing? Is there an API that gets me the information I need ? (thereby allowing me to build such a tool?) I am pretty windows naieve so this might be a pretty obvious question. Thank you for your help in advance. Ranga.
|
| Sat, 18 Aug 2001 03:00:00 GMT |
|
 |
|
D. Richard Hip #2 / 14
|
 How to grab image from window in WIN NT/95?
The way I do this manually is to used VNC (http://www.uk.research.att.com/vnc/) to mirror the Windows95/98/NT console over on a Unix box. Then use the standard Unix/X11 techniques you describe above to grab an image of the window. If you are wondering how you can do this under program control, on NT, with no Unix box handy, then I have no clue. If you find out, please share your findings with me. -- D. Richard Hipp -- d...@acm.org -- http://www.hwaci.com/drh/
|
| Sun, 19 Aug 2001 03:00:00 GMT |
|
 |
|
Robin Becke #3 / 14
|
 How to grab image from window in WIN NT/95?
In article <36DC8147.3B883...@snad.ncsl.nist.gov>, M.Ranganathan <mra...@snad.ncsl.nist.gov> writes
the API must exist since Alt+PrintScreen copies the active window into the Cut buffer as a Win32 BMP. There's also Zoomin which copies the whole window somehow. -- Robin Becker
|
| Sun, 19 Aug 2001 03:00:00 GMT |
|
 |
|
Jerry Coff #4 / 14
|
 How to grab image from window in WIN NT/95?
In article <36DC8147.3B883...@snad.ncsl.nist.gov>, mra...@snad.ncsl.nist.gov says... [ ... ]
There are quite a few utilities along this line for Windows. MS has one that's free and comes with source code as Wincap32 on their web site.
|
| Sun, 19 Aug 2001 03:00:00 GMT |
|
 |
|
Rolf Schroedte #5 / 14
|
 How to grab image from window in WIN NT/95?
Under Win95 I grab a window manually: <Alt> + <PrtScr> copies the focussed window as a windows-bitmap to clipboard then you can <Paste> it to MS-Paint to save the bitmap or to any other program which can write gif's or ppm's.
--------------------------------------------------------------------- German Aerospace Center Rolf Schroedter Inst. of Planetary Exploration Tel/Fax: +49 (30) 67055-416/384 Rudower Chaussee 5, D-12489 Berlin Internet: Rolf.Schroed...@dlr.de
|
| Sun, 19 Aug 2001 03:00:00 GMT |
|
 |
|
Bruce S. O. Adam #6 / 14
|
 How to grab image from window in WIN NT/95?
Is it wise to trust M$ source code? I mean do you trust windows? :-)
|
| Sun, 19 Aug 2001 03:00:00 GMT |
|
 |
|
Jerry Coff #7 / 14
|
 How to grab image from window in WIN NT/95?
In article <36DD86A1.A4BF8...@rmc-ltd.com>, bruce.ad...@rmc-ltd.com says... [ ... ]
As long as you examine it first, and trust it based on your own knowledge of Windows, you might just about as well trust it as anything else. OTOH, even downloading it might involve trusting ME, which would definitely be unwise.
Yes. I trust it to provide lots of programmers with jobs, at least until tomorrow, and probably even sometime past next week. Especially in the case of Windows 95 or 98, I trust it to have enough bugs to keep those programmers VERY busy for years to come...
|
| Mon, 20 Aug 2001 03:00:00 GMT |
|
 |
|
Bruce S. O. Adam #8 / 14
|
 How to grab image from window in WIN NT/95?
Call me a cynic but it often often seems like microsoft have deliberately introduced bugs just to drive the software industry in a particular direction. I mean no-one could write code that bad accidently could they? :-)
|
| Tue, 21 Aug 2001 03:00:00 GMT |
|
 |
|
M.Ranganatha #9 / 14
|
 How to grab image from window in WIN NT/95?
Good tip. I got hold of wincap (1992 vintage ... could not find the 32 bit version). I incorporated some of the code I needed and made 32-bit specific modifications. This enabled me to grab window contents from the command line and store it as a bmp file. Next I recompiled netpbm (or at least parts of it) using the cygnus cygwin32 toolkit. This enabled me to go from bmp to ppm - which can be handled by tk and that is basically what I wanted. I am willing to share the modified wincap code with the understanding that neither myself nor NIST makes any guarantees about its correctness and/or applicability. (blah blah....) Ranga.
|
| Tue, 21 Aug 2001 03:00:00 GMT |
|
 |
|
Andreas Kuprie #10 / 14
|
 How to grab image from window in WIN NT/95?
"Bruce S. O. Adams" <bruce.ad...@rmc-ltd.com> writes:
Now where was that nice page about M$, bugs and features .... aku@bluepeak:/home/aku/ > gc 'Gates;Focus;Bug' writing results... aku@bluepeak:/home/aku/ > netscape Hah. http://www.cantrip.org/nobugs.html Enjoy. Or not. -- Sincerely, Andreas Kupries <a.kupr...@westend.com> <http://www.westend.com/~kupries/> ------------------------------------------------------------------------------- Flames > /dev/null
|
| Fri, 24 Aug 2001 03:00:00 GMT |
|
 |
|
Ron Darz #11 / 14
|
 How to grab image from window in WIN NT/95?
On Wed, 03 Mar 1999 18:59:46 +0000, "Bruce S. O. Adams"
Hi, You can just do ctrl+print-screen and have the image in your clipboard.... Ron.
|
| Sat, 25 Aug 2001 03:00:00 GMT |
|
 |
|
Bruce S. O. Adam #12 / 14
|
 How to grab image from window in WIN NT/95?
I didn't write that! This thread has been snipped beyond all recognition. The original poster, whoever that was, wanted to know how to do it from TCL and/or C. Instead, he got about fif{*filter*} replies on how to do it from windows. How about some bright spark posting info on how to grab a window handle, get a pointer to its bitmap and transfer it as required? And perhaps how to handle clipboard operations from your app. Regards, Bruce A.
|
| Sun, 26 Aug 2001 03:00:00 GMT |
|
 |
|
Dennis E. Slic #13 / 14
|
 How to grab image from window in WIN NT/95?
I'm guessing the ability to put the entire contents of a canvas on the clipboard under Win95/98/NT as a metafile as well would be too much to hope? 8-) -dslice Bruce S. O. Adams wrote in message <36E64E6D.17F60...@rmc-ltd.com>...
|
| Sun, 26 Aug 2001 03:00:00 GMT |
|
 |
|
Robin Becke #14 / 14
|
 How to grab image from window in WIN NT/95?
In article <36e65bc...@news.ic.sunysb.edu>, Dennis E. Slice <morph...@life.bio.sunysb.edu> writes
... I did this for the Win32 version of blt80 charts and it worked quite well. It's very simple to implement when double buffering to a pixmap is being used as it is inside Blt. #ifdef __WIN32__ static void Pixmap_to_Clipboard(Pixmap pixmap) { TkWinDrawable *twdPtr = (TkWinDrawable *) pixmap; if (twdPtr != NULL) { if (twdPtr->bitmap.handle){ OpenClipboard(NULL); EmptyClipboard(); SetClipboardData(CF_BITMAP, twdPtr->bitmap.handle); twdPtr->bitmap.handle=NULL; CloseClipboard(); } }
#endif -- Robin Becker
|
| Sun, 26 Aug 2001 03:00:00 GMT |
|
 |
| |