Get a real compiler, and preferably also use a more up-to-date API? The more up-to-date API is strongly recommended, but unless you have some very good reason to do otherwise a more up-to-date compiler is practically mandatory. The Visual C++ 6 compiler is over 10 years old and actually pre-dates standardisation of the C++ language -- it's so old it's not even technically a real C++ compiler. DirectX 7 was also last updated and replaced by DirectX 8 over 10 years ago.Any Ideas?
More modern versions are freely available even for commercial usage. You could consider a Visual Studio Express Edition, Code::Blocks, or QtCreator.
So, before we try to offer further help that might be trivially invalidated by updating to non-ancient tools and a more modern API, why do you think you need to stick with VC++6 and DirectX7?