soui
5.0.0.1
Soui5 Doc
Loading...
Searching...
No Matches
SAppDir.cpp
1
#include "souistd.h"
2
#include "helper/SAppDir.h"
3
4
SNSBEGIN
5
SAppDir::SAppDir
(HINSTANCE hInst)
6
{
7
TCHAR szCurrentDir[MAX_PATH] = { 0 };
8
if
(GetModuleFileName(hInst, szCurrentDir, MAX_PATH))
9
{
10
#ifdef _WIN32
11
LPTSTR lpInsertPos = _tcsrchr(szCurrentDir, _T(
'\\'
));
12
#else
13
LPTSTR lpInsertPos = _tcsrchr(szCurrentDir, _T(
'/'
));
14
#endif
//
15
if
(lpInsertPos)
16
{
17
*lpInsertPos = 0;
18
}
19
m_strAppPath
= szCurrentDir;
20
}
21
}
22
23
const
SStringT &
SAppDir::AppDir
()
24
{
25
return
m_strAppPath
;
26
}
27
SNSEND
SAppDir::m_strAppPath
SStringT m_strAppPath
应用程序目录路径字符串
Definition
SAppDir.h:25
SAppDir::SAppDir
SAppDir(HINSTANCE hInst)
构造函数
Definition
SAppDir.cpp:5
SAppDir::AppDir
const SStringT & AppDir()
获取应用程序目录路径
Definition
SAppDir.cpp:23
SOUI
src
helper
SAppDir.cpp
Generated by
1.13.2