2

I'm maintaining a legacy application, and I need to find the documentation for the IDirectDraw::SetCooperativeLevel function. (No, the Windows CE MSDN page doesn't cut it.) It's not in MSDN, it's not in the latest DirectX SDK documentation, and by looking around Microsoft removed all DirectDraw documentation (and old SDKs) from their website.

Before I go off downloading old DirectX SDK installers from random websites, does anyone know a better place to find DirectDraw documentation?

Vladimir Panteleev
  • 24,651
  • 6
  • 70
  • 114
  • Yeah, DirectDraw is deprecated. It sucks that they've removed the documentation, but it seems like that is what have happened. I don't usually endorse pirating in any shape or form, but you could maybe download Visual Studio 6 from a shady source and get its offline MSDN documentation from the install there. If anyone finds my post in bad taste, comment here and I'll remove it. –  Nov 01 '10 at 22:58
  • 2
    Managed to found the full DirectX 7 SDK here https://archive.org/details/MicrosoftDirectX7SDK (it is the last one that includes the DirectDraw documentation) – user1593842 Sep 14 '18 at 17:31

3 Answers3

4

For what it's worth, I found a copy of the DirectX 7 SDK documentation with this Google search:

http://www.google.com/search?q=intitle%3A%22index+of%22+%22dx7docs.exe%22

Vladimir Panteleev
  • 24,651
  • 6
  • 70
  • 114
0

Not sure what information you need, but here's what I got.

Taken from a tutorial here: http://www.gamedev.net/reference/articles/article608.asp

   /*
    * The cooperative level determines how much control we have over the
    * screen. This must at least be either DDSCL_EXCLUSIVE or DDSCL_NORMAL
    *
    * DDSCL_EXCLUSIVE allows us to change video modes, and requires
    * the DDSCL_FULLSCREEN flag, which will cause the window to take over
    * the fullscreen. This is the preferred DirectDraw mode because it allows
    * us to have control of the whole screen without regard for GDI.
    *
    * DDSCL_NORMAL is used to allow the DirectDraw app to run windowed.
    */
    ddrval = lpDD->SetCooperativeLevel( hwnd, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN );

I also found that SetCooperativeLevel must be called before SetDisplayMode.

Also this might or might not be helpful: http://www.eggheadcafe.com/software/aspnet/33936361/idirectdraw7setcooperativelevel-and-focusdevice-window.aspx

For pure documentation I couldn't find anything better than MSDN, so old SDKs are probably your best bet if the above doesn't cut it.

  • Thanks for the effort but I needed specifics on all supported flags, as well as docs on other DirectDraw functions. – Vladimir Panteleev Nov 01 '10 at 23:06
  • I'd just get the SDK sooner rather than later, then :) –  Nov 01 '10 at 23:16
  • Microsoft lies in his own documentation. I tried to call `SetDisplayMode` without setting the cooperative level first, and it works without any problems. I ain't got the `DDERR_NOCOOPERATIVELEVELSET` error any sooner than when trying to allocate any DirectDraw resources, i.e. with `CreateSurface`. But this also can be overcome by setting the `DDSCL_NORMAL` cooperative level (windowed, or shared), and one doesn't need to specify any window handle either: one can just pass `NULL` as the window handle to `SetCooperativeLevel` and creating any type of surfaces starts working. – SasQ Mar 28 '14 at 13:08
  • `DDSCL_EXCLUSIVE` is needed only for manipulating the primary buffer's address, that is, for flipping the screen. So one needs to set the `DDSCL_EXCLUSIVE` if one wants to create backbuffers. But flipping chains works in `DDSCL_NORMAL` for offscreen surfaces (also these alocated in video memory). You need the `DDSCL_EXCLUSIVE` also if you want to prevent other processes (includint Windows itself) from writting to the primary buffer, or changing the activation state of your app, or other top-level windows to pop up over yours, or other apps changing the display mode. Experimenting is knowledge! – SasQ Mar 28 '14 at 13:15
-3

I can find the document on MSDN : http://msdn.microsoft.com/en-us/library/aa918514.aspx

I don't know why you say that's unavailable.

  • 1
    Because that is the documentation for Windows Mobile 6.5. You won't find things specific to certain DirectDraw versions there, and the API probably differs from the DirectX ones for desktop Windows versions. For example, try finding the documentation for D3DXPrepareDeviceForSprite. – Vladimir Panteleev Jan 22 '13 at 06:13
  • 1
    I even linked to that exact page in my question (quote: "No, the Windows CE MSDN page doesn't cut it"). Have you even read it? – Vladimir Panteleev Jan 22 '13 at 06:14