 |
|
 |
You wrote that CScrollView class is used for capture images those are bigger to capture the entire image. I tried to capture Client Area at NotePad window with big document inside, there was both scrollbars (vertical and horizontal). Captured image was only the visible part of window. I cant find scrolling part of source code, is there any scrolling capabilities?
|
|
|
|
 |
|
 |
I need to document operation of Alt-Tab under windows. Do you know of a way to capture the Alt-Tab window to place in documentation? CapIT.exe does not work. As as the mouse button is pressed on the CapIT menu the Alt-Tab window closes.
|
|
|
|
 |
|
 |
I developed only the capture portion, have no idea about trapping individual keys, but that should not be much of a problem in a actual situation.
|
|
|
|
 |
|
 |
Hello, Barry,
I am very interesting in this article about screen capture. Can I get your email address? I want to discuss some question with you.
I am sorry I can not connect your homepage, so I sent the message here.
Thanks.
Xueyan
2006.7.31
|
|
|
|
 |
|
 |
Any ideas? In Win2K and XP, we have transparent windows.
Thanks,
Nowlex
|
|
|
|
 |
|
 |
I've noticed that transparent windows can be captured by using PrintScreen.
Then why not simulate the pressing of the PrintScreen key? Doing this, you'll get a copy of the full screen into the clipboard.
Then open the clipboard, grab the full screen bitmap and then use BitBlt to extract the area under the transparent window you're interesed in.
HWND hWndTransparentWindow;//you need to know this
RECT rectTransparentWindow;
GetWindowRect(hWndTransparentWindow,&rectTransparentWindow);
LONG lWidthTransparentWindow=rectTransparentWindow.right - rectTransparentWindow.left;
LONG lHeightTransparentWindow= rectTransparentWindow.bottom - rectTransparentWindow.top;
keybd_event(VK_SNAPSHOT,0, 0 ,0);
//this doesn't work ??
//INPUT input;
//input.ki.wVk=VK_SNAPSHOT;
//input.type=INPUT_KEYBOARD;
//SendInput(1,&input,sizeof(input));
//now the clipboard contains a full screen bitmap
OpenClipboard(NULL);
HANDLE hDataImage=GetClipboardData(CF_BITMAP);
if (NULL !=hDataImage)
{
//this is the full screen bitmap
HBITMAP hBmpBig=(HBITMAP) hDataImage;
HDC hDCScreen = CreateDC ("DISPLAY", NULL, NULL, NULL );
//create a memory device context, as large as the full screen bitmap
HDC hDCBig=CreateCompatibleDC(hDCScreen);
//Select the full screen bitmap into it
HGDIOBJ hOldBitmapBig = SelectObject(hDCBig, hBmpBig);
//now create another memory device context, as large as the transparent window
HDC hDCSmaller=CreateCompatibleDC(hDCScreen);
HBITMAP hBmpTransparentWindow = CreateCompatibleBitmap(hDCScreen,lWidthTransparentWindow,lHeightTransparentWindow);
//select the smaller bitmap
HGDIOBJ hOldBitmap = SelectObject(hDCSmaller, hBmpTransparent window);
//copy from the big device context into the smaller memory device context.
BitBlt(hDCSmaller,0,0,lWidthTransparentWindow,lHeightTransparentWindow,hDCBig, rectTransparentWindow.left, rectTransparentWindow.top, SRCCOPY);
SelectObject(hDCBig, hOldBitmapBig);
SelectObject(hDCSmaller, hOldBitmap);
DeleteDC(hDCSmaller);
DeleteDC(hDCBig);
DeleteDC(hDCScreen);
//Voila! Now you have a 'hBmpTransparentWindow' representing the transparent window image
}
CloseClipboard();
-- modified at 3:08 Monday 29th May, 2006
|
|
|
|
 |
|
 |
hy,
Everybody,
Can it posible that capturing image of any application window
without displying it.I mean that application is running in backgroud that mean it`s window is hide,Now can i capture that
window which is hide? if yes then how?
|
|
|
|
 |
|
 |
Hi,
i am wondering if it is possible to capture the area which is behind a window. The need would be to provide a way to drag a transparent dialog which uses some region and clipping and at the end of the day try to handle a better Redraw mecanism of this window when moving the window.
The draging of the window occures in the "opaque" unix style mode when you tell your Graphics board to do this through the settings. It sounds that there is nothing in MFC which tell a Dialog to be create with a Save under copy bitmap flags and let the GDI do the stuff for you. I am also wondering if there is something with the CWnd. Something which is possible and trivial in XWindow....
any idea ?
|
|
|
|
 |
|
 |
I would like to thank you for all the work you posted at Code Project,which help the new emerging programmer a lot.
you are a Really a great programmer.
FIvw Vote Frm me
-----------------------------
"I Think It will Work"
Formerly Known As "Alok The Programmer" at CP
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
 |
|
 |
Hi friend,
I'm trying to use your code in my ECG project, so is there any problem to use your code in to my application it is open and free too?
|
|
|
|
 |
|
 |
capturing desktop of the server and show that at client side if any button pressed at the client side it should process at the server side and display the updated view at the client side. please help me out about this
nandini
|
|
|
|
 |
|
 |
sorry i do not have a connect to any network , hence testing developing such a project is ruled out
|
|
|
|
 |
|
 |
nandiniarun wrote:
capturing desktop of the server and show that at client side if any button pressed at the client side it should process at the server side and display the updated view at the client side. please help me out about this
hain i think here is your solution.
do you heard about winsocket.,if yes then
create the two application,connect them using socket and capture the image at desktop and transfer the image.
o0pps! soory i forget to tell you how to pass image using socket.so here is the way.
read image file into char* var and transmit that string to client machine.
and at the client part save that in a file and display that file.
-----------------------------
"I Think It will Work"
Formerly Known As "Alok The Programmer" at CP
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
 |
|
 |
hi barry i would like to gain information from you that i am doing my final year project in computer engineering and i want to make an application such that it give me information about what's going on the other neighbour machines and i can handle the control of that machine.Tell me about necessary language that is best suitable for this and mail me about this all information at mahavir2002_4u@yahoo.com. Thank you.....;;P
|
|
|
|
 |
|
 |
Is there a way to capture a window which is hidden? Well, I am actually looking for an example for VB or VB .NET (preferably). But I can try to convert the VC example to VB (if it uses APIs only).
My aim is to capture a window which is not visible or hidden or its some portion is behind another window. How is it possible?
Thanks,
Sameers
|
|
|
|
 |
|
 |
Yes. Try to use WM_PRINT message. For detailed explanation visit http://www.fengyuan.com.
|
|
|
|
 |
|
 |
Your link is nothing but a shill for someone's book. Bad form all around.
-=Bob
|
|
|
|
 |
|
 |
Actually the answer to this thread is at the dudes book site. Really neat solution. Too bad you didn't dig a bit.
|
|
|
|
 |
|
|
 |
|
 |
I am having problem in capturing the window when it is minimized. I dont want to maximize the window. Is there any way by which I can captur image?
|
|
|
|
 |
|
 |
I use this code, i don't know if it works in minimized... TRY it
memoryImage is the Bitmap you want....
Example
[System.Runtime.InteropServices.DllImport("gdi32.dll")]
public static extern long BitBlt (IntPtr hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, IntPtr hdcSrc, int nXSrc, int nYSrc, int dwRop);
private Bitmap memoryImage;
private void Capture()
{
Graphics mygraphics = this.CreateGraphics();
Size s = this.Size;
memoryImage = new Bitmap(s.Width, s.Height, mygraphics);
Graphics memoryGraphics = Graphics.FromImage(memoryImage);
IntPtr dc1 = mygraphics.GetHdc();
IntPtr dc2 = memoryGraphics.GetHdc();
BitBlt(dc2, 0, 0, this.ClientRectangle.Width, this.ClientRectangle.Height, dc1, 0, 0, 13369376);
mygraphics.ReleaseHdc(dc1);
memoryGraphics.ReleaseHdc(dc2);
}
By FAZE
|
|
|
|
 |
|
 |
Nope. seems like you still have to bring the window to front to capture its contents.
Is there another way?
|
|
|
|
 |
|
 |
Everytime Ipress Capture desktop, it eats 4 MB of memory according to my resolution 1184*764... When I do it repeatedly (Capture and Clear) it empties my memory.. Can you remove (Barry - for you!!!) that thing as everytime I test the program, I got out of memory...
Jigar Mehta
jigar@programmer.net
|
|
|
|
 |
|
 |
use GDI method is too slow, who know how to use DirectX capture screen
thanks!
hiver
|
|
|
|
 |
|
 |
i am trying to capture the screen with directx to but till now i had no luck
|
|
|
|
 |