Index: src/ch/ch.h =================================================================== diff -u -rbeeac49d2e0888993bd231a4e5863c7f0741e154 -r4fe995b304ea342b50293f92d3c1992b43b820f7 --- src/ch/ch.h (.../ch.h) (revision beeac49d2e0888993bd231a4e5863c7f0741e154) +++ src/ch/ch.h (.../ch.h) (revision 4fe995b304ea342b50293f92d3c1992b43b820f7) @@ -19,20 +19,12 @@ #ifndef __COPYHANDLER_H__ #define __COPYHANDLER_H__ -#ifndef __AFXWIN_H__ - #error include 'stdafx.h' before including this file for PCH -#endif - -#include "resource.h" // main symbols #include "AppHelper.h" -#include "CfgProperties.h" -#include "../chext/chext.h" -#include "../libicpf/log.h" #include "../libictranslate/ResourceManager.h" -#include "../libchcore/TCoreConfig.h" +#include "../libchcore/TConfig.h" +#include "TShellExtensionClient.h" +#include "TCommandLineParser.h" -using namespace std; - ///////////////////////////////////////////////////////////////////////////// // CCopyHandlerApp: // See CopyHandler.cpp for the implementation of this class @@ -44,43 +36,41 @@ CCopyHandlerApp(); ~CCopyHandlerApp(); - virtual BOOL InitInstance(); - virtual int ExitInstance(); + virtual BOOL InitInstance() override; + virtual int ExitInstance() override; - virtual void HtmlHelp(DWORD_PTR dwData, UINT nCmd); + virtual void HtmlHelp(DWORD_PTR dwData, UINT nCmd) override; PCTSTR GetHelpPath() const { return m_pszHelpFilePath; }; friend int MsgBox(UINT uiID, UINT nType=MB_OK, UINT nIDHelp=0); - friend LRESULT MainRouter(ULONGLONG ullDst, UINT uiMsg, WPARAM wParam, LPARAM lParam); friend CCopyHandlerApp& GetApp(); friend ictranslate::CResourceManager& GetResManager(); - friend icpf::config& GetConfig(); + friend chcore::TConfig& GetConfig(); - bool IsShellExtEnabled() const; + void RegisterShellExtension(); + void UnregisterShellExtension(); - void OnConfigNotify(uint_t uiPropID); + void OnConfigNotify(const chcore::TStringSet& setPropNames); void OnResManNotify(UINT uiType); + const TCommandLineParser& GetCommandLine() const { return m_cmdLineParser; } + protected: bool UpdateHelpPaths(); HWND HHelp(HWND hwndCaller, LPCTSTR pszFile, UINT uCommand, DWORD_PTR dwData); + void InitShellExtension(); + bool ParseCommandLine(); + protected: - HANDLE m_hMapObject; - IShellExtControl* m_piShellExtControl; - static icpf::config m_config; + TShellExtensionClient m_tShellExtClient; + TCommandLineParser m_cmdLineParser; CWnd *m_pMainWindow; DECLARE_MESSAGE_MAP() }; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - #endif