-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvoice.cpp
89 lines (59 loc) · 1.78 KB
/
voice.cpp
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
// voice.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "voice.h"
#include "voiceDlg.h"
#include "loadDlg.h"
#include "ServiceStt.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CvoiceApp
BEGIN_MESSAGE_MAP(CvoiceApp, CWinApp)
ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
END_MESSAGE_MAP()
// CvoiceApp construction
CvoiceApp::CvoiceApp()
{
// support Restart Manager
m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;
//-------------- APP CONSTRUCTOR ------------------------
}
// The one and only CvoiceApp object
CvoiceApp theApp;
// CvoiceApp initialization
BOOL CvoiceApp::InitInstance()
{
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
CWinApp::InitInstance();
AfxEnableControlContainer();
CShellManager *pShellManager = new CShellManager;
CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));
SetRegistryKey(_T("Local AppWizard-Generated Applications"));
//--------------------------------------
/*AllocConsole();
AttachConsole(GetCurrentProcessId());
FILE *stream;
freopen_s(&stream, "CONOUT$", "w+", stdout);*/
//--------------------------------------
CvoiceDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
//FreeConsole();
if (nResponse == -1)
{
TRACE(traceAppMsg, 0, "Warning: dialog creation failed, so application is terminating unexpectedly.\n");
TRACE(traceAppMsg, 0, "Warning: if you are using MFC controls on the dialog, you cannot #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS.\n");
}
if (pShellManager != nullptr)
{
delete pShellManager;
}
#if !defined(_AFXDLL) && !defined(_AFX_NO_MFC_CONTROLS_IN_DIALOGS)
ControlBarCleanUp();
#endif
return FALSE;
}