Original Post
I am making a class called dx_app to simplfy seting up direct draw surfaces and other features. My code looks kind of like this
file - dx_app.h
// code start
#include
class dx_app
{
public:
LPDIRECTDRAW lpdd;
LPDIRECTDRAWSURFACE lpddsprimary;
//ect..
int dx_start(int width, int height, int bpp);
int dx_shutdown(void);
//ect..
};
file - dx_app.cpp
// code start
#include "dx_app.h"
int dx_app::dx_start(int width, int height, int bpp)
{
// blah..blah.. set up direct X
return 1;
}
int dx_app::dx_shutdown(void)
{
// blahh blahh shutdown directX
return 1;
}
but when I try to use this class in my main .cpp file, It can''t lock the surface. And I know my code works because I copied it and pasted it in the main .cpp without using functions and it worked? Does anyone know why it doesn''t lock? Thanks for any help.