示例#1
0
int CMainFrame::ShowOptions(int iPageID = -1)
{
	COptionsPageGeneral     pgGeneral;
	COptionsPageRendering   pgRendering;
	COptionsPageTools       pgTools;
	COptionsPageDirectories pgDirectories;

	COptionsDialog dlg;
	dlg.AddPage(&pgGeneral);
	dlg.AddPage(&pgRendering);
	dlg.AddPage(&pgTools);
	dlg.AddPage(&pgDirectories);

	if (iPageID == ID_OPTIONS_TOOLS)
		dlg.SetInitialPage(&pgTools);

	return dlg.DoModal();
}
// (9)
//==============================================================================
void CMainFrame::OnFileOptions() 
{
	COptionsDialog dlg;
	dlg.m_nDefaulNumberOfCopies = g_TheArchive.m_nDefaultCopies;
	if( g_TheArchive.m_pCompressor != NULL )
	{
		dlg.m_sCompressionUtility = g_TheArchive.m_pCompressor->m_strName;
		dlg.m_sCompressorPath = g_TheArchive.m_pCompressor->m_strExePath;
	}
//-------------------------------
	int result = dlg.DoModal();
//-------------------------------
	if (result==IDOK)
	{
		g_TheArchive.m_pCompressor->m_strName = dlg.m_sCompressionUtility;
		g_TheArchive.m_pCompressor->m_strExePath = dlg.m_sCompressorPath;
		g_TheArchive.m_nDefaultCopies = dlg.m_nDefaulNumberOfCopies;

		g_TheArchive.saveOptions();
	}
}
示例#3
0
文件: Avi.cpp 项目: redneckz/vocatch
CAviApp::Initialize(PDATA2COMPRESS_ROUTINE pRoutineAddress,LPVOID	pParam)
{
	//Stop read and send thread
	if(!m_htReadThread)
		StartCapture();

	Stop();

	m_pCompressRoutine = pRoutineAddress;					//set pointer to compress routine
	m_pParent = pParam;										//set sender pointer

	AFX_MANAGE_STATE(AfxGetStaticModuleState());
	COptionsDialog	* dlgOptions = new COptionsDialog(this);

	if(dlgOptions->DoModal()!=IDOK)
	{
		delete dlgOptions;
		return TRUE;
	}

	delete dlgOptions;
	return FALSE;
}
示例#4
0
Boolean CMainForm::OnGameOptions(EventPtr pEvent, Boolean& bHandled) {
	COptionsDialog frmPrefs;
	frmPrefs.DoModal();
	return true;
}