Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


CreateSurface error!

This topic is 6104 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

-------------------------------------------------------------- #define FULLSCREEN_DEBUG ... ... #ifdef FULLSCREEN_DEBUG hRet = g_pDD->SetCooperativeLevel(hWnd, DDSCL_NORMAL) ; if (hRet != DD_OK) return InitFail(hWnd, hRet, "SetCooperativeLevel FAILED"); #else //FULLSCREEN_DEBUG hRet = g_pDD->SetCooperativeLevel(hWnd, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); if (hRet != DD_OK) return InitFail(hWnd, hRet, "SetCooperativeLevel FAILED"); // Set the video mode to 640x480x8 hRet = g_pDD->SetDisplayMode(800, 600, 8, 0, 0); if (hRet != DD_OK) return InitFail(hWnd, hRet, "SetDisplayMode FAILED"); #endif //FULLSCREEN_DEBUG // Create the primary surface with 1 back buffer ZeroMemory(&ddsd, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); ddsd.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT; ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_FLIP | DDSCAPS_COMPLEX; ddsd.dwBackBufferCount = 1; hRet = g_pDD->CreateSurface(&ddsd, &g_pDDSPrimary, NULL); if (hRet != DD_OK) return InitFail(hWnd, hRet, "CreateSurface FAILED"); --------------------------------------------------------------- CreateSurface return error : DDERR_NOEXCLUSIVEMODE /* * Operation requires the application to have exclusive mode but the * application does not have exclusive mode. */ how to createsurface in window mode?

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!