Jump to content
  • Advertisement
Sign in to follow this  
kurabiye

How to window mode?

This topic is 4900 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I want to run all of d3d apps in window. I dont want to use full screen mode. How can i do this work. It is so important for me. Please help.

Share this post


Link to post
Share on other sites
Advertisement
	// Create the main Direct3D object
if ( !( d3d = Direct3DCreate9( D3D_SDK_VERSION ) ) )
return E_FAIL;

// Create the parameters structure, zero it out and set the values
D3DPRESENT_PARAMETERS d3dpp;
ZeroMemory( &d3dpp, sizeof(d3dpp) );

d3dpp.Windowed = windowMode;
d3dpp.BackBufferWidth = screenWidth;
d3dpp.BackBufferHeight = screenHeight;
d3dpp.BackBufferFormat = pixelFormat;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3dpp.Flags = D3DPRESENTFLAG_LOCKABLE_BACKBUFFER;

// Create the Direct3D device
if ( FAILED( d3d->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, pPolaris->hWnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &d3dDevice ) ) )
{
return E_FAIL;
}




The key is "windowMode", which is either true or false. If d3dpp.Windowed == true, the application is windowed.



If you are talking about games that you bought running in windowed mode that don't support it ("I want to run all of d3d apps in window.")... don't ask me.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!