MTE_Util.h
941 Bytes
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
#pragma once
#include <string>
char *get_modis_exe_path();
char *get_convert_exe_full_path();
char *get_temp_path();
#define ENGLISH 0
#define SIM_CHINESE 1
#define START_CURRENT_SCR "----Current Screen----"
BOOL RunProcess(char* processname);
template <typename ContainerType, typename StringType>
StringType Join(const ContainerType &tokens, const StringType &delimiter)
{
StringType ret;
for (ContainerType::const_iterator iter = tokens.begin();
iter != tokens.end();
++iter)
{
if (iter != tokens.begin())
{
ret += delimiter;
}
ret += *iter;
}
return ret;
}
class MoDISFileDialogW
{
public:
MoDISFileDialogW( OPENFILENAMEW &ofn );
MoDISFileDialogW( HWND hwndOwner, LPCWSTR lpstrDefExtW,
LPWSTR lpszFileNameW, DWORD Flags, LPCWSTR lpstrFilterW);
BOOL LoadFile();
BOOL SaveFile();
std::wstring GetFileNameW();
std::string GetFileNameA();
private:
OPENFILENAMEW ofn ;
WCHAR szFile[MAX_PATH];
};