Advertisement

i want to PrintScreen - then name the image..

Started by July 13, 2004 01:22 PM
25 comments, last by PinguinDude 20 years, 4 months ago
Try it with typedefs ? :O I dunno if that will work... it may work :D
http://sourceforge.net/projects/pingux/ <-- you know you wanna see my 2D Engine which supports DirectX and OpenGL or insert your renderer here :)
typedef struct tagBITMAPINFOHEADER
{

DWORD biSize;
LONG biWidth;
LONG biHeight;
WORD biPlanes;
WORD biBitCount;
DWORD biCompression;
DWORD biSizeImage;
LONG biXPelsPerMeter;
LONG biYPelsPerMeter;
DWORD biClrUsed;
DWORD biClrImportant;
} tagBITMAPI;

typedef struct tagBITMAPFILEHEADER
{

WORD bfType;
DWORD bfSize;
WORD bfReserved1;
WORD bfReserved2;
DWORD bfOffBits;
} tagBITMAPF;


typedef struct tagRGBQUAD
{
BYTE rgbBlue;
BYTE rgbGreen;
BYTE rgbRed;
BYTE rgbReserved;
} tagRGBQ;

typedef struct tagRGBTRIPLE
{
BYTE rgbtBlue;
BYTE rgbtGreen;
BYTE rgbtRed;
} tagRGBT;

tagBITMAPINFOHEADER bih;
tagBITMAPFILEHEADER bfh;
tagRGBQUAD pal[1];

ok this is what is in my class....still it says preview unavailable -- vbtest, can you see anything i might need to change??
heh
Advertisement
No. I am going to try and write my own bmp loader/save. And see what happens when I try it :)
EDIT: If I'm right you also need to store a BYTE *BMPData; and make it an array. I'm not sure about it. I'm still trying to get more bitmap info.
http://sourceforge.net/projects/pingux/ <-- you know you wanna see my 2D Engine which supports DirectX and OpenGL or insert your renderer here :)
ok vbtest..thanks so much for your help.. appreciate it so much... email me or write on here when you get it to work.. thanks! this will help for cross platform and not having to rely on windows.h for the bitmapheader info stuff.
heh
You don't need the RGBQuad I found out. It's only for rgb bitmaps. To write 24 bit bitmaps you need to add a BYTE *BMPData;. I haven't found out anything else. Maybe posting this in the OpenGL forum or general programming forum would help hmmm :)?
http://sourceforge.net/projects/pingux/ <-- you know you wanna see my 2D Engine which supports DirectX and OpenGL or insert your renderer here :)
well isnt that what i have been doing all along? trying to write out a rgb bitmap? i dont understand what you are saying..
heh
Advertisement
Why not take a look at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_7zfp.asp
and see if that helps you :)
http://sourceforge.net/projects/pingux/ <-- you know you wanna see my 2D Engine which supports DirectX and OpenGL or insert your renderer here :)

This topic is closed to new replies.

Advertisement