?
Solved

save screenshots

Posted on 2001-07-16
2
Medium Priority
?
261 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 150 total points
ID: 6303013
0
 
LVL 1

Author Comment

by:titz
ID: 6363247
the points are yours !

thanks
titz
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

839 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