Esempio n. 1
0
void MainQuit(HWND hwnd)
{
	CloseConnection();
	
	if (config.save_settings)
		SaveSettings();
	FreeProfaneTerms();
	
	MainExitState();
	
	FontsDestroy();
	ColorsDestroy();
	MusicClose();
	PaletteDeactivate();
	
	DeleteObject(hPal);

	HookClose();
	
	FreeLibrary(hRichEditLib);

	D3DRenderShutDown();
	
	PostQuitMessage(0);
}
Esempio n. 2
0
/*****************************************************
*	@func	:	NewMusicPlay
*	@summary:	播放一首新的歌曲所需要的处理
*	@in		:	const TCHAR* szFileName	: 要播放的歌曲的名字
*	@out	:	none
*	@return	:	TRUE : ALL OK
*			:	FALSE : 音乐播放失败
*	@author	:	DaPPer
*	@time	:	2013-3-31 20:17:40
*	@history:	
******************************************************/
int CMusicProcessor::NewMusicPlay(const TCHAR* szFileName)
{
	int iRet = FALSE;
	if (MusicClose()			&&
		OpenFile(szFileName)	&&
		MusicPlay())
	{
		iRet = TRUE;
	}

	return iRet;
}