J
JoeC
I am trying to create a graphic library that read bitmap info from a
fil this dosn't seem to worlk, it read in the first two values but
dosn't seem to read the graphic data am I doing this wrong?
graphic::graphic(std::string n){
std::ifstream fin(n.c_str());
BYTE num = 0;
BYTE gr[64];
BYTE * pgr;
pgr = &gr[0];
if (fin){
fin>>ud>>lr;
while(fin){
fin>>pgr;
pgr++;
}
} else {
MessageBox(NULL, "Could Not Open File!" , "Error!", MB_OK);
}
BITMAP bitmap = {0,ud,lr,8,1,1};
bitmap.bmBits = gr;
hbitmap = CreateBitmapIndirect(&bitmap);
///////////////////////////////////////////////////////////////////////////////////////
file info:
8 8 0 0x7e 0 0x7e 0 0x7e 0 0x7e 0 0 0
fil this dosn't seem to worlk, it read in the first two values but
dosn't seem to read the graphic data am I doing this wrong?
graphic::graphic(std::string n){
std::ifstream fin(n.c_str());
BYTE num = 0;
BYTE gr[64];
BYTE * pgr;
pgr = &gr[0];
if (fin){
fin>>ud>>lr;
while(fin){
fin>>pgr;
pgr++;
}
} else {
MessageBox(NULL, "Could Not Open File!" , "Error!", MB_OK);
}
BITMAP bitmap = {0,ud,lr,8,1,1};
bitmap.bmBits = gr;
hbitmap = CreateBitmapIndirect(&bitmap);
///////////////////////////////////////////////////////////////////////////////////////
file info:
8 8 0 0x7e 0 0x7e 0 0x7e 0 0x7e 0 0 0