if (FAILED(DirectDrawCreateEx(0,(void**)&lpDD,IID_IDirectDraw7,0)))
return 0;
lpDD->SetCooperativeLevel(hWnd,DDSCL_FULLSCREEN | DDSCL_ALLOWREBOOT | DDSCL_EXCLUSIVE);
DDSURFACEDESC2 ddsd;
ZeroMemory(&ddsd,sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT;
ddsd.dwBackBufferCount = 1;
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP;
if (FAILED(lpDD->CreateSurface(&ddsd,&lpDDSPrimary,0)))
{
lpDD->Release();
lpDD = 0;
return 0;
}
DDSCAPS2 ddscaps;
ddscaps.dwCaps = DDSCAPS_BACKBUFFER | DDSCAPS_FLIP;
HRESULT r = lpDDSPrimary->GetAttachedSurface(&ddscaps,&lpDDSBack);
Always getting DDERR_NOTFOUND
I always get a DDERR_NOTFOUND error when executing the following code...
MSDN says, that means the object was not found. But which object?? And what am I doing wrong??
EDIT: Formatting
[edited by - LordLethis on May 22, 2002 2:55:50 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement