Sign in to follow this  
Dusho

DirectX 8.1 screensaver framework

Recommended Posts

Dusho    122
Hi. I'm using dx8.1 screensaver framework (d3dsaver.cpp,...). When in fullscreen I'm trying to destroy fullscreen d3d (after pressing key) and display configuration window. Strange thing is, that it works only sometimes - sometimes is fullscreen correctly destroyed and config is shown, but sometimes fullscreen just hangs always on top and config runs in background and is not visible. After pressing key I do:
Cleanup3DEnvironment();
DestroyWindow(m_hWnd);

MyInit(); // - copy of a constructor
					
m_myWin=true;
		
HRESULT hr;

if( FAILED( hr = Create( m_hInstBackup ) ) )
{
	DisplayErrorMsg( hr );
	return 0;
}
				
// Initialize the app's custom scene stuff
if( FAILED( hr = OneTimeSceneInit() ) )
{
	return DisplayErrorMsg( hr, MSGERR_APPMUSTEXIT );
}					

// Do graphical init stuff
if ( FAILED(hr = Initialize3DEnvironment()) )
{
	return hr;
}
					ShowWindow(m_hWnd,SW_HIDE);
m_bRegInterrupt=true;
and then in WinMain :
if(mySS.m_bRegInterrupt)
{
        mySS.DoConfig();
}
Anyone has better idea to hide a fullscreen ? thnx [Edited by - Coder on August 3, 2004 4:33:45 PM]

Share this post


Link to post
Share on other sites
Dusho    122
OK. Problem solved.
Just remember.. always release everything before destroying window ( especially materials, textures and meshes ).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this