Original Post
I am using Dev-Cpp and ddraw 7, and I finally got it to compile, but it gives me an error when I try to create a surface. I got Dev-Cpp's modified headers, etc. Here is the source:
Near the top:
And in function Init:
It always makes a message box saying, "lpdd Init error." I've tried messing around with it but it won't work.
[edited by - nagromo on April 18, 2003 2:59:02 PM]
[edited by - nagromo on April 18, 2003 2:59:54 PM]
LPDIRECTDRAW7 lpdd = NULL; DDSURFACEDESC2 ddsd; LPDIRECTDRAWSURFACE7 lpddsPrimary;
if(FAILED(DirectDrawCreateEx(NULL,(void**&lpdd,IID_IDirectDraw7,NULL))) {
MSGBOX("Init error.");
KillWindow();
return false;
}
INIT_DXSTRUCT(ddsd);
ddsd.dwFlags = DDSD_CAPS;
ddsd.ddsCaps.dwCaps=DDSCAPS_PRIMARYSURFACE|DDSCAPS_VIDEOMEMORY;
if (FAILED(lpdd->CreateSurface(&ddsd,&lpddsPrimary,NULL))) {
MSGBOX("lpdd Init error.");
KillWindow();
return false;
}