Skip to main content
gamedev.net
🔒 Locked

Please help

Started by ji yan Apr 14, 2002 at 12:25 AM 0 replies 150+ views
Original Post
ji yan
ji yan
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.
sakky
sakky
I''v tried to do this before once and I had run time errors. I thinks its because you can''t set the width and height of the primary surface.

I figure thats what SetDisplayMode help do. Try looking on MSDN for information about this.
Take back the internet with the most awsome browser around, FireFox

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.