Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

save screenshots

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
computer science syllabus 3 89
Best book to learn C++ 4 84
Android development question 2 54
boost::uuid crashes 17 11
Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
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.

856 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