////////////////////////////////////////////////////// // // // Incremental Clock Syncronization. // // 236503(20) Summer 2001 // // Advanced Programming Project. // // Technion. Computer Science Department. // // // // Written by: Reitman Anna // // Fidelman Greg // // Supervisor: Hagit Attya // // Saar Pilosof // // // ////////////////////////////////////////////////////// // // Output.cpp : implementation file // #include "stdafx.h" #include "Clock.h" #include "Output.h" #include #include #include #include #include "IncClockSynch.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // Output dialog Output::Output(CWnd* pParent /*=NULL*/) : CDialog(Output::IDD, pParent) { //{{AFX_DATA_INIT(Output) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT } void Output::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(Output) // NOTE: the ClassWizard will add DDX and DDV calls here //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(Output, CDialog) //{{AFX_MSG_MAP(Output) ON_BN_CLICKED(IDC_BUTTON1, OnButton1) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // Output message handlers void Output::OnOK() { // TODO: Add extra validation here CDialog::OnOK(); char cmdLine[1000]; char dir[300]; strcpy(cmdLine,"C:\\Program Files\\Microsoft Office\\Office\\excel "); _getcwd( dir, 255 ); strcat(dir,"\\output.dat"); strcat(cmdLine,dir); //_execl( "C:\\Program Files\\Microsoft Office\\Office\\excel",dir,NULL); WinExec(cmdLine,SW_MAXIMIZE); CDialog::CloseWindow(); exit(1); } void Output::OnButton1() { // TODO: Add your control notification handler code here _execl( "notepad","output.dat",NULL); exit(1); } void Output::OnCancel() { // TODO: Add extra cleanup here CDialog::OnCancel(); CDialog::CloseWindow(); exit(1); } BOOL Output::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here outputFile.Close(); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }