subresync.cpp

00001 /* 
00002  *      SubResync.  Copyright (C) 2003-2005 Gabest
00003  *      http://www.gabest.org
00004  *
00005  *  This Program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation; either version 2, or (at your option)
00008  *  any later version.
00009  *   
00010  *  This Program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013  *  GNU General Public License for more details.
00014  *   
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with GNU Make; see the file COPYING.  If not, write to
00017  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
00018  *  http://www.gnu.org/copyleft/gpl.html
00019  *
00020  */
00021 
00022 // subresync.cpp : Defines the class behaviors for the application.
00023 //
00024 
00025 #include "stdafx.h"
00026 #include "subresync.h"
00027 #include "subresyncDlg.h"
00028 
00029 #ifdef _DEBUG
00030 #define new DEBUG_NEW
00031 #endif
00032 
00033 
00034 // CSubresyncApp
00035 
00036 BEGIN_MESSAGE_MAP(CSubresyncApp, CWinApp)
00037         ON_COMMAND(ID_HELP, CWinApp::OnHelp)
00038 END_MESSAGE_MAP()
00039 
00040 
00041 // CSubresyncApp construction
00042 
00043 CSubresyncApp::CSubresyncApp()
00044 {
00045 }
00046 
00047 
00048 // The one and only CSubresyncApp object
00049 
00050 CSubresyncApp theApp;
00051 
00052 
00053 // CSubresyncApp initialization
00054 
00055 BOOL CSubresyncApp::InitInstance()
00056 {
00057         // InitCommonControls() is required on Windows XP if an application
00058         // manifest specifies use of ComCtl32.dll version 6 or later to enable
00059         // visual styles.  Otherwise, any window creation will fail.
00060         InitCommonControls();
00061 
00062         CWinApp::InitInstance();
00063 
00064         AfxEnableControlContainer();
00065 
00066         SetRegistryKey(_T("Gabest"));
00067 
00068         CoInitialize(NULL);
00069 
00070         CCommandLineInfo cmdInfo;
00071         ParseCommandLine(cmdInfo);
00072 
00073         CSubresyncDlg dlg(cmdInfo.m_strFileName);
00074         m_pMainWnd = &dlg;
00075 
00076         INT_PTR nResponse = dlg.DoModal();
00077         if (nResponse == IDOK)
00078         {
00079                 // TODO: Place code here to handle when the dialog is
00080                 //  dismissed with OK
00081         }
00082         else if (nResponse == IDCANCEL)
00083         {
00084                 // TODO: Place code here to handle when the dialog is
00085                 //  dismissed with Cancel
00086         }
00087 
00088         // Since the dialog has been closed, return FALSE so that we exit the
00089         //  application, rather than start the application's message pump.
00090         return FALSE;
00091 }
00092 
00093 int CSubresyncApp::ExitInstance()
00094 {
00095         CoUninitialize();
00096 
00097         return CWinApp::ExitInstance();
00098 }

Generated on Tue Dec 13 14:47:05 2005 for guliverkli by  doxygen 1.4.5