diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-30 18:51:36 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-30 18:51:36 +0000 |
commit | 688f55ba998c19304a29727c910504903f4cc49a (patch) | |
tree | 69121ebb6d02bcf9e670428b11813087fc7f1640 /plugins/Popup/src | |
parent | 4f0e30cdf56fbafdf955bbe8b93930bab9e39bd0 (diff) |
lstr* replacements
git-svn-id: http://svn.miranda-ng.org/main/trunk@11176 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Popup/src')
-rw-r--r-- | plugins/Popup/src/actions.cpp | 6 | ||||
-rw-r--r-- | plugins/Popup/src/bitmap_funcs.cpp | 12 | ||||
-rw-r--r-- | plugins/Popup/src/font.cpp | 44 | ||||
-rw-r--r-- | plugins/Popup/src/font.h | 2 | ||||
-rw-r--r-- | plugins/Popup/src/notifications.cpp | 22 | ||||
-rw-r--r-- | plugins/Popup/src/opt_class.cpp | 8 | ||||
-rw-r--r-- | plugins/Popup/src/opt_gen.cpp | 26 | ||||
-rw-r--r-- | plugins/Popup/src/opt_skins.cpp | 12 | ||||
-rw-r--r-- | plugins/Popup/src/opttree.cpp | 4 | ||||
-rw-r--r-- | plugins/Popup/src/popup_wnd2.cpp | 26 | ||||
-rw-r--r-- | plugins/Popup/src/skin.cpp | 30 |
11 files changed, 96 insertions, 96 deletions
diff --git a/plugins/Popup/src/actions.cpp b/plugins/Popup/src/actions.cpp index 22c8d854a9..db3e581b59 100644 --- a/plugins/Popup/src/actions.cpp +++ b/plugins/Popup/src/actions.cpp @@ -96,7 +96,7 @@ bool IsActionEnabled(char *name) {
POPUPACTION action = {0};
action.flags = PAF_ENABLED;
- lstrcpyA(action.lpzTitle, name);
+ mir_strcpy(action.lpzTitle, name);
return IsActionEnabled(&action);
}
@@ -235,7 +235,7 @@ INT_PTR CALLBACK DlgProcPopupActions(HWND hwnd, UINT msg, WPARAM wParam, LPARAM char *szName = strchr(gActions[i]->lpzTitle, '/');
if (!szName) szName = gActions[i]->lpzTitle;
else ++szName;
- lstrcpynA(szGroup, gActions[i]->lpzTitle, szName - gActions[i]->lpzTitle);
+ mir_strncpy(szGroup, gActions[i]->lpzTitle, szName - gActions[i]->lpzTitle);
int grpId = 0;
@@ -246,7 +246,7 @@ INT_PTR CALLBACK DlgProcPopupActions(HWND hwnd, UINT msg, WPARAM wParam, LPARAM group.mask = LVGF_HEADER | LVGF_GROUPID;
LPTSTR wszGroup = mir_a2t(szGroup);
group.pszHeader = TranslateTS(wszGroup);
- group.cchHeader = lstrlen(wszGroup);
+ group.cchHeader = mir_tstrlen(wszGroup);
grpId = group.iGroupId = groups.getCount();
int grpId = ListView_InsertGroup(hwndList, -1, &group);
mir_free(wszGroup);
diff --git a/plugins/Popup/src/bitmap_funcs.cpp b/plugins/Popup/src/bitmap_funcs.cpp index 91cb7093d2..821aa10017 100644 --- a/plugins/Popup/src/bitmap_funcs.cpp +++ b/plugins/Popup/src/bitmap_funcs.cpp @@ -596,10 +596,10 @@ void MyBitmap::DrawIcon(HICON hic, int x, int y, int w, int h) void MyBitmap::Draw_Text(TCHAR *str, int x, int y)
{
- SIZE sz; GetTextExtentPoint32(this->getDC(), str, lstrlen(str), &sz);
+ SIZE sz; GetTextExtentPoint32(this->getDC(), str, mir_tstrlen(str), &sz);
RECT rc; SetRect(&rc, x, y, x + 10000, y + 10000);
this->saveAlpha(x, y, sz.cx, sz.cy);
- DrawText(this->getDC(), str, lstrlen(str), &rc, DT_LEFT | DT_TOP | DT_SINGLELINE | DT_NOPREFIX);
+ DrawText(this->getDC(), str, mir_tstrlen(str), &rc, DT_LEFT | DT_TOP | DT_SINGLELINE | DT_NOPREFIX);
this->restoreAlpha(x, y, sz.cx, sz.cy);
}
@@ -680,7 +680,7 @@ bool MyBitmap::loadFromFile_pixel(const TCHAR *fn, const TCHAR *fnAlpha) {
allocate(1, 1);
int r, g, b, a = 255;
- const TCHAR *p = fn + lstrlen(_T("pixel:"));
+ const TCHAR *p = fn + mir_tstrlen(_T("pixel:"));
r = (hex2dec(p[0]) << 4) + hex2dec(p[1]);
g = (hex2dec(p[2]) << 4) + hex2dec(p[3]);
b = (hex2dec(p[4]) << 4) + hex2dec(p[5]);
@@ -690,7 +690,7 @@ bool MyBitmap::loadFromFile_pixel(const TCHAR *fn, const TCHAR *fnAlpha) bool MyBitmap::loadFromFile_gradient(const TCHAR *fn, const TCHAR *fnAlpha)
{
- const TCHAR *p = fn + lstrlen(_T("gradient:"));
+ const TCHAR *p = fn + mir_tstrlen(_T("gradient:"));
if (*p == 'h') allocate(256, 1);
else allocate(1, 256);
@@ -825,10 +825,10 @@ bool MyBitmap::loadFromFile(const TCHAR *fn, const TCHAR *fnAlpha) {
if (bits) freemem();
- if (!_tcsncmp(fn, _T("pixel:"), lstrlen(_T("pixel:"))))
+ if (!_tcsncmp(fn, _T("pixel:"), mir_tstrlen(_T("pixel:"))))
return loadFromFile_pixel(fn, fnAlpha);
- if (!_tcsncmp(fn, _T("gradient:"), lstrlen(_T("gradient:"))))
+ if (!_tcsncmp(fn, _T("gradient:"), mir_tstrlen(_T("gradient:"))))
return loadFromFile_gradient(fn, fnAlpha);
TCHAR ext[5];
diff --git a/plugins/Popup/src/font.cpp b/plugins/Popup/src/font.cpp index 034a8f002c..d481fc63c9 100644 --- a/plugins/Popup/src/font.cpp +++ b/plugins/Popup/src/font.cpp @@ -29,41 +29,41 @@ void InitFonts() { // Fonts
FontIDT fid = {0};
fid.cbSize = sizeof(FontIDT);
- lstrcpyn(fid.group, _T(PU_FNT_AND_COLOR), SIZEOF(fid.group));
+ mir_tstrncpy(fid.group, _T(PU_FNT_AND_COLOR), SIZEOF(fid.group));
strncpy(fid.dbSettingsGroup, PU_FNT_AND_COLOR_DB, SIZEOF(fid.dbSettingsGroup));
fid.flags = FIDF_DEFAULTVALID;
fid.deffontsettings.charset = DEFAULT_CHARSET;
fid.deffontsettings.size = -11;
- lstrcpyn(fid.backgroundGroup, _T(PU_FNT_AND_COLOR), SIZEOF(fid.backgroundGroup));
- lstrcpyn(fid.backgroundName, PU_COL_BACK_NAME, SIZEOF(fid.backgroundName));
- lstrcpyn(fid.deffontsettings.szFace, _T("Tahoma"), SIZEOF(fid.deffontsettings.szFace));
+ mir_tstrncpy(fid.backgroundGroup, _T(PU_FNT_AND_COLOR), SIZEOF(fid.backgroundGroup));
+ mir_tstrncpy(fid.backgroundName, PU_COL_BACK_NAME, SIZEOF(fid.backgroundName));
+ mir_tstrncpy(fid.deffontsettings.szFace, _T("Tahoma"), SIZEOF(fid.deffontsettings.szFace));
- lstrcpyn(fid.name, _T(PU_FNT_NAME_TITLE), SIZEOF(fid.name));
+ mir_tstrncpy(fid.name, _T(PU_FNT_NAME_TITLE), SIZEOF(fid.name));
mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_TITLE);
fid.deffontsettings.style = DBFONTF_BOLD;
fid.deffontsettings.colour = RGB(0, 0, 0);
FontRegisterT(&fid);
- lstrcpyn(fid.name, _T(PU_FNT_NAME_CLOCK), SIZEOF(fid.name));
+ mir_tstrncpy(fid.name, _T(PU_FNT_NAME_CLOCK), SIZEOF(fid.name));
mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_CLOCK);
//fid.deffontsettings.style = DBFONTF_BOLD;
//fid.deffontsettings.colour = RGB(0, 0, 0);
FontRegisterT(&fid);
- lstrcpyn(fid.name, _T(PU_FNT_NAME_TEXT), SIZEOF(fid.name));
+ mir_tstrncpy(fid.name, _T(PU_FNT_NAME_TEXT), SIZEOF(fid.name));
mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_TEXT);
fid.deffontsettings.style = 0;
//fid.deffontsettings.colour = RGB(0, 0, 0);
FontRegisterT(&fid);
- lstrcpyn(fid.name, _T(PU_FNT_NAME_ACTION), SIZEOF(fid.name));
+ mir_tstrncpy(fid.name, _T(PU_FNT_NAME_ACTION), SIZEOF(fid.name));
mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_ACTION);
fid.flags = FIDF_DEFAULTVALID | FIDF_ALLOWEFFECTS;
//fid.deffontsettings.style = 0;
fid.deffontsettings.colour = RGB(0, 0, 255);
FontRegisterT(&fid);
- lstrcpyn(fid.name, _T(PU_FNT_NAME_HOVERED_ACTION), SIZEOF(fid.name));
+ mir_tstrncpy(fid.name, _T(PU_FNT_NAME_HOVERED_ACTION), SIZEOF(fid.name));
mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_HOVERED_ACTION);
fid.deffontsettings.style = DBFONTF_UNDERLINE;
//fid.deffontsettings.colour = RGB(0, 0, 255);
@@ -71,15 +71,15 @@ void InitFonts() { ColourIDT cid = {0};
cid.cbSize = sizeof(ColourIDT);
- lstrcpyn(cid.group, _T(PU_FNT_AND_COLOR), SIZEOF(cid.group));
+ mir_tstrncpy(cid.group, _T(PU_FNT_AND_COLOR), SIZEOF(cid.group));
strncpy(cid.dbSettingsGroup, PU_FNT_AND_COLOR_DB, SIZEOF(cid.dbSettingsGroup));
- lstrcpyn(cid.name, PU_COL_BACK_NAME, SIZEOF(cid.name));
+ mir_tstrncpy(cid.name, PU_COL_BACK_NAME, SIZEOF(cid.name));
strncpy(cid.setting, PU_COL_BACK_SETTING, SIZEOF(cid.setting));
cid.defcolour = SETTING_BACKCOLOUR_DEFAULT;
ColourRegisterT(&cid);
- lstrcpyn(cid.name, PU_COL_AVAT_NAME, SIZEOF(cid.name));
+ mir_tstrncpy(cid.name, PU_COL_AVAT_NAME, SIZEOF(cid.name));
strncpy(cid.setting, PU_COL_AVAT_SETTING, SIZEOF(cid.setting));
cid.defcolour = SETTING_TEXTCOLOUR_DEFAULT;
ColourRegisterT(&cid);
@@ -99,36 +99,36 @@ void ReloadFonts() LOGFONT lf = {0};
FontIDT fid = {0};
fid.cbSize = sizeof(FontIDT);
- lstrcpyn(fid.group, _T(PU_FNT_AND_COLOR), SIZEOF(fid.name));
+ mir_tstrncpy(fid.group, _T(PU_FNT_AND_COLOR), SIZEOF(fid.name));
- lstrcpyn(fid.name, _T(PU_FNT_NAME_TITLE), SIZEOF(fid.name));
+ mir_tstrncpy(fid.name, _T(PU_FNT_NAME_TITLE), SIZEOF(fid.name));
fonts.clTitle = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
fonts.title = CreateFontIndirect(&lf);
- lstrcpyn(fid.name, _T(PU_FNT_NAME_CLOCK), SIZEOF(fid.name));
+ mir_tstrncpy(fid.name, _T(PU_FNT_NAME_CLOCK), SIZEOF(fid.name));
fonts.clClock = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
fonts.clock = CreateFontIndirect(&lf);
- lstrcpyn(fid.name, _T(PU_FNT_NAME_TEXT), SIZEOF(fid.name));
+ mir_tstrncpy(fid.name, _T(PU_FNT_NAME_TEXT), SIZEOF(fid.name));
fonts.clText = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
fonts.text = CreateFontIndirect(&lf);
- lstrcpyn(fid.name, _T(PU_FNT_NAME_ACTION), SIZEOF(fid.name));
+ mir_tstrncpy(fid.name, _T(PU_FNT_NAME_ACTION), SIZEOF(fid.name));
fonts.clAction = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
fonts.action = CreateFontIndirect(&lf);
- lstrcpyn(fid.name, _T(PU_FNT_NAME_HOVERED_ACTION), SIZEOF(fid.name));
+ mir_tstrncpy(fid.name, _T(PU_FNT_NAME_HOVERED_ACTION), SIZEOF(fid.name));
fonts.clActionHover = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
fonts.actionHover = CreateFontIndirect(&lf);
ColourIDT cid = {0};
cid.cbSize = sizeof(ColourIDT);
- lstrcpyn(cid.group, _T(PU_FNT_AND_COLOR), SIZEOF(cid.group));
- lstrcpyn(cid.name, PU_COL_BACK_NAME, SIZEOF(cid.name));
+ mir_tstrncpy(cid.group, _T(PU_FNT_AND_COLOR), SIZEOF(cid.group));
+ mir_tstrncpy(cid.name, PU_COL_BACK_NAME, SIZEOF(cid.name));
fonts.clBack = (COLORREF)CallService(MS_COLOUR_GETT, (WPARAM)&cid, (LPARAM)&lf);
- lstrcpyn(cid.group, _T(PU_FNT_AND_COLOR), SIZEOF(cid.group));
- lstrcpyn(cid.name, PU_COL_AVAT_NAME, SIZEOF(cid.name));
+ mir_tstrncpy(cid.group, _T(PU_FNT_AND_COLOR), SIZEOF(cid.group));
+ mir_tstrncpy(cid.name, PU_COL_AVAT_NAME, SIZEOF(cid.name));
fonts.clAvatarBorder = (COLORREF)CallService(MS_COLOUR_GETT, (WPARAM)&cid, (LPARAM)&lf);
//update class popupps(only temp at this point, must rework)
diff --git a/plugins/Popup/src/font.h b/plugins/Popup/src/font.h index b3b682e361..eeab5d9f65 100644 --- a/plugins/Popup/src/font.h +++ b/plugins/Popup/src/font.h @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define PU_FNT_AND_COLOR_DB MODULNAME //use eg strcpy(fid.dbSettingsGroup, PU_FNT_GROUP_DB);
#define PU_FNT_PREFIX "fnt%s" //use eg mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_....);
-#define PU_FNT_NAME_TITLE LPGEN("Title") //use eg lstrcpy(fid.name, _T(FNT_NAME_....)) for FontIDT
+#define PU_FNT_NAME_TITLE LPGEN("Title") //use eg mir_tstrcpy(fid.name, _T(FNT_NAME_....)) for FontIDT
#define PU_FNT_NAME_CLOCK LPGEN("Clock")
#define PU_FNT_NAME_TEXT LPGEN("Text")
#define PU_FNT_NAME_ACTION LPGEN("Action")
diff --git a/plugins/Popup/src/notifications.cpp b/plugins/Popup/src/notifications.cpp index f8ebfe9eda..57fbf18b62 100644 --- a/plugins/Popup/src/notifications.cpp +++ b/plugins/Popup/src/notifications.cpp @@ -46,24 +46,24 @@ void LoadNotifications() notification.actionCount = 0;
notification.lpActions = 0;
- lstrcpynA(notification.lpzGroup, "Misc", sizeof(notification.lpzName));
- lstrcpynA(notification.lpzName, "Warning", sizeof(notification.lpzName));
+ mir_strncpy(notification.lpzGroup, "Misc", sizeof(notification.lpzName));
+ mir_strncpy(notification.lpzName, "Warning", sizeof(notification.lpzName));
notification.lchIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_MB_WARN), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR|LR_SHARED);
notification.colorBack = RGB(210,210,150);
notification.colorText = RGB(0,0,0);
notification.iSeconds = 10;
g_hntfWarning = RegisterNotification(¬ification);
- lstrcpynA(notification.lpzGroup, "Misc", sizeof(notification.lpzName));
- lstrcpynA(notification.lpzName, "Notification", sizeof(notification.lpzName));
+ mir_strncpy(notification.lpzGroup, "Misc", sizeof(notification.lpzName));
+ mir_strncpy(notification.lpzName, "Notification", sizeof(notification.lpzName));
notification.lchIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_MB_INFO), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR|LR_SHARED);
notification.colorBack = RGB(230,230,230);
notification.colorText = RGB(0,0,0);
notification.iSeconds = 7;
g_hntfNotification = RegisterNotification(¬ification);
- lstrcpynA(notification.lpzGroup, "Misc", sizeof(notification.lpzName));
- lstrcpynA(notification.lpzName, "Error", sizeof(notification.lpzName));
+ mir_strncpy(notification.lpzGroup, "Misc", sizeof(notification.lpzName));
+ mir_strncpy(notification.lpzName, "Error", sizeof(notification.lpzName));
notification.lchIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_MB_STOP), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR|LR_SHARED);
notification.colorBack = RGB(191,0,0);
notification.colorText = RGB(255,245,225);
@@ -160,12 +160,12 @@ void LoadNotificationSettings(POPUPTREEDATA *ptd, char* szModul) mir_snprintf(setting, sizeof(setting), "{%s/%s}leftAction", ptd->notification.lpzGroup, ptd->notification.lpzName);
szTmp = db_get_s(NULL, szModul, setting, ptd->notification.lpzLAction);
- lstrcpynA(ptd->leftAction, szTmp, sizeof(ptd->leftAction));
+ mir_strncpy(ptd->leftAction, szTmp, sizeof(ptd->leftAction));
mir_free(szTmp); szTmp = NULL;
mir_snprintf(setting, sizeof(setting), "{%s/%s}rightAction", ptd->notification.lpzGroup, ptd->notification.lpzName);
szTmp = db_get_s(NULL, szModul, setting, ptd->notification.lpzRAction);
- lstrcpynA(ptd->rightAction, szTmp, sizeof(ptd->rightAction));
+ mir_strncpy(ptd->rightAction, szTmp, sizeof(ptd->rightAction));
mir_free(szTmp); szTmp = NULL;
}
}
@@ -188,12 +188,12 @@ HANDLE RegisterNotification(POPUPNOTIFICATION *notification) FontID fontid = {0};
fontid.cbSize = sizeof(fontid);
mir_snprintf(fontid.group, sizeof(fontid.group), PU_FNT_AND_COLOR"/%s", notification->lpzGroup);
- lstrcpyA(fontid.dbSettingsGroup, "PopupNotifications");
+ mir_strcpy(fontid.dbSettingsGroup, "PopupNotifications");
fontid.flags = FIDF_DEFAULTVALID;
fontid.deffontsettings.charset = DEFAULT_CHARSET;
fontid.deffontsettings.colour = ptd->notification.colorText;
fontid.deffontsettings.size = -11;
- lstrcpynA(fontid.deffontsettings.szFace, "MS Shell Dlg", SIZEOF(fontid.deffontsettings.szFace));
+ mir_strncpy(fontid.deffontsettings.szFace, "MS Shell Dlg", SIZEOF(fontid.deffontsettings.szFace));
fontid.deffontsettings.style = 0;
mir_snprintf(fontid.name, SIZEOF(fontid.name), "%s (colors only)", notification->lpzName);
mir_snprintf(fontid.prefix, SIZEOF(fontid.prefix), "{%s/%s}text", notification->lpzGroup, notification->lpzName);
@@ -203,7 +203,7 @@ HANDLE RegisterNotification(POPUPNOTIFICATION *notification) ColourID colourid = {0};
colourid.cbSize = sizeof(colourid);
mir_snprintf(colourid.group, sizeof(colourid.group), PU_FNT_AND_COLOR"/%s", notification->lpzGroup);
- lstrcpyA(colourid.dbSettingsGroup, "PopupNotifications");
+ mir_strcpy(colourid.dbSettingsGroup, "PopupNotifications");
mir_snprintf(colourid.name, SIZEOF(colourid.name), "%s (colors only)", notification->lpzName);
mir_snprintf(colourid.setting, SIZEOF(colourid.setting), "{%s/%s}backColor", notification->lpzGroup, notification->lpzName);
colourid.defcolour = ptd->notification.colorBack;
diff --git a/plugins/Popup/src/opt_class.cpp b/plugins/Popup/src/opt_class.cpp index 8289dbb279..4fd1d07894 100644 --- a/plugins/Popup/src/opt_class.cpp +++ b/plugins/Popup/src/opt_class.cpp @@ -397,13 +397,13 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l case CBN_SELCHANGE: //ComboBox controls
switch(idCtrl) {
case IDC_LACTION:
- lstrcpynA(ptd->leftAction,
+ mir_strncpy(ptd->leftAction,
(char *)ComboBox_GetItemData((HWND)lParam, ComboBox_GetCurSel((HWND)lParam)),
sizeof(ptd->leftAction));
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
break;
case IDC_RACTION:
- lstrcpynA(ptd->rightAction,
+ mir_strncpy(ptd->rightAction,
(char *)ComboBox_GetItemData((HWND)lParam, ComboBox_GetCurSel((HWND)lParam)),
sizeof(ptd->rightAction));
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
@@ -508,12 +508,12 @@ void LoadClassSettings(POPUPTREEDATA *ptd, char* szModul) mir_snprintf(setting, sizeof(setting), "%s/leftAction", ptd->pupClass.pszName);
szTmp = db_get_s(NULL, szModul, setting, POPUP_ACTION_NOTHING); //standart ??
- lstrcpynA(ptd->leftAction, szTmp, sizeof(ptd->leftAction));
+ mir_strncpy(ptd->leftAction, szTmp, sizeof(ptd->leftAction));
mir_free(szTmp); szTmp = NULL;
mir_snprintf(setting, sizeof(setting), "%s/rightAction", ptd->pupClass.pszName);
szTmp = db_get_s(NULL, szModul, setting, POPUP_ACTION_DISMISS); //standart ??
- lstrcpynA(ptd->rightAction, szTmp, sizeof(ptd->rightAction));
+ mir_strncpy(ptd->rightAction, szTmp, sizeof(ptd->rightAction));
mir_free(szTmp); szTmp = NULL;
}
diff --git a/plugins/Popup/src/opt_gen.cpp b/plugins/Popup/src/opt_gen.cpp index 781b009795..c104eb2c3a 100644 --- a/plugins/Popup/src/opt_gen.cpp +++ b/plugins/Popup/src/opt_gen.cpp @@ -47,24 +47,24 @@ int AddStatusMode(OPTTREE_OPTION *options, int pos, LPTSTR prefix, DWORD flag) if (!flag) return pos;
options[pos].dwFlag = flag;
options[pos].groupId = OPTTREE_CHECK;
- options[pos].pszOptionName = (LPTSTR)mir_alloc(sizeof(TCHAR) * lstrlen(prefix) + 32);
+ options[pos].pszOptionName = (LPTSTR)mir_alloc(sizeof(TCHAR) * mir_tstrlen(prefix) + 32);
options[pos].pszSettingName = mir_tstrdup(prefix);
options[pos].iconIndex = 0;
- lstrcpy(options[pos].pszOptionName, prefix);
- lstrcat(options[pos].pszOptionName, _T("/"));
+ mir_tstrcpy(options[pos].pszOptionName, prefix);
+ mir_tstrcat(options[pos].pszOptionName, _T("/"));
switch (flag)
{
- case PF2_IDLE: lstrcat(options[pos].pszOptionName, LPGENT("Offline")); break;
- case PF2_ONLINE: lstrcat(options[pos].pszOptionName, LPGENT("Online")); break;
- case PF2_INVISIBLE: lstrcat(options[pos].pszOptionName, LPGENT("Invisible")); break;
- case PF2_SHORTAWAY: lstrcat(options[pos].pszOptionName, LPGENT("Away")); break;
- case PF2_LONGAWAY: lstrcat(options[pos].pszOptionName, LPGENT("NA")); break;
- case PF2_LIGHTDND: lstrcat(options[pos].pszOptionName, LPGENT("Occupied")); break;
- case PF2_HEAVYDND: lstrcat(options[pos].pszOptionName, LPGENT("DND")); break;
- case PF2_FREECHAT: lstrcat(options[pos].pszOptionName, LPGENT("Free for chat")); break;
- case PF2_OUTTOLUNCH: lstrcat(options[pos].pszOptionName, LPGENT("Out to lunch")); break;
- case PF2_ONTHEPHONE: lstrcat(options[pos].pszOptionName, LPGENT("On the phone")); break;
+ case PF2_IDLE: mir_tstrcat(options[pos].pszOptionName, LPGENT("Offline")); break;
+ case PF2_ONLINE: mir_tstrcat(options[pos].pszOptionName, LPGENT("Online")); break;
+ case PF2_INVISIBLE: mir_tstrcat(options[pos].pszOptionName, LPGENT("Invisible")); break;
+ case PF2_SHORTAWAY: mir_tstrcat(options[pos].pszOptionName, LPGENT("Away")); break;
+ case PF2_LONGAWAY: mir_tstrcat(options[pos].pszOptionName, LPGENT("NA")); break;
+ case PF2_LIGHTDND: mir_tstrcat(options[pos].pszOptionName, LPGENT("Occupied")); break;
+ case PF2_HEAVYDND: mir_tstrcat(options[pos].pszOptionName, LPGENT("DND")); break;
+ case PF2_FREECHAT: mir_tstrcat(options[pos].pszOptionName, LPGENT("Free for chat")); break;
+ case PF2_OUTTOLUNCH: mir_tstrcat(options[pos].pszOptionName, LPGENT("Out to lunch")); break;
+ case PF2_ONTHEPHONE: mir_tstrcat(options[pos].pszOptionName, LPGENT("On the phone")); break;
}
return pos + 1;
}
diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp index e00a7a6b32..7b441978ed 100644 --- a/plugins/Popup/src/opt_skins.cpp +++ b/plugins/Popup/src/opt_skins.cpp @@ -187,8 +187,8 @@ int SkinOptionList_AddSkin(OPTTREE_OPTION* &options, int *OptionsCount, int pos options[pos].iconIndex = 0;
options[pos].pszSettingName = mir_tstrdup(_T("Skin options"));
options[pos].pszOptionName = (LPTSTR)mir_alloc(sizeof(TCHAR)*(
- lstrlen(options[pos].pszSettingName)+
- lstrlenA(skin->getFlagName(i)) +10 ));
+ mir_tstrlen(options[pos].pszSettingName)+
+ mir_strlen(skin->getFlagName(i)) +10 ));
wsprintf(options[pos].pszOptionName, _T("%s/%hs"), options[pos].pszSettingName, skin->getFlagName(i)); //!!!!!!!!!!!!!
options[pos].bState = skin->getFlag(i) ? TRUE : FALSE;
options[pos].Data = i; //skin flag index
@@ -248,8 +248,8 @@ int SkinOptionList_AddMain(OPTTREE_OPTION* &options, int *OptionsCount, int pos, options[pos].iconIndex = 0;
options[pos].pszSettingName = mir_tstrdup(LPGENT("Global settings"));
options[pos].pszOptionName = (LPTSTR)mir_alloc(sizeof(TCHAR)*(
- lstrlen(options[pos].pszSettingName)+
- lstrlen(mainOption[i]) + 10));
+ mir_tstrlen(options[pos].pszSettingName)+
+ mir_tstrlen(mainOption[i]) + 10));
wsprintf(options[pos].pszOptionName, _T("%s/%s"), options[pos].pszSettingName, mainOption[i]); //!!!!!!!!!!!!!
options[pos].bState = bCheck;
pos++;
@@ -559,12 +559,12 @@ static void BoxPreview_OnPaint(HWND hwnd, HDC mydc, int mode) rc.left += 30; // 10+16+4 -- icon
rc.right -= (rc.right-rc.left)/3;
rc.bottom -= (rc.bottom-rc.top)/3;
- DrawText(mydc, _T(MODULNAME_LONG), lstrlen(_T(MODULNAME_LONG)), &rc, DT_CENTER|DT_NOPREFIX|DT_SINGLELINE|DT_VCENTER);
+ DrawText(mydc, _T(MODULNAME_LONG), mir_tstrlen(_T(MODULNAME_LONG)), &rc, DT_CENTER|DT_NOPREFIX|DT_SINGLELINE|DT_VCENTER);
GetClientRect(hwnd, &rc);
rc.left += 30; // 10+16+4 -- icon
rc.left += (rc.right-rc.left)/3;
rc.top += (rc.bottom-rc.top)/3;
- DrawText(mydc, _T(MODULNAME_LONG), lstrlen(_T(MODULNAME_LONG)), &rc, DT_CENTER|DT_NOPREFIX|DT_SINGLELINE|DT_VCENTER);
+ DrawText(mydc, _T(MODULNAME_LONG), mir_tstrlen(_T(MODULNAME_LONG)), &rc, DT_CENTER|DT_NOPREFIX|DT_SINGLELINE|DT_VCENTER);
GetClientRect(hwnd, &rc);
FrameRect(mydc, &rc, (HBRUSH)GetStockObject(BLACK_BRUSH));
SelectObject(mydc, hfnt);
diff --git a/plugins/Popup/src/opttree.cpp b/plugins/Popup/src/opttree.cpp index 1c670e06b0..c7729d199d 100644 --- a/plugins/Popup/src/opttree.cpp +++ b/plugins/Popup/src/opttree.cpp @@ -101,7 +101,7 @@ HTREEITEM OptTree_AddItem(HWND hwndTree, LPTSTR name, LPARAM lParam, int iconInd int sectionLevel = 0;
HTREEITEM hSection = NULL, result = NULL;
- lstrcpy(itemName, name);
+ mir_tstrcpy(itemName, name);
sectionName = itemName;
while (sectionName) {
@@ -176,7 +176,7 @@ BOOL OptTree_ProcessMessage(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, i int sectionLevel = 0;
HTREEITEM hSection = NULL;
- lstrcpy(itemName, options[indx].pszOptionName);
+ mir_tstrcpy(itemName, options[indx].pszOptionName);
sectionName = itemName;
while (sectionName) {
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index 70c6fa820a..16fcc7ed6d 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -282,7 +282,7 @@ void PopupWnd2::update() {
SetTextColor(hdc, m_clClock);
HFONT hfnSave = (HFONT)SelectObject(m_bmpBase->getDC(), fonts.clock);
- SIZE sz; GetTextExtentPoint32(m_bmpBase->getDC(), m_time, lstrlen(m_time), &sz);
+ SIZE sz; GetTextExtentPoint32(m_bmpBase->getDC(), m_time, mir_tstrlen(m_time), &sz);
m_bmpBase->Draw_Text(m_time, this->m_sz.cx - sz.cx - STYLE_SZ_GAP - skin->getRightGap(), STYLE_SZ_GAP);
SelectObject(m_bmpBase->getDC(), hfnSave);
}
@@ -609,7 +609,7 @@ int PopupWnd2::fixActions(POPUPACTION *theActions, int count) if (enableDefaultUsr && isIm && IsActionEnabled("General/Quick reply")) {
m_actions[iAction].actionA.cbSize = sizeof(POPUPACTION);
m_actions[iAction].actionA.lchIcon = IcoLib_GetIcon(ICO_ACT_REPLY,iconSize);
- lstrcpyA(m_actions[iAction].actionA.lpzTitle, "General/Quick reply");
+ mir_strcpy(m_actions[iAction].actionA.lpzTitle, "General/Quick reply");
m_actions[iAction].actionA.wParam = 0;
m_actions[iAction].actionA.lParam = ACT_DEF_REPLY;
++iAction;
@@ -618,7 +618,7 @@ int PopupWnd2::fixActions(POPUPACTION *theActions, int count) if (enableDefaultUsr && isIm && IsActionEnabled("General/Send message")) {
m_actions[iAction].actionA.cbSize = sizeof(POPUPACTION);
m_actions[iAction].actionA.lchIcon = IcoLib_GetIcon(ICO_ACT_MESS,iconSize);
- lstrcpyA(m_actions[iAction].actionA.lpzTitle, "General/Send message");
+ mir_strcpy(m_actions[iAction].actionA.lpzTitle, "General/Send message");
m_actions[iAction].actionA.wParam = 0;
m_actions[iAction].actionA.lParam = ACT_DEF_MESSAGE;
++iAction;
@@ -627,7 +627,7 @@ int PopupWnd2::fixActions(POPUPACTION *theActions, int count) if (enableDefaultUsr && IsActionEnabled("General/User details")) {
m_actions[iAction].actionA.cbSize = sizeof(POPUPACTION);
m_actions[iAction].actionA.lchIcon = IcoLib_GetIcon(ICO_ACT_INFO,iconSize);
- lstrcpyA(m_actions[iAction].actionA.lpzTitle, "General/User details");
+ mir_strcpy(m_actions[iAction].actionA.lpzTitle, "General/User details");
m_actions[iAction].actionA.wParam = 0;
m_actions[iAction].actionA.lParam = ACT_DEF_DETAILS;
++iAction;
@@ -636,7 +636,7 @@ int PopupWnd2::fixActions(POPUPACTION *theActions, int count) if (enableDefaultUsr && IsActionEnabled("General/Contact menu")) {
m_actions[iAction].actionA.cbSize = sizeof(POPUPACTION);
m_actions[iAction].actionA.lchIcon = IcoLib_GetIcon(ICO_ACT_MENU,iconSize);
- lstrcpyA(m_actions[iAction].actionA.lpzTitle, "General/Contact menu");
+ mir_strcpy(m_actions[iAction].actionA.lpzTitle, "General/Contact menu");
m_actions[iAction].actionA.wParam = 0;
m_actions[iAction].actionA.lParam = ACT_DEF_MENU;
++iAction;
@@ -645,7 +645,7 @@ int PopupWnd2::fixActions(POPUPACTION *theActions, int count) if (enableDefaultUsr && db_get_b(m_hContact, "CList", "NotOnList", 0) && IsActionEnabled("General/Add permanently")) {
m_actions[iAction].actionA.cbSize = sizeof(POPUPACTION);
m_actions[iAction].actionA.lchIcon = IcoLib_GetIcon(ICO_ACT_ADD,iconSize);
- lstrcpyA(m_actions[iAction].actionA.lpzTitle, "General/Add permanently");
+ mir_strcpy(m_actions[iAction].actionA.lpzTitle, "General/Add permanently");
m_actions[iAction].actionA.wParam = 0;
m_actions[iAction].actionA.lParam = ACT_DEF_ADD;
++iAction;
@@ -654,7 +654,7 @@ int PopupWnd2::fixActions(POPUPACTION *theActions, int count) if (enableDefaultGen && (m_iTimeout != -1) && IsActionEnabled("General/Pin popup")) {
m_actions[iAction].actionA.cbSize = sizeof(POPUPACTION);
m_actions[iAction].actionA.lchIcon = m_bIsPinned ? IcoLib_GetIcon(ICO_ACT_PINNED,iconSize) : IcoLib_GetIcon(ICO_ACT_PIN,iconSize);
- lstrcpyA(m_actions[iAction].actionA.lpzTitle, "General/Pin popup");
+ mir_strcpy(m_actions[iAction].actionA.lpzTitle, "General/Pin popup");
m_actions[iAction].actionA.wParam = 0;
m_actions[iAction].actionA.lParam = ACT_DEF_PIN;
++iAction;
@@ -663,7 +663,7 @@ int PopupWnd2::fixActions(POPUPACTION *theActions, int count) if (enableDefaultGen && IsActionEnabled("General/Dismiss popup")) {
m_actions[iAction].actionA.cbSize = sizeof(POPUPACTION);
m_actions[iAction].actionA.lchIcon = IcoLib_GetIcon(ICO_ACT_CLOSE,iconSize);
- lstrcpyA(m_actions[iAction].actionA.lpzTitle, "General/Dismiss popup");
+ mir_strcpy(m_actions[iAction].actionA.lpzTitle, "General/Dismiss popup");
m_actions[iAction].actionA.wParam = 0;
m_actions[iAction].actionA.lParam = ACT_DEF_DISMISS;
++iAction;
@@ -672,7 +672,7 @@ int PopupWnd2::fixActions(POPUPACTION *theActions, int count) if (enableDefaultGen && IsActionEnabled("General/Copy to clipboard")) {
m_actions[iAction].actionA.cbSize = sizeof(POPUPACTION);
m_actions[iAction].actionA.lchIcon = IcoLib_GetIcon(ICO_ACT_COPY,iconSize);
- lstrcpyA(m_actions[iAction].actionA.lpzTitle, "General/Copy to clipboard");
+ mir_strcpy(m_actions[iAction].actionA.lpzTitle, "General/Copy to clipboard");
m_actions[iAction].actionA.wParam = 0;
m_actions[iAction].actionA.lParam = ACT_DEF_COPY;
++iAction;
@@ -886,9 +886,9 @@ void AddMessageToDB(MCONTACT hContact, char *msg, int flag/*bool utf*/) dbei.szModule = GetContactProto(hContact);
dbei.timestamp = time(NULL);
if ( !((flag & PREF_UTF) == PREF_UTF) && (flag & PREF_UNICODE) == PREF_UNICODE)
- dbei.cbBlob = (lstrlen((LPTSTR)msg) + 1)*sizeof(TCHAR);
+ dbei.cbBlob = (mir_tstrlen((LPTSTR)msg) + 1)*sizeof(TCHAR);
else
- dbei.cbBlob = lstrlenA(msg) + 1;
+ dbei.cbBlob = mir_strlen(msg) + 1;
dbei.pBlob = (PBYTE)msg;
db_event_add(hContact, &dbei);
}
@@ -1080,9 +1080,9 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara }
OpenClipboard(m_hwnd);
EmptyClipboard();
- clipbuffer = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, (lstrlen(text)+1) * sizeof(TCHAR));
+ clipbuffer = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, (mir_tstrlen(text)+1) * sizeof(TCHAR));
buffer = (TCHAR *)GlobalLock(clipbuffer);
- lstrcpy(buffer, text);
+ mir_tstrcpy(buffer, text);
GlobalUnlock(clipbuffer);
SetClipboardData(CF_TCHAR, clipbuffer);
CloseClipboard();
diff --git a/plugins/Popup/src/skin.cpp b/plugins/Popup/src/skin.cpp index fe16ce2fb4..c33a3f96a0 100644 --- a/plugins/Popup/src/skin.cpp +++ b/plugins/Popup/src/skin.cpp @@ -63,7 +63,7 @@ SIZE PopupSkin::measureAction(HDC hdc, POPUPACTION *act) const SIZE szText, szSpace;
LPTSTR wname = mir_a2t(name);
TCHAR *str = TranslateTS(wname);
- GetTextExtentPoint32(hdc, str, lstrlen(str), &szText);
+ GetTextExtentPoint32(hdc, str, mir_tstrlen(str), &szText);
mir_free(wname);
GetTextExtentPoint32(hdc, _T(" "), 1, &szSpace);
@@ -126,7 +126,7 @@ void PopupSkin::drawAction(MyBitmap *bmp, POPUPACTION *act, int x, int y, bool h LPTSTR wname = mir_a2t(name);
TCHAR *str = TranslateTS(wname);
- GetTextExtentPoint32(bmp->getDC(), str, lstrlen(str), &szText);
+ GetTextExtentPoint32(bmp->getDC(), str, mir_tstrlen(str), &szText);
bmp->Draw_Text(str,
(PopupOptions.actions&ACT_LARGE) ? (x + szSpace.cx + 32) : (x + szSpace.cx + 16),
max(y + 2, y + 2 + (((PopupOptions.actions&ACT_LARGE) ? 32 : 16) - szText.cy) / 2));
@@ -196,7 +196,7 @@ void PopupSkin::measure(HDC hdc, PopupWnd2 *wnd, int maxw, POPUPOPTIONS *options }
else { //normal clock
HFONT hfnSave = (HFONT)SelectObject(hdc, fonts.clock);
- SIZE sz; GetTextExtentPoint32(hdc, wnd->getTime(), lstrlen(wnd->getTime()), &sz);
+ SIZE sz; GetTextExtentPoint32(hdc, wnd->getTime(), mir_tstrlen(wnd->getTime()), &sz);
SelectObject(hdc, hfnSave);
wnd->getArgs()->add("clock.width", sz.cx + 2 * STYLE_SZ_GAP);
wnd->getArgs()->add("clock.height", sz.cy);
@@ -239,7 +239,7 @@ void PopupSkin::measure(HDC hdc, PopupWnd2 *wnd, int maxw, POPUPOPTIONS *options case PopupWnd2::TT_UNICODE:
{
RECT rc; SetRect(&rc, 0, 0, szNew.cx, 0);
- DrawTextEx(hdc, wnd->getText(), lstrlen(wnd->getText()), &rc,
+ DrawTextEx(hdc, wnd->getText(), mir_tstrlen(wnd->getText()), &rc,
DT_CALCRECT | DT_EXPANDTABS | DT_LEFT | DT_NOPREFIX | DT_TOP | DT_WORDBREAK/*|DT_RTLREADING*/, NULL);
szNew.cx = rc.right;
szNew.cy = rc.bottom;
@@ -282,7 +282,7 @@ void PopupSkin::measure(HDC hdc, PopupWnd2 *wnd, int maxw, POPUPOPTIONS *options case PopupWnd2::TT_UNICODE:
{
RECT rc; SetRect(&rc, 0, 0, szNew.cx, 0);
- DrawTextEx(hdc, wnd->getTitle(), lstrlen(wnd->getTitle()), &rc,
+ DrawTextEx(hdc, wnd->getTitle(), mir_tstrlen(wnd->getTitle()), &rc,
DT_CALCRECT | DT_EXPANDTABS | DT_LEFT | DT_NOPREFIX | DT_TOP | DT_WORDBREAK/*|DT_RTLREADING*/, NULL);
szNew.cx = rc.right;
szNew.cy = rc.bottom;
@@ -344,7 +344,7 @@ void PopupSkin::measure(HDC hdc, PopupWnd2 *wnd, int maxw, POPUPOPTIONS *options }
else {
HFONT hfnSave = (HFONT)SelectObject(hdc, fonts.clock);
- SIZE sz; GetTextExtentPoint32(hdc, wnd->getTime(), lstrlen(wnd->getTime()), &sz);
+ SIZE sz; GetTextExtentPoint32(hdc, wnd->getTime(), mir_tstrlen(wnd->getTime()), &sz);
SelectObject(hdc, hfnSave);
wnd->getArgs()->add("clock.width", sz.cx + 2 * STYLE_SZ_GAP);
wnd->getArgs()->add("clock.height", sz.cy);
@@ -438,7 +438,7 @@ void PopupSkin::display(MyBitmap *bmp, PopupWnd2 *wnd, int maxw, POPUPOPTIONS *o }
else {
HFONT hfnSave = (HFONT)SelectObject(hdc, fonts.clock);
- SIZE sz; GetTextExtentPoint32(hdc, wnd->getTime(), lstrlen(wnd->getTime()), &sz);
+ SIZE sz; GetTextExtentPoint32(hdc, wnd->getTime(), mir_tstrlen(wnd->getTime()), &sz);
SelectObject(hdc, hfnSave);
STYLE_SZ_CLOCK = sz.cx + 2 * STYLE_SZ_GAP;
}
@@ -502,7 +502,7 @@ void PopupSkin::display(MyBitmap *bmp, PopupWnd2 *wnd, int maxw, POPUPOPTIONS *o case PopupWnd2::TT_UNICODE:
{
RECT rc; SetRect(&rc, pos.x, pos.y, pos.x + sz.cx, pos.y + sz.cy);
- DrawTextEx(hdc, wnd->getText(), lstrlen(wnd->getText()), &rc,
+ DrawTextEx(hdc, wnd->getText(), mir_tstrlen(wnd->getText()), &rc,
DT_EXPANDTABS | DT_LEFT | DT_NOPREFIX | DT_TOP | DT_WORDBREAK/*|DT_RTLREADING*/, NULL);
}
break;
@@ -551,7 +551,7 @@ void PopupSkin::display(MyBitmap *bmp, PopupWnd2 *wnd, int maxw, POPUPOPTIONS *o {
HFONT hFntSave = (HFONT)SelectObject(hdc, fonts.title);
RECT rc; SetRect(&rc, pos.x, pos.y, pos.x + sz.cx, pos.y + sz.cy);
- DrawTextEx(hdc, wnd->getTitle(), lstrlen(wnd->getTitle()), &rc,
+ DrawTextEx(hdc, wnd->getTitle(), mir_tstrlen(wnd->getTitle()), &rc,
DT_EXPANDTABS | DT_LEFT | DT_NOPREFIX | DT_TOP | DT_WORDBREAK/*|DT_RTLREADING*/, NULL);
SelectObject(hdc, hFntSave);
}
@@ -691,7 +691,7 @@ void PopupSkin::display(MyBitmap *bmp, PopupWnd2 *wnd, int maxw, POPUPOPTIONS *o SetTextColor(hdc, wnd->getClockColor());
HFONT hfnSave = (HFONT)SelectObject(bmp->getDC(), fonts.clock);
- SIZE sz; GetTextExtentPoint32(bmp->getDC(), wnd->getTime(), lstrlen(wnd->getTime()), &sz);
+ SIZE sz; GetTextExtentPoint32(bmp->getDC(), wnd->getTime(), mir_tstrlen(wnd->getTime()), &sz);
bmp->Draw_Text(wnd->getTime(), x, y);
SelectObject(bmp->getDC(), hfnSave);
}
@@ -760,7 +760,7 @@ void PopupSkin::loadOptions(std::wistream &f) TCHAR *p = buf;
while (isspace(*p))
p++;
- TCHAR *q = p + lstrlen(p) - 1;
+ TCHAR *q = p + mir_tstrlen(p) - 1;
while ((q >= p) && isspace(*q))
*q-- = 0;
m_flag_names[id] = mir_t2a(p);
@@ -959,7 +959,7 @@ PopupSkin::SKINELEMENT *PopupSkin::loadObject(std::wistream &f) f >> buf;
if (((element->type & ST_TYPEMASK) == ST_MYBITMAP) || ((element->type & ST_TYPEMASK) == ST_CLOCK)) {
TCHAR *alpha = mir_tstrdup(buf);
- alpha[lstrlen(alpha) - 1] = 'a';
+ alpha[mir_tstrlen(alpha) - 1] = 'a';
element->myBmp = new MyBitmap(buf, alpha);
mir_free(alpha);
}
@@ -1094,7 +1094,7 @@ bool Skins::load(LPCTSTR dir1) m_skins = skin;
m_skins->name = mir_tstrdup(_T("* Popup Classic"));
m_skins->dir = new TCHAR[1024];
- lstrcpy(m_skins->dir, _T("res:classic.popupskin"));
+ mir_tstrcpy(m_skins->dir, _T("res:classic.popupskin"));
m_skins->skin = 0;
TCHAR dir[1024] = { '\0' };
@@ -1105,8 +1105,8 @@ bool Skins::load(LPCTSTR dir1) }
else {
GetModuleFileName(hInst, dir, 1024);
- dir[lstrlen(dir) - 18] = 0;
- lstrcat(dir, _T("\\skins\\popup"));
+ dir[mir_tstrlen(dir) - 18] = 0;
+ mir_tstrcat(dir, _T("\\skins\\popup"));
DWORD fa = GetFileAttributes(dir);
if ((fa == INVALID_FILE_ATTRIBUTES) || !(fa&FILE_ATTRIBUTE_DIRECTORY))
return false;
|