Original Post
Can anyone tell me how to set the size and the position of a primary surface in ddraw?
Here is what i am trying to do but failed:
DDSURFACEDESC ddsd;
HRESULT ddrval;
memset( &ddsd, 0, sizeof(ddsd) );
ddsd.dwSize = sizeof( ddsd );
ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH;
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE ;
ddsd.dwWidth = m_Width;
ddsd.dwHeight = m_Height;
m_lpDD->CreateSurface( &ddsd, &m_lpDDSPrimary, NULL );
Can anyone please show me a correct way? And please tell me how to set the position of the surface too.