1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
| // testDlg.cpp : implementation file
//
#include "stdafx.h"
#include "test.h"
#include "testDlg.h"
#include <shellapi.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTestDlg dialog
CTestDlg::CTestDlg(CWnd* pParent /*=NULL*/)
: CDialog(CTestDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CTestDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CTestDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTestDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CTestDlg, CDialog)
//{{AFX_MSG_MAP(CTestDlg)
ON_WM_LBUTTONDOWN()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTestDlg message handlers
BOOL CTestDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
CenterWindow(GetDesktopWindow()); // center to the hpc screen
// TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
}
void CTestDlg::OnLButtonDown(UINT nFlags, CPoint point)
{
m_szDescription="clic";
CString strOpen= "open";
int i;
CString strExplorer= "\\Flash_Storage\\Evasio\\explorer.exe";
CString strEvadeo= "\\Flash_Storage\\Evasio\\CRISTINELAUNCHERIGN.exe";
CString strIgo8= "\\SDMMC\\iGO8\\iGO8.exe";
HWND hwnd;
InvalidateRect( NULL );
if(point.y > 260) {i=int ShellExecute(hwnd,strOpen,strExplorer,NULL,NULL,SW_MAXIMIZE)};
if((point.y < 259) & (point.x <235)) {i=int ShellExecute(hwnd,strOpen,strEvadeo,NULL,NULL,SW_MAXIMIZE)};
if((point.y < 259) & (point.x >236)) {i=int ShellExecute(hwnd,strOpen,strIgo8,NULL,NULL,SW_MAXIMIZE)};
CDialog::OnLButtonDown(nFlags, point);
} |
Partager