# how to enable back buffering in windowed mode?

## Recommended Posts

first I used SetCooperativeLevel to set the cooperate level to DDSCL_NORMAL so that the application runs in windowed mode; then I wrote
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_FLIP | DDSCAPS_COMPLEX;
ddsd.dwBackBufferCount = 2;

hres = g_pDD->CreateSurface( &ddsd, &g_pDDSPrimary, NULL );


and then I got hres set to DDERR_NOEXCLUSIVEMODE, which means it requires exclusive mode. but if I only use the primary surface, the function succeed. is there any way that I can enable back buffering while still using windowed mode?

##### Share on other sites
u using DirectX 9, the only things im aware of having to set for windowed mode for a d3d app to work is the surface format and the windowed option. It should be ok,

##### Share on other sites
In windowed mode, you have to create an offscreen plain surface as the backbuffer and then blt the surface to the frontbuffer instead of using flip.

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
627735
• Total Posts
2978854

• 10
• 10
• 21
• 14
• 12