Solved

save screenshots

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
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 clear a vector as well as how to detect empty vectors in C++.

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now