I am 'trying' to make my program work better, but it just doesn't work. I stumbled upon a real weird problem.
I've got 2 unsigned char arrays like
unsigned char *bit = new unsigned char[width * height * 3]; // 24 bits bitmap
unsigned char *Buffer = new unsigned char[width * height * 3];
These two arrays are used for 24 bits bitmap storage. And one of them is temporarily. Anyway.
I used a switch statement like:
switch(UseFilter)
{
case 0:
FFindEdges(bits, Buffer);
break;
case 1:
FBOOLMap(bits, Buffer);
break;
case 2:
F3DFILE World;
break;
}
In which UseFilter is an integer number representing which filter to use.
Now, if I use onle 0, it shows a nice Edge detected Image on the screen. if I use both 0 and 1, it shows a grayscale image (black or white) ont he screen.
And if I use 0, 1 and 2......it represents a black screen.
it is called like
CPictureDoc *pDoc;
pDoc = GetDocument();
if(pDoc->Filter(0) == FALSE) MessageBox("oops","again");
Invalidate();
if(pDoc->Filter(1) == FALSE) MessageBox("oops","again");
Invalidate();
if(pDoc->Filter(2) == FALSE) MessageBox("oops","again");
Invalidate();
And the F3DFILE doesn't do anything, it's just a
class F3DFILE
{
public:
F3DFILE();
protected:
};
So, what can be the problem here?
------------------
Dance with me......