I have never dealt with bitmap handling whatsoever. I googled for some time yet wasn't able to find anything that would work with my dev-cpp.
What I intend to accomplish here is to emulate a user pressing the printscreen button, loading the clipboard data to a bitmap, crop&pan it to a certain size and compare it to a bmp file saved in my program directory.
this should load my bmp file to a bitmap
using namespace std;
unsigned char Header[0x435],image;
fread(Header,1,0x435,fp); // copy image header to Header array
fseek(fp,0x436,SEEK_SET); // Move file pointer to start of image data
fread(image,1,256*256,fp); // read image data and copy to ImageIn1 array
and this should load the clipboard data to the bitmap
if ( OpenClipboard(NULL) )
HBITMAP handle = (HBITMAP)GetClipboardData(CF_BITMAP);
CBitmap * bm = CBitmap::FromHandle(handle);
however it reports problems such as CBitmap, FromHandle, ClientDC undeclared
I don't know what to do as I have no experience. Could someone please help me get this into shape?