the other thread was getting off track and old, and i solved the problem anyway, so now im posting a new problem.

this is really weird, because it seems to work perfectly in another project i have, and the code is basically the same, but it suddenly doesn't work here. observe:

Code:
class cBen
{
public:
    int left,top,width,height;
    
    HWND hApp;   
    void MoveLeft();
};

void cBen::MoveLeft()
{
    if (left>=50)
        left-=50;

    SetWindowPos(hApp,NULL,left,top,width,height,SWP_NOOWNERZORDER);
}
in the MoveLeft() function, none of the data members seem to be in scope. why is this so? here is the other code, where it works.

Code:
class tagMap
{
public:
	BYTE *datMap;
	BYTE get(int x,int y);
	void set(int x,int y,BYTE value);
	int width;
	int height;
};

BYTE tagMap::get(int x,int y)
{
	return datMap[(y*width)+x];
}

void tagMap::set(int x,int y,BYTE value)
{
	datMap[(y*width)+x]=value;
}
basically, the two classes are the same in the way they access data members. how come one works and the other doesn't?