Click to See Complete Forum and Search --> : DDraw 8
Allanon
May 10th, 2001, 11:21 AM
How can I get a DirectDraw8 program to run under Microsoft Visual C++, what do I need to include.
THANKS
Zaei
May 10th, 2001, 11:57 AM
There is no such thing as DirectDraw8. It was removed.
Z.
Megatron
May 10th, 2001, 04:44 PM
If you want to use DirectDraw in your program (8 or 7), then you need to include the ddraw.h file.
Allanon
May 10th, 2001, 09:28 PM
my fault, I can't get the mssdk samples to run. It gives me 100 some errors, its like they don't recongize CDisplay or CSurface. What do I have to include to make them work. I have
#include <ddraw.h>
and in the project setting I have added ddraw.lib and dxguid.lib, but it still doesn't work
THANKS
HarryW
May 10th, 2001, 09:49 PM
What are you trying to do with these classes 'CDisplay' and 'CSurface'? I have never come accross them before, are they your own custom classes?
Generally, you make a variable that is a pointer to a DDraw device (of type LPDIRECTDRAW) and then use the DirectDrawCreate() function (I think it might be a macro actually) to get a DirectDraw interface, then you use the QueryInterface() member function to get a later version, if you want it (like if youw want an LPDIRECTDRAW7 interface). Then you create all your subsidiary DirectDraw objects from this device.
Alternatively you can take the proper COM route and use CoCreateInstance() to get the interface you want from the start. I have a feeling there may be a simple way of getting the latest interface straight off now, but since almost all my DDraw experience is in DX6 I don't know what's new in the DDraw7 interface.
CyberCarsten
May 11th, 2001, 02:44 AM
You will have to tell the compiler where to find the DX header files.
If you first installed VC++ and then DX, the DX setup should have asked you if the header files should be included in the include dir for your compiler.
Allanon
May 11th, 2001, 10:12 AM
The CDisplay and CSurface came on the Mssdk Tutorials for DirectX8.
I already know how to use DirectX7, but I don't get the new Direct8 stuff with CDisplay, and I did install dx after MS Visual C++, it just won't compile, because it doesn't recongize CDisplay and CSurface
Thanks
Zaei
May 11th, 2001, 11:54 AM
#include those files as well. That kind of thing always happens to me if I try to create a pointer to some class i havent included yet. 103 errors.
Z.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.