1   /************************************************************************
  2           Copy Handler 1.x - program for copying data in Microsoft Windows
  3                                                    systems.
  4           Copyright (C) 2001-2004 Ixen Gerthannes (copyhandler@o2.pl)
  5  
  6           This program is free software; you can redistribute it and/or modify
  7           it under the terms of the GNU General Public License as published by
  8           the Free Software Foundation; either version 2 of the License, or
  9           (at your option) any later version.
  10  
  11           This program is distributed in the hope that it will be useful,
  12           but WITHOUT ANY WARRANTY; without even the implied warranty of
  13           MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14           GNU General Public License for more details.
  15  
  16           You should have received a copy of the GNU General Public License
  17           along with this program; if not, write to the Free Software
  18           Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19   *************************************************************************/
  20  
  21   #ifndef __COPYHANDLER_H__
  22   #define __COPYHANDLER_H__
  23  
  24   #ifndef __AFXWIN_H__
  25           #error include 'stdafx.h' before including this file for PCH
  26   #endif
  27  
  28   #include "resource.h"       // main symbols
  29   #include "AppHelper.h"
  30   #include "ResourceManager.h"
  31  
  32   #define DISABLE_CRYPT
  33   #include "ConfigManager.h"
  34  
  35   #include "CfgProperties.h"
  36   #include "LogFile.h"
  37  
  38   using namespace std;
  39  
  40   /////////////////////////////////////////////////////////////////////////////
  41   // CCopyHandlerApp:
  42   // See CopyHandler.cpp for the implementation of this class
  43   //
  44  
  45   class CCopyHandlerApp : public CWinApp, public CAppHelper
  46   {
  47   public:
  48   //      BOOL RegisterShellExt();
  49           CCopyHandlerApp();
  50           ~CCopyHandlerApp();
  51  
  52   // Overrides
  53           // ClassWizard generated virtual function overrides
  54           //{{AFX_VIRTUAL(CCopyHandlerApp)
  55           public:
  56           virtual BOOL InitInstance();
  57           //}}AFX_VIRTUAL
  58  
  59           bool HtmlHelp(UINT uiCommand, LPARAM lParam);
  60  
  61           PCTSTR GetHelpPath() const { return m_szHelpPath; };
  62  
  63           friend LRESULT MainRouter(ULONGLONG ullDst, UINT uiMsg, WPARAM wParam, LPARAM lParam);
  64           friend int MsgBox(UINT uiID, UINT nType=MB_OK, UINT nIDHelp=0);
  65           friend CCopyHandlerApp* GetApp();
  66           friend CResourceManager* GetResManager();
  67           friend CConfigManager* GetConfig();
  68           friend CLogFile* GetLog();
  69  
  70           void OnConfigNotify(UINT uiType, LPARAM lParam);
  71           void OnResManNotify(UINT uiType, LPARAM lParam);
  72   protected:
  73           bool UpdateHelpPaths();
  74           HWND HHelp(HWND hwndCaller, LPCSTR pszFile, UINT uCommand, DWORD dwData);
  75  
  76   public:
  77           CResourceManager m_resManager;
  78           CConfigManager m_cfgManager;
  79           CLogFile m_lfLog;
  80  
  81           CWnd *m_pMainWindow;
  82           // currently opened dialogs
  83   //      list<CWnd*> m_lhDialogs;
  84  
  85   protected:
  86   // Implementation
  87           HANDLE m_hMapObject;
  88           TCHAR m_szHelpPath[_MAX_PATH];  // full file path to the help file
  89  
  90           //{{AFX_MSG(CCopyHandlerApp)
  91           //}}AFX_MSG
  92           DECLARE_MESSAGE_MAP()
  93   };
  94  
  95  
  96   /////////////////////////////////////////////////////////////////////////////
  97  
  98   //{{AFX_INSERT_LOCATION}}
  99   // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  100  
  101   #endif