(a) Don't use 'NULL' in C++ programs. Microsoft does it, true. One more reason not to do it. Quoting Stroustrup:
In C, it has been popular to define a macro NULL to represent the null pointer. Because of C++'s tighter type checking, the use of plain 0, rather than any suggested NULL macro, leads to fewer problems. If you feel you must define NULL, use
const int NULL = 0; |
(b) Well, DirectX 7 is like, 10 years old by now? You could expet this working if it were a POSIX-System, but with Windows problems seem to be unavoidable.
(c) (Why not use OpenGL anyways? Or, if you feel DirectX is better suited for Windows, a wrapper library like SDL? This way, your code will at least have the chance to be portable. And if you want to write a game, what it looks like to me, then you might someday want such cool functions like realtime-scheduling, which is available under Linux, but AFAIK not windows. Plus, you have way better networking support. Again, it is true that most games are written for Windows, but also again, this is not a technical decision)
(d) Any further and possibly helpful suggestions can be made if and only if you post the errors and warnings of your compiler and the sourcecode context which produces them.