Hello,
I want to capture the entire screen as a bitmap (so I can stream it as an
http GET).
But I fail to capture it.
I tried some samples I found on the internet, but without success.
Any help would be appreciated 5 1853
See :- http://www.codeproject.com/managedcpp/ijwscrcap.asp
--
Regards,
Nish [VC++ MVP]
"Mvmelle" <mv*****@yahoo. com> wrote in message
news:uN******** ******@TK2MSFTN GP12.phx.gbl... Hello,
I want to capture the entire screen as a bitmap (so I can stream it as an http GET). But I fail to capture it. I tried some samples I found on the internet, but without success. Any help would be appreciated
Sorry, but I need an unmanaged sample.
"Nishant S" <ni**@nospam.as ianetindia.com> wrote in message
news:ee******** ******@tk2msftn gp13.phx.gbl... See :-
http://www.codeproject.com/managedcpp/ijwscrcap.asp
-- Regards, Nish [VC++ MVP] "Mvmelle" <mv*****@yahoo. com> wrote in message news:uN******** ******@TK2MSFTN GP12.phx.gbl... Hello,
I want to capture the entire screen as a bitmap (so I can stream it as
an http GET). But I fail to capture it. I tried some samples I found on the internet, but without success. Any help would be appreciated
"Mvmelle" <mv*****@yahoo. com> wrote in message
news:uN******** ******@TK2MSFTN GP12.phx.gbl... I want to capture the entire screen as a bitmap (so I can stream it as an http GET).
This may help: http://support.microsoft.com/?id=97193
But I fail to capture it. I tried some samples I found on the internet, but without success.
Very nearly all of the WIN32 API's that can fail return an error code or set
the last error value in the calling thread. When you are having trouble it
is often a good idea to describe a little about the solutions you have tried
and how they have failed.
That said, though, the GDI group is probably better suited to your question
than this one.
Regards,
Will
"Mvmelle" <mv*****@yahoo. com> wrote in message
news:e0******** ******@TK2MSFTN GP12.phx.gbl... This, got me going.
That's good.
Now sending a HBITMAP trough an open socket is another problem.
Handles are by and large process-specific and therefore machine-specific as
well. You don't want to send the handle to a bitmap. You want to send the
bitmap's bits with an appropriate content (MIME) type, most often image/bmp.
If you need to conserve bandwidth at the expense of image quality then
image/jpeg may be a better choice. Of course then you'll need a compressor
as well.
Regards,
Will
save the bmp into IStream, then you can get HGLOBAL from the IStream. The
following is a clue
void savebmp(CBitmap & bmp)
{
CPictureHolder picture;
picture.CreateF romBitmap((HBIT MAP)bmp, NULL, TRUE);
LPPICTUREDISP pPictureDisp=pi cture.GetPictur eDispatch();
pPictureDisp->Release(); // must be released
IStorage* pStg = 0;
hr = ::StgCreateDocf ile(L"c:\\pictt est",
STGM_SHARE_EXCL USIVE |
STGM_CREATE |
STGM_READWRITE,
0, &pStg);
if(SUCCEEDED(hr ))
{
IStream* pStream = 0;
hr = pStg->CreateStream(L "PICTURE",
STGM_SHARE_EXCL USIVE |
STGM_CREATE |
STGM_READWRITE,
0, 0, &pStream);
if(SUCCEEDED(hr ))
{
hr = pPictureDisp->SaveAsFile(pSt ream,
TRUE, // save mem copy
NULL);
pStream->Release();
}
pStg->Release();
}
pPictureDisp->Release();
}
"Mvmelle" <mv*****@yahoo. com> wrote in message
news:e0******** ******@TK2MSFTN GP12.phx.gbl... This, got me going. Now sending a HBITMAP trough an open socket is another problem.
"William DePalo [MVP VC++ ]" <wi***********@ mvps.org> wrote in message news:eH******** ******@TK2MSFTN GP11.phx.gbl... "Mvmelle" <mv*****@yahoo. com> wrote in message news:uN******** ******@TK2MSFTN GP12.phx.gbl... I want to capture the entire screen as a bitmap (so I can stream it as an http GET).
This may help:
http://support.microsoft.com/?id=97193
But I fail to capture it. I tried some samples I found on the internet, but without success.
Very nearly all of the WIN32 API's that can fail return an error code or set the last error value in the calling thread. When you are having trouble
it is often a good idea to describe a little about the solutions you have tried and how they have failed.
That said, though, the GDI group is probably better suited to your question than this one.
Regards, Will
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Me Mine |
last post by:
i,
I have trying to code a small console app that will
allow a user to select a window and then create a
screen capture of the window. I haven't been able to
figure out how to do the screen capture part. The
code is as follows, the commented out lines at the end
are things I have tried, but don't work. Whenever I
try to create a compatibe Bitmap or DC it comes back
with an error as
win32ui: CreateCompatibleDC failed
|
by: xc |
last post by:
Greetings.
I encountered a wield problem when grabing screen images.
Sometimes in some computers I can capture the screen, but other times not
so.
In some computer I cannot capture the screen image, but when I change its
color bits, say from 32bits to 24 or 16bits, the program can capture the
image.
Can anyone kindly examine my following code, and point out the flaw:
|
by: Per |
last post by:
Hi all,
This may be a newbie question, but I can't find the answer anywhere.
I want to make a capture of the screen, or a part of the screen, that
contains the main portion of the form.
Detecting the screen that contain the main portion of the form is pretty
straight forward, but how do I capture what I need in an Image object?
Another thing, how do you make the program move the mouse pointer and
simulate clicks?
Best regards
|
by: Jody Gelowitz |
last post by:
I have seen some examples of how to capture a color from a point on screen
using C#, but haven't come across anything with VB.NET. Is this possible
under VB.NET? I know that I will need to use the GetPixel API in order to
do this.
Essentially, I would like to be able to move the mouse around the screen,
and wherever the left button is clicked, I would like to store the color
value of the point where the cursor is located. If possible,...
|
by: Eddie Dunn |
last post by:
I have one here that I cannot find anything on in my searching.
I am implementing a screen capture functionality into my Visual Basic
..NET application.
The code I am using calls the bitblt function in gdi32.dll to achieve
its magic as follows:
Public Function CreateScreenshot() As Bitmap
| |
by: py |
last post by:
I need to take a screen shot of the computer screen.
I am trying to use PIL and I saw there is ImageGrab...however it only
works on Windows. Is there a platform-independent ability to work
around this?
thanks
|
by: gwhite1 |
last post by:
I use this code to capture a screen in a regular VB 2005 windows app.
It works great! I found the code in google. But when I create a windows
service it does not capture the screen. It only captures a blank
graphic. Does anyone know why it will not capture the current screen?
Is something not available when running as a service? Thanks!!!
Sheila
Function CreateScreenshot() As System.Drawing.Bitmap
Dim Rect As System.Drawing.Rectangle =...
|
by: dumbledad |
last post by:
Hi All,
I'm using ASP.Net web services to provide the logic required for a
Flash based prototype. The Flash and the ASP .Net run together on the
client machine. One of the functions I'd like to offer is
public void StoreLogEntry(string tag, string description, bool
screenshotRequired)
|
by: Paolo Pantaleo |
last post by:
Hi,
I need to capture a screen snapshot in Linux. PIL has a module
IageGrab, but in the free version it only works under Windows. Is
there any package to capture the screen on Linux?
Thnx
PAolo
|
by: Atran |
last post by:
Hello Everyone.
In this article: You will know to capture the screen in 2 ways:
1)- Capture full screen.
2)- Capture region.
Let's Begin:
First make a new Windows Application project.
And make sure your program uses these namespaces:
using System;
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |