summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/ImageDataObject.cpp2
-rw-r--r--plugins/TabSRMM/src/chat/log.cpp8
-rw-r--r--plugins/TabSRMM/src/chat/message.cpp2
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp9
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp4
-rw-r--r--plugins/TabSRMM/src/container.cpp10
-rw-r--r--plugins/TabSRMM/src/controls.cpp2
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp12
-rw-r--r--plugins/TabSRMM/src/globals.h2
-rw-r--r--plugins/TabSRMM/src/modplus.cpp2
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp2
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp16
-rw-r--r--plugins/TabSRMM/src/msglog.cpp8
-rw-r--r--plugins/TabSRMM/src/msgs.cpp4
-rw-r--r--plugins/TabSRMM/src/sendlater.cpp2
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp2
-rw-r--r--plugins/TabSRMM/src/sendqueue.h2
-rw-r--r--plugins/TabSRMM/src/tabctrl.cpp8
-rw-r--r--plugins/TabSRMM/src/templates.cpp4
-rw-r--r--plugins/TabSRMM/src/themes.cpp14
-rw-r--r--plugins/TabSRMM/src/themes.h6
-rw-r--r--plugins/TabSRMM/src/utils.cpp4
22 files changed, 63 insertions, 62 deletions
diff --git a/plugins/TabSRMM/src/ImageDataObject.cpp b/plugins/TabSRMM/src/ImageDataObject.cpp
index 27359f6a51..b4ebda8f5d 100644
--- a/plugins/TabSRMM/src/ImageDataObject.cpp
+++ b/plugins/TabSRMM/src/ImageDataObject.cpp
@@ -143,7 +143,7 @@ bool CImageDataObject::InsertBitmap(IRichEditOle* pRichEditOle, HBITMAP hBitmap)
// Now Add the object to the RichEdit
//
REOBJECT reobject;
- ZeroMemory(&reobject, sizeof(REOBJECT));
+ memset(&reobject, 0, sizeof(REOBJECT));
reobject.cbStruct = sizeof(REOBJECT);
CLSID clsid;
diff --git a/plugins/TabSRMM/src/chat/log.cpp b/plugins/TabSRMM/src/chat/log.cpp
index 9bc5f5dc47..162c597360 100644
--- a/plugins/TabSRMM/src/chat/log.cpp
+++ b/plugins/TabSRMM/src/chat/log.cpp
@@ -260,7 +260,7 @@ static void LogEventIEView(LOGSTREAMDATA *streamData, TCHAR *ptszNick)
int bufferAlloced = 0;
IEVIEWEVENTDATA ied;
IEVIEWEVENT event;
- ZeroMemory(&event, sizeof(event));
+ memset(&event, 0, sizeof(event));
event.cbSize = sizeof(event);
event.dwFlags = 0;
event.hwnd = streamData->dat->hwndIEView ? streamData->dat->hwndIEView : streamData->dat->hwndHPP;
@@ -271,7 +271,7 @@ static void LogEventIEView(LOGSTREAMDATA *streamData, TCHAR *ptszNick)
event.eventData = &ied;
event.count = 1;
- ZeroMemory(&ied, sizeof(ied));
+ memset(&ied, 0, sizeof(ied));
AddEventToBufferIEView(&buffer, &bufferEnd, &bufferAlloced, streamData, ptszNick);
ied.ptszNick = ptszNick;
ied.ptszText = buffer;
@@ -980,7 +980,7 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, bool bRedr
HWND hwndRich = GetDlgItem(hwndDlg, IDC_CHAT_LOG);
LOGSTREAMDATA streamData;
- ZeroMemory(&streamData, sizeof(streamData));
+ memset(&streamData, 0, sizeof(streamData));
streamData.hwnd = hwndRich;
streamData.si = si;
streamData.lin = lin;
@@ -1043,7 +1043,7 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, bool bRedr
FINDTEXTEX fi, fi2;
CHARFORMAT2 cf2;
- ZeroMemory(&cf2, sizeof(CHARFORMAT2));
+ memset(&cf2, 0, sizeof(CHARFORMAT2));
cf2.cbSize = sizeof(cf2);
fi2.lpstrText = _T("#++~~");
diff --git a/plugins/TabSRMM/src/chat/message.cpp b/plugins/TabSRMM/src/chat/message.cpp
index 4c45d5bb11..2cbd1e4eba 100644
--- a/plugins/TabSRMM/src/chat/message.cpp
+++ b/plugins/TabSRMM/src/chat/message.cpp
@@ -336,7 +336,7 @@ char* Chat_Message_GetFromStream(HWND hwndDlg, SESSION_INFO *si)
char* pszText = NULL;
EDITSTREAM stream;
- ZeroMemory(&stream, sizeof(stream));
+ memset(&stream, 0, sizeof(stream));
stream.pfnCallback = Chat_Message_StreamCallback;
stream.dwCookie = (DWORD_PTR)&pszText; // pass pointer to pointer
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index e867a9083f..44a6cf6774 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -67,8 +67,8 @@ static void Chat_SetMessageLog(TWindowData *dat)
IEVIEWEVENT iee;
//CheckAndDestroyHPP(dat);
- ZeroMemory(&ieWindow, sizeof(ieWindow));
- ZeroMemory(&iee, sizeof(iee));
+ memset(&ieWindow, 0, sizeof(ieWindow));
+ memset(&iee, 0, sizeof(iee));
ieWindow.cbSize = sizeof(ieWindow);
ieWindow.iType = IEW_CREATE;
ieWindow.dwFlags = 0;
@@ -80,7 +80,8 @@ static void Chat_SetMessageLog(TWindowData *dat)
ieWindow.cy = 300;
CallService(MS_IEVIEW_WINDOW, 0, (LPARAM)&ieWindow);
dat->hwndIEView = ieWindow.hwnd;
- ZeroMemory(&iee, sizeof(iee));
+
+ memset(&iee, 0, sizeof(iee));
iee.cbSize = sizeof(iee);
iee.iType = IEE_CLEAR_LOG;
iee.hwnd = dat->hwndIEView;
@@ -98,7 +99,7 @@ static void Chat_SetMessageLog(TWindowData *dat)
else if (iLogMode == WANT_HPP_LOG && dat->hwndHPP == 0) {
IEVIEWWINDOW ieWindow;
- ZeroMemory(&ieWindow, sizeof(ieWindow));
+ memset(&ieWindow, 0, sizeof(ieWindow));
//CheckAndDestroyIEView(dat);
ieWindow.cbSize = sizeof(IEVIEWWINDOW);
ieWindow.iType = IEW_CREATE;
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp
index df70c33104..76ec3fe349 100644
--- a/plugins/TabSRMM/src/contactcache.cpp
+++ b/plugins/TabSRMM/src/contactcache.cpp
@@ -236,7 +236,7 @@ void CContactCache::allocStats()
{
if (m_stats == 0) {
m_stats = new TSessionStats;
- ::ZeroMemory(m_stats, sizeof(TSessionStats));
+ memset(m_stats, 0, sizeof(TSessionStats));
}
}
@@ -397,7 +397,7 @@ void CContactCache::allocHistory()
m_iHistoryCurrent = 0;
m_iHistoryTop = 0;
if (m_history)
- ZeroMemory(m_history, sizeof(TInputHistory) * m_iHistorySize);
+ memset(m_history, 0, (sizeof(TInputHistory) * m_iHistorySize));
m_history[m_iHistorySize].szText = (TCHAR*)mir_alloc((HISTORY_INITIAL_ALLOCSIZE + 1) * sizeof(TCHAR));
m_history[m_iHistorySize].lLen = HISTORY_INITIAL_ALLOCSIZE;
}
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index 07af0eb40b..8136cc9e72 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -358,7 +358,7 @@ static LRESULT CALLBACK ContainerWndProc(HWND hwndDlg, UINT msg, WPARAM wParam,
GetWindowRect(hwndDlg, &rcWindow);
CopyMemory(&pContainer->oldbuttons[0], &pContainer->buttons[0], sizeof(TitleBtn) * 3);
- ZeroMemory(&pContainer->buttons[0], sizeof(TitleBtn) * 3);
+ memset(&pContainer->buttons[0], 0, (sizeof(TitleBtn) * 3));
isMin = isMax = isClose = FALSE;
if (pt.x >= (rcWindow.left + pContainer->rcMin.left) && pt.x <= (rcWindow.left + pContainer->rcClose.right) && pt.y < rcWindow.top + 24 && wParam != HTTOPRIGHT) {
@@ -857,7 +857,7 @@ panel_found:
switch (((LPNMHDR)lParam)->code) {
case TCN_SELCHANGE:
- ZeroMemory(&item, sizeof(item));
+ memset(&item, 0, sizeof(item));
iItem = TabCtrl_GetCurSel(hwndTab);
item.mask = TCIF_PARAM;
if (TabCtrl_GetItem(hwndTab, iItem, &item)) {
@@ -947,7 +947,7 @@ panel_found:
case ID_TABMENU_ATTACHTOCONTAINER:
if ((iItem = GetTabItemFromMouse(hwndTab, &pt1)) == -1)
break;
- ZeroMemory(&item, sizeof(item));
+ memset(&item, 0, sizeof(item));
item.mask = TCIF_PARAM;
TabCtrl_GetItem(hwndTab, iItem, &item);
CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_SELECTCONTAINER), hwndDlg, SelectContainerDlgProc, (LPARAM)item.lParam);
@@ -1261,7 +1261,7 @@ panel_found:
if (iNewTab != iCurrent) {
TabControlData *tabdat = (TabControlData *)GetWindowLongPtr(hwndTab, GWLP_USERDATA);
- ZeroMemory(&item, sizeof(item));
+ memset(&item, 0, sizeof(item));
item.mask = TCIF_PARAM;
if (TabCtrl_GetItem(hwndTab, iNewTab, &item)) {
TabCtrl_SetCurSel(hwndTab, iNewTab);
@@ -1348,7 +1348,7 @@ panel_found:
SendMessage(hwndDlg, DM_UPDATETITLE, hContact, 0);
}
}
- ZeroMemory(&item, sizeof(item));
+ memset(&item, 0, sizeof(item));
item.mask = TCIF_PARAM;
if ((curItem = TabCtrl_GetCurSel(hwndTab)) >= 0)
TabCtrl_GetItem(hwndTab, curItem, &item);
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp
index b09bfdc44b..cfb4b0f37c 100644
--- a/plugins/TabSRMM/src/controls.cpp
+++ b/plugins/TabSRMM/src/controls.cpp
@@ -530,7 +530,7 @@ void CMenuBar::autoShow(const int showcmd)
void CMenuBar::checkButtons()
{
if (!m_buttonsInit) {
- ::ZeroMemory(m_TbButtons, sizeof(m_TbButtons));
+ memset(m_TbButtons, 0, sizeof(m_TbButtons));
m_TbButtons[0].iBitmap = 0;
m_TbButtons[0].iString = 0;
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index 3f95a9d939..6e3ca777d5 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -127,7 +127,7 @@ void TSAPI DM_InitTip(TWindowData *dat)
dat->hwndTip = CreateWindowEx(0, TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_BALLOON, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, dat->hwnd, NULL, g_hInst, (LPVOID) NULL);
- ZeroMemory(&dat->ti, sizeof(dat->ti));
+ memset(&dat->ti, 0, sizeof(dat->ti));
dat->ti.cbSize = sizeof(dat->ti);
dat->ti.lpszText = TranslateT("No status message");
dat->ti.hinst = g_hInst;
@@ -205,8 +205,8 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer,
case IDC_FONTSTRIKEOUT:
if (dat->SendFormat != 0) { // dont use formatting if disabled
CHARFORMAT2 cf, cfOld;
- ZeroMemory(&cf, sizeof(CHARFORMAT2));
- ZeroMemory(&cfOld, sizeof(CHARFORMAT2));
+ memset(&cf, 0, sizeof(CHARFORMAT2));
+ memset(&cfOld, 0, sizeof(CHARFORMAT2));
cfOld.cbSize = cf.cbSize = sizeof(CHARFORMAT2);
cfOld.dwMask = CFM_BOLD | CFM_ITALIC | CFM_UNDERLINE | CFM_STRIKEOUT;
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cfOld);
@@ -249,7 +249,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer,
submenu = GetSubMenu(m_pContainer->hMenuContext, 7);
{
CHARFORMAT2 cf;
- ZeroMemory(&cf, sizeof(CHARFORMAT2));
+ memset(&cf, 0, sizeof(CHARFORMAT2));
cf.cbSize = sizeof(CHARFORMAT2);
cf.dwMask = CFM_COLOR;
@@ -802,7 +802,7 @@ void TSAPI DM_InitRichEdit(TWindowData *dat)
SendMessage(hwndEdit, EM_SETBKGNDCOLOR, 0, dat->inputbg);
CHARFORMAT2A cf2;
- ZeroMemory(&cf2, sizeof(CHARFORMAT2A));
+ memset(&cf2, 0, sizeof(CHARFORMAT2A));
cf2.cbSize = sizeof(cf2);
if (fIsChat) {
@@ -845,7 +845,7 @@ void TSAPI DM_InitRichEdit(TWindowData *dat)
// The real text direction is then enforced by the streaming code which adds appropiate paragraph
// and textflow formatting commands to the
PARAFORMAT2 pf2;
- ZeroMemory(&pf2, sizeof(PARAFORMAT2));
+ memset(&pf2, 0, sizeof(PARAFORMAT2));
pf2.cbSize = sizeof(pf2);
pf2.wEffects = PFE_RTLPARA;
pf2.dwMask = PFM_RTLPARA;
diff --git a/plugins/TabSRMM/src/globals.h b/plugins/TabSRMM/src/globals.h
index 4e88571588..b67015e198 100644
--- a/plugins/TabSRMM/src/globals.h
+++ b/plugins/TabSRMM/src/globals.h
@@ -47,7 +47,7 @@ class CGlobals
public:
CGlobals()
{
- ::ZeroMemory(this, sizeof(CGlobals));
+ memset(this, 0, sizeof(CGlobals));
m_TypingSoundAdded = false;
}
diff --git a/plugins/TabSRMM/src/modplus.cpp b/plugins/TabSRMM/src/modplus.cpp
index 1e91712136..03cd19f9f4 100644
--- a/plugins/TabSRMM/src/modplus.cpp
+++ b/plugins/TabSRMM/src/modplus.cpp
@@ -86,7 +86,7 @@ static int CustomButtonPressed(WPARAM wParam, LPARAM lParam)
UINT textlenght = cr.cpMax - cr.cpMin;
if (textlenght) {
pszText = (TCHAR*)mir_alloc((textlenght + 1)*sizeof(TCHAR));
- ZeroMemory(pszText, (textlenght + 1)*sizeof(TCHAR));
+ memset(pszText, 0, ((textlenght + 1) * sizeof(TCHAR)));
SendDlgItemMessage(cbcd->hwndFrom, IDC_MESSAGE, EM_GETSELTEXT, 0, (LPARAM)pszText);
}
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 1735b763a8..2259922508 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -2764,7 +2764,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
SendMessage(hwndEdit, WM_SETREDRAW, FALSE, 0);
PARAFORMAT2 pf2;
- ZeroMemory(&pf2, sizeof(PARAFORMAT2));
+ memset(&pf2, 0, sizeof(PARAFORMAT2));
pf2.cbSize = sizeof(pf2);
pf2.dwMask = PFM_RTLPARA;
SendMessage(hwndEdit, EM_SETSEL, 0, -1);
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index 07bc06b0b0..7adc174039 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -842,7 +842,7 @@ char* TSAPI Message_GetFromStream(HWND hwndRtf, const TWindowData *dat, DWORD dw
if (hwndRtf == 0 || dat == 0)
return NULL;
- ZeroMemory(&stream, sizeof(stream));
+ memset(&stream, 0, sizeof(stream));
stream.pfnCallback = Message_StreamCallback;
stream.dwCookie = (DWORD_PTR)& pszText; // pass pointer to pointer
if (dwPassedFlags == 0)
@@ -1148,7 +1148,7 @@ void TSAPI SetMessageLog(TWindowData *dat)
if (iLogMode == WANT_IEVIEW_LOG && dat->hwndIEView == 0) {
IEVIEWWINDOW ieWindow;
- ZeroMemory(&ieWindow, sizeof(ieWindow));
+ memset(&ieWindow, 0, sizeof(ieWindow));
ieWindow.cbSize = sizeof(IEVIEWWINDOW);
ieWindow.iType = IEW_CREATE;
ieWindow.dwFlags = 0;
@@ -1334,7 +1334,7 @@ void TSAPI GetLocaleID(TWindowData *dat, const TCHAR *szKLName)
szLI[0] = szLI[1] = 0;
- ZeroMemory(&pf2, sizeof(PARAFORMAT2));
+ memset(&pf2, 0, sizeof(PARAFORMAT2));
langID = (USHORT)_tcstol(szKLName, &stopped, 16);
dat->lcid = MAKELCID(langID, 0);
/*
@@ -1372,14 +1372,14 @@ void TSAPI GetLocaleID(TWindowData *dat, const TCHAR *szKLName)
SendDlgItemMessage(dat->hwnd, IDC_MESSAGE, EM_GETPARAFORMAT, 0, (LPARAM)&pf2);
if (Utils::FindRTLLocale(dat) && fLocaleNotSet) {
if (wCtype2[0] == C2_RIGHTTOLEFT || wCtype2[1] == C2_RIGHTTOLEFT || wCtype2[2] == C2_RIGHTTOLEFT) {
- ZeroMemory(&pf2, sizeof(pf2));
+ memset(&pf2, 0, sizeof(pf2));
pf2.dwMask = PFM_RTLPARA;
pf2.cbSize = sizeof(pf2);
pf2.wEffects = PFE_RTLPARA;
SendDlgItemMessage(dat->hwnd, IDC_MESSAGE, EM_SETPARAFORMAT, 0, (LPARAM)&pf2);
}
else {
- ZeroMemory(&pf2, sizeof(pf2));
+ memset(&pf2, 0, sizeof(pf2));
pf2.dwMask = PFM_RTLPARA;
pf2.cbSize = sizeof(pf2);
pf2.wEffects = 0;
@@ -1675,7 +1675,7 @@ int TSAPI MsgWindowDrawHandler(WPARAM wParam, LPARAM lParam, TWindowData *dat)
void TSAPI LoadThemeDefaults(TContainerData *pContainer)
{
- ZeroMemory(&pContainer->theme, sizeof(TLogTheme));
+ memset(&pContainer->theme, 0, sizeof(TLogTheme));
pContainer->theme.bg = M.GetDword(FONTMODULE, SRMSGSET_BKGCOLOUR, GetSysColor(COLOR_WINDOW));
pContainer->theme.statbg = PluginConfig.crStatus;
pContainer->theme.oldinbg = PluginConfig.crOldIncoming;
@@ -1708,7 +1708,7 @@ void TSAPI LoadOverrideTheme(TContainerData *pContainer)
{
BOOL bReadTemplates = TRUE;
- ZeroMemory(&pContainer->theme, sizeof(TLogTheme));
+ memset(&pContainer->theme, 0, sizeof(TLogTheme));
if (mir_tstrlen(pContainer->szAbsThemeFile) > 1) {
if (PathFileExists(pContainer->szAbsThemeFile)) {
if (CheckThemeVersion(pContainer->szAbsThemeFile) == 0) {
@@ -1820,7 +1820,7 @@ void TSAPI GetMyNick(TWindowData *dat)
{
CONTACTINFO ci;
- ZeroMemory(&ci, sizeof(ci));
+ memset(&ci, 0, sizeof(ci));
ci.cbSize = sizeof(ci);
ci.hContact = NULL;
ci.szProto = const_cast<char *>(dat->cache->getActiveProto());
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index d7999714e6..752bee529d 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -130,7 +130,7 @@ void TSAPI CacheLogFonts()
logPixelSY = GetDeviceCaps(hdc, LOGPIXELSY);
ReleaseDC(NULL, hdc);
- ZeroMemory(logfonts, sizeof(LOGFONTA) * (MSGDLGFONTCOUNT + 2));
+ memset(logfonts, 0, (sizeof(LOGFONTA) * (MSGDLGFONTCOUNT + 2)));
for (int i = 0; i < MSGDLGFONTCOUNT; i++) {
LoadLogfont(i, &logfonts[i], &fontcolors[i], FONTMODULE);
mir_snprintf(rtfFontsGlobal[i], SIZEOF(rtfFontsGlobal[i]), "\\f%u\\cf%u\\b%d\\i%d\\ul%d\\fs%u", i, i, logfonts[i].lfWeight >= FW_BOLD ? 1 : 0, logfonts[i].lfItalic, logfonts[i].lfUnderline, 2 * abs(logfonts[i].lfHeight) * 74 / logPixelSY);
@@ -1222,7 +1222,7 @@ static void ReplaceIcons(HWND hwndDlg, TWindowData *dat, LONG startAt, int fAppe
fi.lpstrText = _T("##col##");
fi.chrg.cpMax = -1;
CHARFORMAT2 cf2;
- ZeroMemory(&cf2, sizeof(cf2));
+ memset(&cf2, 0, sizeof(cf2));
cf2.cbSize = sizeof(cf2);
cf2.dwMask = CFM_COLOR;
while (SendMessage(hwndrtf, EM_FINDTEXTEX, FR_DOWN, (LPARAM)&fi) > -1) {
@@ -1257,7 +1257,7 @@ static void ReplaceIcons(HWND hwndDlg, TWindowData *dat, LONG startAt, int fAppe
fi.chrg.cpMax = -1;
CHARFORMAT2 cf2;
- ZeroMemory(&cf2, sizeof(cf2));
+ memset(&cf2, 0, sizeof(cf2));
cf2.cbSize = sizeof(cf2);
cf2.dwMask = CFM_BACKCOLOR;
@@ -1467,7 +1467,7 @@ void TSAPI StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAp
gtxl.flags = GTL_DEFAULT | GTL_PRECISE | GTL_NUMCHARS;
PARAFORMAT2 pf2;
- ZeroMemory(&pf2, sizeof(PARAFORMAT2));
+ memset(&pf2, 0, sizeof(PARAFORMAT2));
sel.cpMax = SendDlgItemMessage(hwndDlg, IDC_LOG, EM_GETTEXTLENGTHEX, (WPARAM)&gtxl, 0);
sel.cpMin = sel.cpMax - 1;
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_EXSETSEL, 0, (LPARAM)&sel);
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index 93caf5f1bf..afe1c7d294 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -442,7 +442,7 @@ int LoadSendRecvMessageModule(void)
Win7Taskbar = new CTaskbarInteract;
Win7Taskbar->updateMetrics();
- ZeroMemory(&nen_options, sizeof(nen_options));
+ memset(&nen_options, 0, sizeof(nen_options));
M.m_hMessageWindowList = WindowList_Create();
PluginConfig.hUserPrefsWindowList = WindowList_Create();
sendQueue = new SendQueue;
@@ -555,7 +555,7 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact,
newData.szInitialText = pszInitialText;
char *szProto = GetContactProto(newData.hContact);
- ZeroMemory(&newData.item, sizeof(newData.item));
+ memset(&newData.item, 0, sizeof(newData.item));
// obtain various status information about the contact
TCHAR *contactName = pcli->pfnGetContactDisplayName(newData.hContact, 0);
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp
index abe3a03f2b..79c0edac47 100644
--- a/plugins/TabSRMM/src/sendlater.cpp
+++ b/plugins/TabSRMM/src/sendlater.cpp
@@ -37,7 +37,7 @@ CSendLater *sendLater = 0;
//
CSendLaterJob::CSendLaterJob()
{
- ZeroMemory(this, sizeof(CSendLaterJob));
+ memset(this, 0, sizeof(CSendLaterJob));
fSuccess = false;
}
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index a8b9b3f271..2ffc05e036 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -645,7 +645,7 @@ int SendQueue::RTL_Detect(const WCHAR *pszwText)
WORD *infoTypeC2 = (WORD *)mir_alloc(sizeof(WORD) * (iLen + 2));
if (infoTypeC2) {
- ZeroMemory(infoTypeC2, sizeof(WORD) * (iLen + 2));
+ memset(infoTypeC2, 0, (sizeof(WORD) * (iLen + 2)));
GetStringTypeW(CT_CTYPE2, pszwText, iLen, infoTypeC2);
diff --git a/plugins/TabSRMM/src/sendqueue.h b/plugins/TabSRMM/src/sendqueue.h
index 49341f718d..d3d51a0e7d 100644
--- a/plugins/TabSRMM/src/sendqueue.h
+++ b/plugins/TabSRMM/src/sendqueue.h
@@ -66,7 +66,7 @@ public:
SendQueue()
{
- ZeroMemory(m_jobs, (sizeof(SendJob) * NR_SENDJOBS));
+ memset(m_jobs, 0, (sizeof(SendJob) * NR_SENDJOBS));
m_currentIndex = 0;
}
diff --git a/plugins/TabSRMM/src/tabctrl.cpp b/plugins/TabSRMM/src/tabctrl.cpp
index 4690906a14..0035611a87 100644
--- a/plugins/TabSRMM/src/tabctrl.cpp
+++ b/plugins/TabSRMM/src/tabctrl.cpp
@@ -489,7 +489,7 @@ static void DrawThemesXpTabItem(HDC pDC, int ixItem, RECT *rcItem, UINT uiFlag,
rcMem.right = szBmp.cx;
rcMem.bottom = szBmp.cy;
- ZeroMemory(&biOut, sizeof(BITMAPINFO)); // Fill local pixel arrays
+ memset(&biOut, 0, sizeof(BITMAPINFO)); // Fill local pixel arrays
bihOut = &biOut.bmiHeader;
bihOut->biSize = sizeof(BITMAPINFOHEADER);
@@ -711,7 +711,7 @@ static void PaintWorker(HWND hwnd, TabControlData *tabdat)
rctClip = rctPage;
InflateRect(&rctClip, -tabdat->pContainer->tBorder, -tabdat->pContainer->tBorder);
}
- else ZeroMemory(&rctClip, sizeof(RECT));
+ else memset(&rctClip, 0, sizeof(RECT));
HPEN hPenOld = (HPEN)SelectObject(hdc, PluginConfig.tabConfig.m_hPenLight);
/*
@@ -722,7 +722,7 @@ static void PaintWorker(HWND hwnd, TabControlData *tabdat)
if (!tabdat->bRefreshWithoutClip)
ExcludeClipRect(hdc, rctClip.left, rctClip.top, rctClip.right, rctClip.bottom);
else
- ZeroMemory(&rctClip, sizeof(RECT));
+ memset(&rctClip, 0, sizeof(RECT));
if ((!bClassicDraw || PluginConfig.m_fillColor) && IntersectRect(&rectTemp, &rctPage, &ps.rcPaint) && !CSkin::m_skinEnabled) {
RECT rcClient = rctPage;
if (dwStyle & TCS_BOTTOM) {
@@ -1389,7 +1389,7 @@ void TSAPI FreeTabConfig()
if (PluginConfig.tabConfig.m_brushes[i])
DeleteObject(PluginConfig.tabConfig.m_brushes[i]);
- ZeroMemory(&PluginConfig.tabConfig, sizeof(myTabCtrl));
+ memset(&PluginConfig.tabConfig, 0, sizeof(PluginConfig.tabConfig));
}
/*
diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp
index 62cd362119..b42fbc2f24 100644
--- a/plugins/TabSRMM/src/templates.cpp
+++ b/plugins/TabSRMM/src/templates.cpp
@@ -140,9 +140,9 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP
COLORREF url_unvisited = RGB(0, 0, 255);
dat = (TWindowData*)mir_calloc( sizeof(TWindowData));
dat->pContainer = (TContainerData*)mir_alloc(sizeof(TContainerData));
- ZeroMemory(dat->pContainer, sizeof(TContainerData));
+ memset(dat->pContainer, 0, sizeof(TContainerData));
teInfo = (TemplateEditorInfo *)dat->pContainer;
- ZeroMemory(teInfo, sizeof(TemplateEditorInfo));
+ memset(teInfo, 0, sizeof(TemplateEditorInfo));
teInfo->hContact = teNew->hContact;
teInfo->rtl = teNew->rtl;
teInfo->hwndParent = teNew->hwndParent;
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp
index 829897679a..6dac4c24c7 100644
--- a/plugins/TabSRMM/src/themes.cpp
+++ b/plugins/TabSRMM/src/themes.cpp
@@ -373,7 +373,7 @@ void TSAPI DrawAlpha(HDC hDC, PRECT rc, DWORD clr_base, int alpha, DWORD clr_de
return;
BITMAPINFO bmi;
- ZeroMemory(&bmi, sizeof(BITMAPINFO));
+ memset(&bmi, 0, sizeof(BITMAPINFO));
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
int ulBitmapWidth, ulBitmapHeight;
@@ -897,7 +897,7 @@ void CImageItem::Free()
if (m_fillBrush)
::DeleteObject(m_fillBrush);
- ZeroMemory(this, sizeof(CImageItem));
+ memset(this, 0, sizeof(CImageItem));
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -1153,7 +1153,7 @@ void CSkin::Unload()
m_SkinItems[ID_EXTBKINFOPANELBG] = _defInfoPanel;
}
- ZeroMemory(this, sizeof(CSkin));
+ memset(this, 0, sizeof(CSkin));
m_SkinItems = ::SkinItems;
setFileName();
@@ -1404,7 +1404,7 @@ void CSkin::Load(void)
m_DisableScrollbars = M.GetByte("disableVScroll", 0) ? true : false;
- ZeroMemory(szSections, 6000);
+ memset(szSections, 0, 6000);
GetPrivateProfileSectionNames(szSections, 3000, m_tszFileName);
szSections[3001] = szSections[3000] = 0;
TCHAR *p = szSections;
@@ -1537,7 +1537,7 @@ void CSkin::LoadItems()
m_nrSkinIcons = 0;
szSections = (TCHAR*)mir_alloc((SECT_BUFFER_SIZE + 2) * sizeof(TCHAR));
- ZeroMemory(szSections, (SECT_BUFFER_SIZE + 2) * sizeof(TCHAR));
+ memset(szSections, 0, ((SECT_BUFFER_SIZE + 2) * sizeof(TCHAR)));
GetPrivateProfileSection(_T("Icons"), szSections, SECT_BUFFER_SIZE, m_tszFileName);
szSections[SECT_BUFFER_SIZE] = 0;
@@ -1550,7 +1550,7 @@ void CSkin::LoadItems()
if (m_nrSkinIcons < NR_MAXSKINICONS && p1) {
LoadIcon(_T("Icons"), p, *(HICON*)&tmpIconDesc.uId);
if (tmpIconDesc.uId) {
- ZeroMemory(&m_skinIcons[m_nrSkinIcons], sizeof(TIconDesc));
+ memset(&m_skinIcons[m_nrSkinIcons], 0, sizeof(TIconDesc));
m_skinIcons[m_nrSkinIcons].uId = tmpIconDesc.uId;
m_skinIcons[m_nrSkinIcons].phIcon = (HICON *)(&m_skinIcons[m_nrSkinIcons].uId);
m_skinIcons[m_nrSkinIcons].szName = (TCHAR*)mir_alloc(sizeof(TCHAR) * (mir_tstrlen(p) + 1));
@@ -1563,7 +1563,7 @@ void CSkin::LoadItems()
p += (mir_tstrlen(p) + 1);
}
- ZeroMemory(szSections, (SECT_BUFFER_SIZE + 2) * sizeof(TCHAR));
+ memset(szSections, 0, ((SECT_BUFFER_SIZE + 2) * sizeof(TCHAR)));
GetPrivateProfileSectionNames(szSections, SECT_BUFFER_SIZE, m_tszFileName);
szSections[SECT_BUFFER_SIZE] = 0;
diff --git a/plugins/TabSRMM/src/themes.h b/plugins/TabSRMM/src/themes.h
index 47ea5dcfcc..573afcf87f 100644
--- a/plugins/TabSRMM/src/themes.h
+++ b/plugins/TabSRMM/src/themes.h
@@ -88,7 +88,7 @@ class CImageItem
public:
CImageItem()
{
- ZeroMemory(this, sizeof(CImageItem));
+ memset(this, 0, sizeof(CImageItem));
}
CImageItem(const CImageItem& From)
{
@@ -97,7 +97,7 @@ public:
}
CImageItem(const TCHAR *szName)
{
- ZeroMemory(this, sizeof(CImageItem));
+ memset(this, 0, sizeof(CImageItem));
mir_sntprintf(m_szName, 40, szName);
m_szName[39] = 0;
}
@@ -239,7 +239,7 @@ public:
CSkin()
{
- ZeroMemory(this, sizeof(CSkin));
+ memset(this, 0, sizeof(CSkin));
m_default_bf.SourceConstantAlpha = 255;
m_default_bf.AlphaFormat = AC_SRC_ALPHA;
m_default_bf.BlendOp = AC_SRC_OVER;
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp
index d4f2bf31ce..18f441a628 100644
--- a/plugins/TabSRMM/src/utils.cpp
+++ b/plugins/TabSRMM/src/utils.cpp
@@ -509,7 +509,7 @@ int Utils::FindRTLLocale(TWindowData *dat)
WORD wCtype2[5];
if (dat->iHaveRTLLang == 0) {
- ZeroMemory(layouts, 20 * sizeof(HKL));
+ memset(layouts, 0, sizeof(layouts));
GetKeyboardLayoutList(20, layouts);
for (i=0; i < 20 && layouts[i]; i++) {
lcid = MAKELCID(LOWORD(layouts[i]), 0);
@@ -532,7 +532,7 @@ void Utils::RTF_CTableInit()
int iSize = sizeof(TRTFColorTable) * RTF_CTABLE_DEFSIZE;
rtf_ctable = (TRTFColorTable *)mir_alloc(iSize);
- ZeroMemory(rtf_ctable, iSize);
+ memset(rtf_ctable, 0, iSize);
CopyMemory(rtf_ctable, _rtf_ctable, iSize);
rtf_ctable_size = RTF_CTABLE_DEFSIZE;
}