Hi!
I am not at my dev machine now, so I can't try it
myself. Is it possible to make a screenshot of a
invisible Window? I mean a Window wich is hide
via
? If I remember correct, I just get the visible part
in the area of the invisible Window... (ex: the desktop) ?!
Thanks in advance,
bAZiK
I am not at my dev machine now, so I can't try it
myself. Is it possible to make a screenshot of a
invisible Window? I mean a Window wich is hide
via
invoke ShowWindow, hWnd, SW_HIDE
? If I remember correct, I just get the visible part
in the area of the invisible Window... (ex: the desktop) ?!
Thanks in advance,
bAZiK
Hi !
Did you try GetDCEx ???
HDC GetDCEx(
HWND hWnd, // handle to window
HRGN hrgnClip, // handle to clipping region
DWORD flags // creation options
);
with flags = DCX_WINDOW
As far as I remember it works... :rolleyes:
Hope it help !
Did you try GetDCEx ???
HDC GetDCEx(
HWND hWnd, // handle to window
HRGN hrgnClip, // handle to clipping region
DWORD flags // creation options
);
with flags = DCX_WINDOW
As far as I remember it works... :rolleyes:
Hope it help !
Hmmm... I think you got me wrong. Let me explain it in detail:
My App shells a external App. This external App does some calculations and displays the result as a Graph on the Window. I take a screenshot of the Window, resize it and save it as JPEG.
Then I terminate the App again with WM_CLOSE.
My target is, to create the screenshot WITHOUT showing the App I shell. That means, I execute it with SW_HIDE style, and do the rest as normal.
As already said, I am not at home right now... but I want this finished today, so I would appreciate any answer.
Showing the App only for the time I take the screenshot it NOT an option :(
regards,
bAZiK
My App shells a external App. This external App does some calculations and displays the result as a Graph on the Window. I take a screenshot of the Window, resize it and save it as JPEG.
Then I terminate the App again with WM_CLOSE.
My target is, to create the screenshot WITHOUT showing the App I shell. That means, I execute it with SW_HIDE style, and do the rest as normal.
As already said, I am not at home right now... but I want this finished today, so I would appreciate any answer.
Showing the App only for the time I take the screenshot it NOT an option :(
regards,
bAZiK
I don't know if if it will work but why not resize your "shell" window to a 0*0 size ?
It won't help much, if you don't want to have the program on the taskbar, though... (but I assume it can be disabled by an API... don't know which, though)
It won't help much, if you don't want to have the program on the taskbar, though... (but I assume it can be disabled by an API... don't know which, though)
I don't know if if it will work but why not resize your "shell" window to a 0*0 size ?
This would give me a 0*0 pixel screenshot.
that was I was afraid of... :(
At this moment, I don't see any way of doing it...
How long takes your screen capture ?
If it is long or if we see the window for a small amount of time, you could mask it with a splashscreen saying something like : "Generating Graph"...
It is a bad way for sure, but right now, I don't have any other idea...
At this moment, I don't see any way of doing it...
How long takes your screen capture ?
If it is long or if we see the window for a small amount of time, you could mask it with a splashscreen saying something like : "Generating Graph"...
It is a bad way for sure, but right now, I don't have any other idea...
And what about put your window outside the visible desktop area and let it visible?
with MoveWindow hWnd,2000,2000,NULL,NULL,FALSE
??? :confused: ???
with MoveWindow hWnd,2000,2000,NULL,NULL,FALSE
??? :confused: ???
That is a better idea, it might work...
I can't test it, as I'm not on my dev machine too... ;)
I can't test it, as I'm not on my dev machine too... ;)
PhoBos,
yes, this would work, but I want a *clean* way.
Seems like I must just try what GetDC and StrechBlt give me from a Window with SW_HIDE. Perhaps I did something wrong last time...
Readiosys,
look the last sentance of my second reply:
>Showing the App only for the time I take the screenshot it NOT an option :(
:(
yes, this would work, but I want a *clean* way.
Seems like I must just try what GetDC and StrechBlt give me from a Window with SW_HIDE. Perhaps I did something wrong last time...
Readiosys,
look the last sentance of my second reply:
>Showing the App only for the time I take the screenshot it NOT an option :(
:(
>Showing the App only for the time I take the screenshot it NOT an option
Yes, but how long your screenshot function take or more exactly, how much time do you need the window to be displayed ?
If showing the window is not an option, you are wanting something you say as impossible because you don't want to show it...
There's a conflict in the question.
I'm not sure, but it might be a way to do it without showing the window...
Ask the GDI specialists (and I'm not one) :
news:microsoft.public.win32.programmer.gdi
Bazik, did you managed to get it to work?
I'm seeking to do the same thing. I tried to move the window at -2000, -2000, but it didn't work for me.
I'm trying to fetch the rtf output and put it into a bmp for a dynamic wallpaper. I want to update it every x minutes with up to date info, but putting some window in front every count of timer isn't good...
Thanks
I'm seeking to do the same thing. I tried to move the window at -2000, -2000, but it didn't work for me.
I'm trying to fetch the rtf output and put it into a bmp for a dynamic wallpaper. I want to update it every x minutes with up to date info, but putting some window in front every count of timer isn't good...
Thanks
GDI will not draw outside the area coverted by the destop window (or virtual desktop window). Thus even if you move the window outside the desktop you will not get a screenshot.
Since GDI only use 1 video page, i dont see how you could get a screenshot of the window without showing it.
Since GDI only use 1 video page, i dont see how you could get a screenshot of the window without showing it.
I couldnt get it working and just blocked mouse and keyboard while the window showed up.
Thanks, in that case, I'll have to forget about a few ideas I had.
Perhaps I could display the rich text box directly on the desktop, but I fear that either the icons will come in conflict with the display, I won't be able to create the window directly on the desktop or it will show in front of other windows when I'll update it.
Let's go back to the drawing board...
Perhaps I could display the rich text box directly on the desktop, but I fear that either the icons will come in conflict with the display, I won't be able to create the window directly on the desktop or it will show in front of other windows when I'll update it.
Let's go back to the drawing board...
bazik,
you obviously have a fair amount of control over the app you spawn, is it your app? If it is your app, why don't you modify it so you can supply a command line telling it to remain invisible, it can then draw its picture, and return a dc to the main app?
you obviously have a fair amount of control over the app you spawn, is it your app? If it is your app, why don't you modify it so you can supply a command line telling it to remain invisible, it can then draw its picture, and return a dc to the main app?
sluggy,
thanks for the input, but I already sold the app and don't care anymore about it ;)
thanks for the input, but I already sold the app and don't care anymore about it ;)