Solved

save screenshots

Posted on 2001-07-16
2
253 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MSVCR80.dll crash 2 140
Prototype for MessageDlg in Embacadero XE 2 2 39
C++ Language error 28 218
best sources to up-to-date in C++? 8 82
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
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 goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

803 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