Page principale Liste des namespaces Hiérarchie des classes Liste par ordre alphabétique Liste des composants Liste des fichiers Membres des namespaces Composants Déclarations

# ExNihiloLauncherDlg.cpp

Aller à la documentation de ce fichier.

    00001 // ExNihiloLauncherDlg.cpp : implementation file
    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 // CExNihiloLauncherDlg dialog
    00014
    00015
    00016
    00017 CExNihiloLauncherDlg::CExNihiloLauncherDlg(CWnd* pParent /*=NULL*/)
    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         //}}AFX_MSG_MAP
    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 // CExNihiloLauncherDlg message handlers
    00045
    00046 BOOL CExNihiloLauncherDlg::OnInitDialog()
    00047 {
    00048         CDialog::OnInitDialog();
    00049
    00050         // Set the icon for this dialog.  The framework does this automatically
    00051         //  when the application's main window is not a dialog
    00052         SetIcon(m_hIcon, TRUE);                 // Set big icon
    00053         SetIcon(m_hIcon, FALSE);                // Set small icon
    00054
    00055         // TODO: Add extra initialization here
    00056         m_CR800.SetCheck(true);
    00057     return TRUE;  // return TRUE  unless you set the focus to a control
    00058 }
    00059
    00060 // If you add a minimize button to your dialog, you will need the code below
    00061 //  to draw the icon.  For MFC applications using the document/view model,
    00062 //  this is automatically done for you by the framework.
    00063
    00064 void CExNihiloLauncherDlg::OnPaint()
    00065 {
    00066         if (IsIconic())
    00067         {
    00068                 CPaintDC dc(this); // device context for painting
    00069
    00070                 SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
    00071
    00072                 // Center icon in client rectangle
    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                 // Draw the icon
    00081                 dc.DrawIcon(x, y, m_hIcon);
    00082         }
    00083         else
    00084         {
    00085                 CDialog::OnPaint();
    00086         }
    00087 }
    00088
    00089 // The system calls this function to obtain the cursor to display while the user drags
    00090 //  the minimized window.
    00091 HCURSOR CExNihiloLauncherDlg::OnQueryDragIcon()
    00092 {
    00093         return static_cast<HCURSOR>(m_hIcon);
    00094 }
    00095
    00096 void CExNihiloLauncherDlg::OnBnClickedButlaunch()
    00097 {
    00098         // TODO : ajoutez ici le code de votre gestionnaire de notification de contrôle
    00099         //build string
    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         // TODO : ajoutez ici le code de votre gestionnaire de notification de contrôle
    00114         WinExec("SDKParticules.exe",SW_SHOWDEFAULT);
    00115 }
    00116
    00117 void CExNihiloLauncherDlg::OnBnClickedButint()
    00118 {
    00119         // TODO : ajoutez ici le code de votre gestionnaire de notification de contrôle
    00120         WinExec("SDKInterface.exe",SW_SHOWDEFAULT);
    00121 }
    00122
    00123 void CExNihiloLauncherDlg::OnBnClickedButasc()
    00124 {
    00125         // TODO : ajoutez ici le code de votre gestionnaire de notification de contrôle
    00126         WinExec("Asc2Map.exe",SW_SHOWDEFAULT);
    00127 }
    00128
    00129