-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDiskBrowserApp.cpp
More file actions
139 lines (106 loc) · 3.53 KB
/
Copy pathDiskBrowserApp.cpp
File metadata and controls
139 lines (106 loc) · 3.53 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
/**********************************************************************
** Copyright (C) 2005-2015 Tesline-Service S.R.L. All rights reserved.
**
** Rohos Disk Browser, Rohos Mini Drive Portable.
**
**
** This file may be distributed and/or modified under the terms of the
** GNU Affero General Public license version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. If not, see <http://www.gnu.org/licenses/>
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.rohos.com/ for GPL licensing information.
**
** Contact info@rohos.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "pub.h"
#include "DiskBrowserApp.h"
#include "DiskBrowserDlg.h"
#include "common1.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// b
BEGIN_MESSAGE_MAP(CDiskBrowserApp, CWinApp)
//{{AFX_MSG_MAP(CDiskBrowserApp)
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDiskBrowserApp construction
CDiskBrowserApp::CDiskBrowserApp()
{
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CDiskBrowserApp object
CDiskBrowserApp theApp;
HINSTANCE h_lang;
CFsys _FSys;// Äëÿ ðàáîòû ñ ôàéëîâîé ñèñòåìîé
/////////////////////////////////////////////////////////////////////////////
// CDiskBrowserApp initialization
BOOL CDiskBrowserApp::InitInstance()
{
TCHAR path[600], rohospath[700];
GetPodNogamiPath(path, false );
TCHAR *new_app_name = new char[100];
strcpy(new_app_name, LS(IDS_ROHOS_DISK_BROWSER) );
m_pszAppName = new_app_name;
// ñîçäàòü Log ôàéë
/*ReadReg(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Rohos"), _T("RohosPath"), path, 400 );
if ( 0 == _tcslen(path) )
_tcscpy(path, TEXT("rohos_dv.log") );
else {
_tcscat(path, TEXT("rohos_dv.log") );
}*/
ReadReg(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Rohos"), _T("RohosPath"), rohospath, 500);
//if ( StrStrI(path, rohospath) )
{ // creates log only if we run from c:\\program files\\rohos
//_tcscat(path, TEXT("rohos_dv.log") );
//TRACE_INIT( path, 300/*Kb*/, FILE_ONLY, true);
}
//WriteLog("00");
AfxEnableControlContainer();
//m_pszAppName = new TCHAR[200];
//_tcscpy((LPTSTR)m_pszAppName, "Rohos Disk Viewer");
//WriteLog("11");
h_lang = m_hInstance;
InitCommonControls();
h_acl = LoadAccelerators(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDR_ACCELERATOR1));
// Standard initialization
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CDlg_DiskBrowserMain dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
}
else if (nResponse == IDCANCEL)
{
}
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}
BOOL CDiskBrowserApp::ProcessMessageFilter(int code, LPMSG lpMsg)
{
if(code < 0)
CWinApp::ProcessMessageFilter(code, lpMsg);
if(m_wnd && h_acl)
{
if(::TranslateAccelerator(m_wnd->m_hWnd, h_acl, lpMsg))
return(TRUE);
}
return CWinApp::ProcessMessageFilter(code, lpMsg);
}