00001
00002
00003
00004 #include "stdafx.h"
00005 #include "ExNihiloLauncher.h"
00006 #include "ExNihiloLauncherDlg.h"
00007
00008 #ifdef _DEBUG
00009 #define new DEBUG_NEW
00010 #endif
00011
00012
00013
00014
00015
00016
00017 CExNihiloLauncherDlg::CExNihiloLauncherDlg(CWnd* pParent )
00018 : CDialog(CExNihiloLauncherDlg::IDD, pParent)
00019 , m_ChFull(FALSE)
00020 {
00021 m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
00022 }
00023
00024 void CExNihiloLauncherDlg::DoDataExchange(CDataExchange* pDX)
00025 {
00026 CDialog::DoDataExchange(pDX);
00027 DDX_Check(pDX, IDC_CHECKFULL, m_ChFull);
00028 DDX_Control(pDX, IDC_RAD800, m_CR800);
00029 DDX_Control(pDX, IDC_RAD1024, m_CR1024);
00030 DDX_Control(pDX, IDC_RAD1600, m_CR1600);
00031 }
00032
00033 BEGIN_MESSAGE_MAP(CExNihiloLauncherDlg, CDialog)
00034 ON_WM_PAINT()
00035 ON_WM_QUERYDRAGICON()
00036
00037 ON_BN_CLICKED(IDC_BUTLAUNCH, OnBnClickedButlaunch)
00038 ON_BN_CLICKED(IDC_BUTPART, OnBnClickedButpart)
00039 ON_BN_CLICKED(IDC_BUTINT, OnBnClickedButint)
00040 ON_BN_CLICKED(IDC_BUTASC, OnBnClickedButasc)
00041 END_MESSAGE_MAP()
00042
00043
00044
00045
00046 BOOL CExNihiloLauncherDlg::OnInitDialog()
00047 {
00048 CDialog::OnInitDialog();
00049
00050
00051
00052 SetIcon(m_hIcon, TRUE);
00053 SetIcon(m_hIcon, FALSE);
00054
00055
00056 m_CR800.SetCheck(true);
00057 return TRUE;
00058 }
00059
00060
00061
00062
00063
00064 void CExNihiloLauncherDlg::OnPaint()
00065 {
00066 if (IsIconic())
00067 {
00068 CPaintDC dc(this);
00069
00070 SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
00071
00072
00073 int cxIcon = GetSystemMetrics(SM_CXICON);
00074 int cyIcon = GetSystemMetrics(SM_CYICON);
00075 CRect rect;
00076 GetClientRect(&rect);
00077 int x = (rect.Width() - cxIcon + 1) / 2;
00078 int y = (rect.Height() - cyIcon + 1) / 2;
00079
00080
00081 dc.DrawIcon(x, y, m_hIcon);
00082 }
00083 else
00084 {
00085 CDialog::OnPaint();
00086 }
00087 }
00088
00089
00090
00091 HCURSOR CExNihiloLauncherDlg::OnQueryDragIcon()
00092 {
00093 return static_cast<HCURSOR>(m_hIcon);
00094 }
00095
00096 void CExNihiloLauncherDlg::OnBnClickedButlaunch()
00097 {
00098
00099
00100 CString Buff("ExNihilo.exe");
00101 UpdateData(true);
00102 if(m_CR800.GetCheck()){Buff=Buff+" 800 600";}
00103 if(m_CR1024.GetCheck()){Buff=Buff+" 1024 768";}
00104 if(m_CR1600.GetCheck()){Buff=Buff+" 1600 1200";}
00105 if(m_ChFull){Buff=Buff+" 1";}
00106 else{Buff=Buff+" 0";}
00107 WinExec(Buff,SW_SHOWDEFAULT);
00108
00109 }
00110
00111 void CExNihiloLauncherDlg::OnBnClickedButpart()
00112 {
00113
00114 WinExec("SDKParticules.exe",SW_SHOWDEFAULT);
00115 }
00116
00117 void CExNihiloLauncherDlg::OnBnClickedButint()
00118 {
00119
00120 WinExec("SDKInterface.exe",SW_SHOWDEFAULT);
00121 }
00122
00123 void CExNihiloLauncherDlg::OnBnClickedButasc()
00124 {
00125
00126 WinExec("Asc2Map.exe",SW_SHOWDEFAULT);
00127 }
00128
00129