Example #1
0
void CXfilterDlg::OnMain() 
{
	CMainDlg *dlg = new CMainDlg;
	dlg->Create(IDD_MAIN, this);
	dlg->ShowWindow(SW_SHOW);
	dlg->UpdateWindow();
//	dlg.DoModal();
}
int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
{

	CMessageLoop theLoop;
	_Module.AddMessageLoop(&theLoop);

	CMainDlg dlgMain;


	if(dlgMain.Create(NULL) == NULL)
	{
		ATLTRACE(_T("Main dialog creation failed!\n"));
		return 0;
	}

	dlgMain.ShowWindow(nCmdShow);
	dlgMain.UpdateWindow();


	int nRet = theLoop.Run();

	_Module.RemoveMessageLoop();
	return nRet;
}