The school computers use MSVC++. And I got the Exact same error. Remember that mine is DDrawExp2.cpp
a.h{text-decoration:none;color:blue;};a.h:hover{text-decoration:underline;background:red;};
Ever notice how Evil spelled backward is Live?
-=CF=-Ever notice how Evil spelled backward is Live?
-=CF=-Why is it called a hot water heater? Isn't it cold when it goes in the tank?
[email=jtaylor@gtemail.net" class="h]-=CF=-[/email]Ever notice how Evil spelled backward is Live?
-=CF=-Why is it called a hot water heater? Isn't it cold when it goes in the tank?
[email=jtaylor@gtemail.net" class="h]-=CF=-[/email]
// Initialize the standard COM libraries
if( FAILED( CoInitialize(NULL) ) )
{
InitFail();
return;
}
HRESULT ddrval;
// Create a DirectDraw7 object
ddrval = CoCreateInstance(&CLSID_DirectDraw, NULL, CLSCTX_ALL,
&IID_IDirectDraw7, &lpDD);
if( FAILED( ddrval ) )
{
InitFail();
return;
}
// Initialize the new object
ddrval = lpDD->Initialize(NULL);
if( FAILED( ddrval ) )
{
InitFail();
return;
}
// Get exclusive mode
ddrval = lpDD->SetCooperativeLevel(Handle, DDSCL_EXCLUSIVE / DDSCL_FULLSCREEN );
if( FAILED( ddrval ) )
{
InitFail();
return;
}
// Set the video mode to 640x480x8
ddrval = lpDD->SetDisplayMode(640, 480, 8);
if( FAILED( ddrval ) )
{
InitFail();
return;
}
// Create the primary surface with 1 back buffer
DDSURFACEDESC2 ddsd;
memset(&ddsd, 0, sizeof( DDSURFACEDESC2 ));
ddsd.dwSize = sizeof( DDSURFACEDESC2 );
ddsd.dwFlags = DDSD_CAPS / DDSD_BACKBUFFERCOUNT;
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE /
DDSCAPS_FLIP /
DDSCAPS_COMPLEX;
ddsd.dwBackBufferCount = 1;
ddrval = lpDD->CreateSurface( &ddsd, &lpDDSPrimary, NULL );
if( FAILED( ddrval ) )
{
InitFail();
return;
}
DDSCAPS ddscaps;
memset(&ddsd, 0, sizeof( DDSCAPS2 ));
ddscaps.dwCaps = DDSCAPS_BACKBUFFER;
ddrval = lpDDSPrimary->GetAttachedSurface(&ddscaps, &lpDDSBack);
if( FAILED( ddrval ) )
{
InitFail();
return;
}
/* You are on your own here -- I don't use palettes */
// create and set the palette
lpDDPal = DDLoadPalette(lpDD, szBitmap);
if (lpDDPal)
lpDDSPrimary->SetPalette(lpDDPal);
// Create the offscreen surface, by loading our bitmap.
lpDDSOne = DDLoadBitmap(lpDD, szBitmap, 0, 0);
if( lpDDSOne == NULL )
{
InitFail();
return;
}
// Set the color key for this bitmap (black)
DDSetColorKey(lpDDSOne, RGB(0,0,0));
Ever notice how Evil spelled backward is Live?
-=CF=-Why is it called a hot water heater? Isn't it cold when it goes in the tank?
[email=jtaylor@gtemail.net" class="h]-=CF=-[/email]Ever notice how Evil spelled backward is Live?
-=CF=-Why is it called a hot water heater? Isn't it cold when it goes in the tank?
[email=jtaylor@gtemail.net" class="h]-=CF=-[/email]Ever notice how Evil spelled backward is Live?
-=CF=-Why is it called a hot water heater? Isn't it cold when it goes in the tank?
[email=jtaylor@gtemail.net" class="h]-=CF=-[/email]Ever notice how Evil spelled backward is Live?
-=CF=-Why is it called a hot water heater? Isn't it cold when it goes in the tank?
[email=jtaylor@gtemail.net" class="h]-=CF=-[/email]