Results 1 to 8 of 8

Thread: DDraw 8

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 1999
    Posts
    89

    DDraw 8

    How can I get a DirectDraw8 program to run under Microsoft Visual C++, what do I need to include.

    THANKS

  2. #2
    Zaei
    Guest
    There is no such thing as DirectDraw8. It was removed.

    Z.

  3. #3
    Megatron
    Guest
    If you want to use DirectDraw in your program (8 or 7), then you need to include the ddraw.h file.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Aug 1999
    Posts
    89
    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

  5. #5
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    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.
    Harry.

    "From one thing, know ten thousand things."

  6. #6
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    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.
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Aug 1999
    Posts
    89
    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

  8. #8
    Zaei
    Guest
    #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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width