Solved

save screenshots

Posted on 2001-07-16
2
256 Views
Last Modified: 2010-08-05
Hi to all,

under win98/Win2000 i want save screenshots in BMP-Files.
It is just necessary for HighColor and TrueColor.

the first part is clear, but how to write the bmp ?

HDC dc, bdc;
int w,h;
HBITMAP hbm;

w=800;
b=600;
dc=CreateDC("DISPLAY",NULL,NULL,NULL);
hbm=CreateCompatibleBitmap(dc,w,h);
bdc=CreateCompatibleDC(dc);
SelectObject(bdc,hbm);
BitBlt(bdc,0,0,w,h,dc,0,0,SRCCOPY);
DeleteDC(dc);
DeleteDC(bdc);

but can i save this bitmap ?
or must i change it into a DIB ?

thanks
titz
0
Comment
Question by:titz
2 Comments
 
LVL 6

Accepted Solution

by:
MichaelS earned 50 total points
ID: 6303013
0
 
LVL 1

Author Comment

by:titz
ID: 6363247
the points are yours !

thanks
titz
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C++ get user from AD  (VS6) 7 95
Focus not getting shifted out of  editbox 2 69
White board coding practice 3 95
what type of pointer is this pointer? 3 23
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question