Modify LPCSTR into LPCTSTR.
AfxGetApp()->WriteProfileInt(_T(""), _T("Level"), 4);\r
}\r
\r
-void CProfile::AddKeyBind2C_(LPCSTR appName, BYTE bVk)\r
+void CProfile::AddKeyBind2C_(LPCTSTR appName, BYTE bVk)\r
{\r
int nComID;\r
for (nComID = 0; nComID < MAX_COMMAND; ++nComID)\r
cProperties.AddItem(p->szDescription, p->szFileName);\r
}\r
\r
-void CProfile::ClearData(const CString szCurrentApplication)\r
+void CProfile::ClearData(LPCTSTR appName)\r
{\r
for (int nAppID = 0; nAppID < MAX_APP; ++nAppID)\r
- if (szCurrentApplication == m_Config.szSpecialApp[nAppID]) {\r
+ if (!_tcscmp(appName, m_Config.szSpecialApp[nAppID])) {\r
ZeroMemory(m_Config.nCommandID[nAppID], sizeof(m_Config.nCommandID[nAppID]));\r
ZeroMemory(m_Config.szSpecialApp[nAppID], CLASS_NAME_LENGTH);\r
return;\r
}\r
}\r
\r
-void CProfile::CopyData(const CString szDstApp, const CString szSrcApp)\r
+void CProfile::CopyData(LPCTSTR dst, LPCTSTR src)\r
{\r
- int nDstApp = AssignAppID(szDstApp);\r
- int nSrcApp = GetAppID(szSrcApp);\r
+ int nDstApp = AssignAppID(dst);\r
+ int nSrcApp = GetAppID(src);\r
if (nDstApp == MAX_APP || nSrcApp == MAX_APP)\r
return;\r
SetSettingStyle(nDstApp, SETTING_SPECIFIC);\r
#undef CopyMember\r
}\r
\r
-int CProfile::AssignAppID(LPCSTR appName)\r
+int CProfile::AssignAppID(LPCTSTR appName)\r
{\r
int nAppID = GetAppID(appName);\r
if (nAppID != MAX_APP)\r
return MAX_APP;\r
}\r
\r
-int CProfile::GetAppID(LPCSTR appName)\r
+int CProfile::GetAppID(LPCTSTR appName)\r
{\r
int nAppID = 0;\r
for (nAppID = 0; nAppID < MAX_APP; ++nAppID)\r
m_Config.nKillRingMax[nAppID] = static_cast<BYTE>(nKillRingMax > 255 ? 255 : nKillRingMax);\r
}\r
\r
-CString CProfile::GetWindowText(int nAppID)\r
+LPCTSTR CProfile::GetWindowText(int nAppID)\r
{\r
return m_Config.szWindowText[nAppID];\r
}\r
\r
-void CProfile::SetWindowText(int nAppID, const CString szWindowText)\r
+void CProfile::SetWindowText(int nAppID, const CString& text)\r
{\r
- if (CUtils::GetWindowTextType(szWindowText) == IDS_WINDOW_TEXT_IGNORE)\r
+ if (CUtils::GetWindowTextType(text) == IDS_WINDOW_TEXT_IGNORE)\r
_tcscpy_s(m_Config.szWindowText[nAppID], _T("*"));\r
else\r
- _tcsncpy_s(m_Config.szWindowText[nAppID], szWindowText, _TRUNCATE);\r
+ _tcsncpy_s(m_Config.szWindowText[nAppID], text, _TRUNCATE);\r
}\r
\r
BOOL CProfile::Is106Keyboard()\r
static void StringToKey(LPCTSTR str, int& type, int& key);\r
static CString KeyToString(int type, int key);\r
static void InitAppList(CProperties& cProperties);\r
- static void CopyData(CString szDestinationApplication, CString szSourceApplication);\r
- static void ClearData(CString szCurrentApplication);\r
- static int AssignAppID(LPCSTR appName);\r
+ static void ClearData(LPCTSTR appName);\r
+ static void CopyData(LPCTSTR dstApp, LPCTSTR srcApp);\r
+ static int AssignAppID(LPCTSTR appName);\r
static int DefaultAppID();\r
- static int GetAppID(LPCSTR appName);\r
+ static int GetAppID(LPCTSTR appName);\r
static int GetSettingStyle(int nAppID);\r
static void SetSettingStyle(int nAppID, int nSettingStyle);\r
static void SetAppTitle(int nAppID, const CString& appTitle);\r
static BOOL GetEnableCUA(int nAppID);\r
static int GetKillRingMax(int nAppID);\r
static void SetKillRingMax(int nAppID, int nKillRingMax);\r
- static CString GetWindowText(int nAppID);\r
- static void SetWindowText(int nAppID, CString szWindowText);\r
+ static LPCTSTR GetWindowText(int nAppID);\r
+ static void SetWindowText(int nAppID, const CString& text);\r
static BOOL Is106Keyboard();\r
static BOOL IsVistaOrLater();\r
static void RestartComputer();\r
if (nAppID == MAX_APP)\r
return;\r
for (int nComID = 0; nComID < MAX_COMMAND; ++nComID) {\r
- const LPCSTR szComName = CCommands::GetCommandName(nComID);\r
+ const LPCTSTR szComName = CCommands::GetCommandName(nComID);\r
if (!szComName[0])\r
return;\r
for (int i = 0; const int nKey = CCommands::GetDefaultCommandKey(nComID, i); ++i) {\r
if (nAppID == MAX_APP)\r
return;\r
for (int nComID = 0; nComID < MAX_COMMAND; ++nComID) {\r
- const LPCSTR szComName = CCommands::GetCommandName(nComID);\r
+ const LPCTSTR szComName = CCommands::GetCommandName(nComID);\r
if (!szComName[0])\r
return;\r
for (int i = 0; const int nKey = CCommands::GetDefaultCommandKey(nComID, i); ++i) {\r
\r
const int nAppID = m_pProperties->GetApplicationID();\r
for (int nComID = 1; nComID < MAX_COMMAND; ++nComID) {\r
- const LPCSTR szComName = CCommands::GetCommandName(nComID);\r
+ const LPCTSTR szComName = CCommands::GetCommandName(nComID);\r
if (!szComName[0])\r
break;\r
const CString category(MAKEINTRESOURCE(CCommands::GetCategoryID(nComID)));\r
return Reset(GOTO_HOOKX);\r
}\r
\r
-LPCSTR CCommands::GetCommandName(int nComID)\r
+LPCTSTR CCommands::GetCommandName(int nComID)\r
{\r
return Commands[nComID].szCommandName;\r
}\r
static int BackwardChar();\r
static int BeginningOfLine();\r
static int ForwardChar();\r
- static LPCSTR GetCommandName(int nComID);\r
+ static LPCTSTR GetCommandName(int nComID);\r
static int GetCategoryID(int nComID);\r
static int GetDescriptionID(int nComID);\r
static int GetToolTipID(int nComID);\r
const LPVOID pMem = GlobalLock(hClipboard);\r
if (!pMem)\r
return FALSE;\r
- text = reinterpret_cast<LPCSTR>(pMem);\r
+ text = reinterpret_cast<LPCTSTR>(pMem);\r
GlobalUnlock(hClipboard);\r
EmptyClipboard();\r
CloseClipboard();\r
if (m_nAppID < 0)\r
m_nAppID = nAppID;\r
else {\r
- LPCSTR curText = m_Config.szWindowText[m_nAppID];\r
- LPCSTR newText = m_Config.szWindowText[nAppID];\r
+ LPCTSTR curText = m_Config.szWindowText[m_nAppID];\r
+ LPCTSTR newText = m_Config.szWindowText[nAppID];\r
int curType = CUtils::GetWindowTextType(curText);\r
int newType = CUtils::GetWindowTextType(newText);\r
if (curType < newType || curType == newType && _tcscmp(curText, newText) <= 0)\r
CCommands::Reset();\r
}\r
\r
-int CXkeymacsDll::GetAppID(LPCSTR szName, int fallback)\r
+int CXkeymacsDll::GetAppID(LPCTSTR szName, int fallback)\r
{\r
for (int i = 0; i < MAX_APP; ++i)\r
if (!_tcsicmp(m_Config.szSpecialApp[i], szName))\r
static LRESULT CALLBACK ShellProc(int nCode, WPARAM wParam, LPARAM lParam);\r
static int m_nAppID;\r
static void InitKeyboardProc(bool imeState);\r
- static int GetAppID(LPCSTR szName, int fallback);\r
+ static int GetAppID(LPCTSTR szName, int fallback);\r
static BOOL m_bRightShift;\r
static BOOL m_bRightControl;\r
static BOOL m_bRightAlt;\r