예제 #1
0
파일: MainFrm.cpp 프로젝트: ebutusov/Models
LRESULT CMainFrame::OnSettings(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
	CSettingsSheet dlg;
	dlg.InitPages(m_simcontrol.GetSettings());
	dlg.DoModal(this->m_hWnd);
	return 0;
}
예제 #2
0
int Settings(HWND hwndParent)
{
	CMessageLoop theLoop;
	_Module.AddMessageLoop(&theLoop);

	CSettingsSheet dlg;
	int nRet = 0;

	if(hwndParent) 
		dlg.DoModal(hwndParent);
	else
	{
		if(dlg.Create(NULL) == NULL)
		{
				ATLTRACE(_T("Settings dialog creation failed!\n"));
				return 0;
		}
		_Module.Lock();
		dlg.ShowWindow(SW_SHOW);
		Sleep(10);
		nRet = theLoop.Run();
		_Module.RemoveMessageLoop();
	}
  return nRet;
}