blob: 79ff10068f5fb88358ae7d604e746b59238ae917 (
plain)
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
|
#include "stdafx.h"
#include "SpeechApi40aLexicon.h"
#include <windows.h>
#include <string.h>
#include <stdio.h>
#include <MMSystem.h>
#include <InitGuid.h>
#include <ObjBase.h>
#include <ObjError.h>
#include <Ole2Ver.h>
#include "SAPI 4.0/Include/speech.h"
//#include <spchwrap.h>
//------------------------------------------------------------------------------
SpeechApi40aLexicon::SpeechApi40aLexicon(HWND window, ITTSCentralW *tts_central) : m_window(window), m_tts_central(tts_central)
{
}
//------------------------------------------------------------------------------
SpeechApi40aLexicon::~SpeechApi40aLexicon()
{
}
//------------------------------------------------------------------------------
bool SpeechApi40aLexicon::display()
{
if (!m_tts_central)
{
return false;
}
ITTSDialogs *tts_dialogs = nullptr;
m_tts_central->QueryInterface(IID_ITTSDialogs, (void**)&tts_dialogs);
if (!tts_dialogs)
{
return false;
}
if (NOERROR != tts_dialogs->LexiconDlg(m_window, nullptr))
{
return false;
}
tts_dialogs->Release();
return true;
}
|