Hi, I am making a simple screen shot program. I need to be able to capture the entire screen, or if possible, a region of the screen (like a rectangle from point (25, 60) to (300, 456)). I also need to be able to save it to a bitmap file. I read a tutorial, but it only said how to save black and white bitmaps. I need them to be in color.
TheBeast32
54
Posting Whiz in Training
Recommended Answers
Jump to PostI found this code on the web some time ago and saved it. It seems to do exactly what you want :) Heres a quick example of how to save the top left corner of the screen.
#include<iostream> #include<windows.h> using namespace std; inline int GetFilePointer(HANDLE FileHandle){ return …
Jump to PostHere is the code to take a full screenshot. The only problem is the bitmap is completely uncompressed and can be 4mb+ just off one screenshot. The next part would be to figure out how to compress the bitmap.
int main() { int x1 = 0; int …
All 5 Replies
William Hemsworth
1,339
Posting Virtuoso
William Hemsworth
1,339
Posting Virtuoso
marco93
-87
Junior Poster
Alex Edwards
commented:
If something is wrong with a particular method, state facts before placing blame. Don't be an idiot.
+0
William Hemsworth
1,339
Posting Virtuoso
TheBeast32
54
Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.