summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-07-17 10:53:36 +0000
committermataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-07-17 10:53:36 +0000
commita818ed0593c74735eb2e888bb09c169cf82c894f (patch)
tree9120a06b22e6fe73d379833a75a5f1a8716aa68e
parentd96825ee41c0e597d3b1839e30f9cf31c04d00cd (diff)
Sessions:
using mir_* functions git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@153 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
-rw-r--r--Sessions/Src/Main.cpp56
-rw-r--r--Sessions/Src/Options.cpp2
-rw-r--r--Sessions/Src/Utils.cpp74
3 files changed, 66 insertions, 66 deletions
diff --git a/Sessions/Src/Main.cpp b/Sessions/Src/Main.cpp
index 73c80f0..0a4a173 100644
--- a/Sessions/Src/Main.cpp
+++ b/Sessions/Src/Main.cpp
@@ -230,7 +230,7 @@ INT_PTR CALLBACK SaveSessionDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lpar
SavePosition(hdlg, "SaveDlg");
if (lenght>0)
{
- GetWindowText(GetDlgItem(hdlg, IDC_LIST),szUserSessionName,sizeof(szUserSessionName));
+ GetWindowText(GetDlgItem(hdlg, IDC_LIST), szUserSessionName, SIZEOF(szUserSessionName));
szUserSessionName[lenght+1]='\0';
if(IsDlgButtonChecked(hdlg,IDC_SELCONTACTS)&&bSC)
{
@@ -452,7 +452,7 @@ INT_PTR CloseCurrentSession(WPARAM wparam,LPARAM lparam)
while(session_list[0]!=0)
{
- mwid.cbSize=sizeof(MessageWindowInputData);
+ mwid.cbSize = sizeof(MessageWindowInputData);
mwid.hContact=(HANDLE)session_list[i];
mwid.uFlags=MSG_WINDOW_UFLAG_MSG_BOTH;
@@ -552,29 +552,29 @@ int SaveSessionDate()
if(session_list[0]!=0)
{
TimeSize=GetTimeFormat(LOCALE_USER_DEFAULT,0/*TIME_NOSECONDS*/,NULL,NULL,NULL,0);
- szTimeBuf = (TCHAR*)malloc((TimeSize+1)*sizeof(TCHAR));
+ szTimeBuf = (TCHAR*)mir_alloc((TimeSize+1)*sizeof(TCHAR));
GetTimeFormat(LOCALE_USER_DEFAULT, 0/*TIME_NOSECONDS*/,NULL,NULL,szTimeBuf,TimeSize);
DateSize=GetDateFormat(LOCALE_USER_DEFAULT,DATE_SHORTDATE,NULL,NULL,NULL,0);
- szDateBuf = (TCHAR*)malloc((DateSize+1)*sizeof(TCHAR));
+ szDateBuf = (TCHAR*)mir_alloc((DateSize+1)*sizeof(TCHAR));
GetDateFormat(LOCALE_USER_DEFAULT,DATE_SHORTDATE,NULL,NULL,szDateBuf,DateSize );
- szSessionTime = (TCHAR*)malloc((DateSize+TimeSize+4)*sizeof(TCHAR));
+ szSessionTime = (TCHAR*)mir_alloc((DateSize+TimeSize+4)*sizeof(TCHAR));
lenn=_tcslen(szSessionTime);
- _sntprintf(szSessionTime,((DateSize+TimeSize+4)*sizeof(TCHAR)),_T("%s - %s")/*TCHAR_STR_PARAM _T(" - ") TCHAR_STR_PARAM*/,szTimeBuf,szDateBuf);
+ mir_sntprintf(szSessionTime, ((DateSize+TimeSize+4)*sizeof(TCHAR)), _T("%s - %s")/*TCHAR_STR_PARAM _T(" - ") TCHAR_STR_PARAM*/, szTimeBuf,szDateBuf);
- mir_snprintf(szSessionDate,SIZEOF(szSessionDate),"%s_%u","SessionDate",0);
+ mir_snprintf(szSessionDate, SIZEOF(szSessionDate), "%s_%u", "SessionDate", 0);
DBGetContactSettingTString(NULL, __INTERNAL_NAME, szSessionDate, &dbv);
- szSessionDateBuf_1=_tcsdup(dbv.ptszVal);
+ szSessionDateBuf_1 = mir_tstrdup(dbv.ptszVal);
DBFreeVariant(&dbv);
DBWriteContactSettingTString(NULL, __INTERNAL_NAME, szSessionDate, szSessionTime);
- free(szSessionTime);
+ mir_free(szSessionTime);
ResaveSettings("SessionDate",1,ses_limit,szSessionDateBuf_1);
- if(szTimeBuf) free(szTimeBuf);
- if(szDateBuf) free(szDateBuf);
+ if(szTimeBuf) mir_free(szTimeBuf);
+ if(szDateBuf) mir_free(szDateBuf);
}
if(g_bCrashRecovery) DBWriteContactSettingByte(NULL, __INTERNAL_NAME, "lastSaveCompleted", 1);
return 0;
@@ -591,11 +591,11 @@ int SaveUserSessionName(TCHAR *szUSessionName)
if(session_list[0]!=0)
{
- szUserSessionName= _tcsdup(szUSessionName);
- mir_snprintf(szUserSessionNameBuf,SIZEOF(szUserSessionNameBuf),"%s_%u","UserSessionDsc",0);
+ szUserSessionName = mir_tstrdup(szUSessionName);
+ mir_snprintf(szUserSessionNameBuf, SIZEOF(szUserSessionNameBuf), "%s_%u", "UserSessionDsc", 0);
if(!DBGetContactSettingTString(NULL, __INTERNAL_NAME, szUserSessionNameBuf, &dbv))
{
- szUserSessionNameBuf_1=_tcsdup(dbv.ptszVal);
+ szUserSessionNameBuf_1 = mir_tstrdup(dbv.ptszVal);
DBFreeVariant(&dbv);
ResaveSettings("UserSessionDsc",1,255,szUserSessionNameBuf_1);
}
@@ -603,7 +603,7 @@ int SaveUserSessionName(TCHAR *szUSessionName)
DBWriteContactSettingTString(NULL, __INTERNAL_NAME, szUserSessionNameBuf, szUserSessionName);
//free(szUserSessionNameBuf_1);
- free(szUserSessionName);
+ mir_free(szUserSessionName);
return 0;
}
@@ -713,28 +713,28 @@ int DelUserDefSession(int ses_count)
SetInSessionOrder(hContact,1,ses_count,0);
}
- mir_snprintf(szSessionName,SIZEOF(szSessionName),"%s_%u","UserSessionDsc",ses_count);
+ mir_snprintf(szSessionName, SIZEOF(szSessionName), "%s_%u", "UserSessionDsc", ses_count);
DBDeleteContactSetting(NULL, __INTERNAL_NAME, szSessionName);
- mir_snprintf(szSessionName,SIZEOF(szSessionName),"%s_%u","FavUserSession",ses_count);
+ mir_snprintf(szSessionName, SIZEOF(szSessionName), "%s_%u", "FavUserSession", ses_count);
DBDeleteContactSetting(NULL, __INTERNAL_NAME, szSessionName);
for (i=(ses_count+1);;i++)
{
- mir_snprintf(szSessionName,SIZEOF(szSessionName),"%s_%u","UserSessionDsc",i);
+ mir_snprintf(szSessionName, SIZEOF(szSessionName), "%s_%u", "UserSessionDsc", i);
if ((szSessionNameBuf=DBGetStringT(NULL, __INTERNAL_NAME, szSessionName))/*&&(szSessionHandlesBuf=DBGetStringT(NULL,PLGNAME,szSessionHandles))*/)
{
MarkUserDefSession(i-1,IsMarkedUserDefSession(i));
- mir_snprintf(szSessionName,SIZEOF(szSessionName),"%s_%u","UserSessionDsc",i-1);
+ mir_snprintf(szSessionName, SIZEOF(szSessionName), "%s_%u", "UserSessionDsc", i-1);
DBWriteContactSettingTString(NULL, __INTERNAL_NAME, szSessionName, szSessionNameBuf);
}
else
{
- mir_snprintf(szSessionName,SIZEOF(szSessionName),"%s_%u","UserSessionDsc",i-1);
+ mir_snprintf(szSessionName, SIZEOF(szSessionName), "%s_%u", "UserSessionDsc", i-1);
DBDeleteContactSetting(NULL, __INTERNAL_NAME, szSessionName);
- mir_snprintf(szSessionName,SIZEOF(szSessionName),"%s_%u","FavUserSession",i-1);
+ mir_snprintf(szSessionName, SIZEOF(szSessionName), "%s_%u", "FavUserSession", i-1);
DBDeleteContactSetting(NULL, __INTERNAL_NAME, szSessionName);
break;
}
@@ -760,22 +760,22 @@ int DeleteAutoSession(int ses_count)
SetInSessionOrder(hContact,0,ses_count,0);
}
- mir_snprintf(szSessionName,SIZEOF(szSessionName),"%s_%u","SessionDate",ses_count);
+ mir_snprintf(szSessionName, SIZEOF(szSessionName), "%s_%u", "SessionDate", ses_count);
DBDeleteContactSetting(NULL, __INTERNAL_NAME, szSessionName);
for (i=(ses_count+1);;i++)
{
- mir_snprintf(szSessionName,SIZEOF(szSessionName),"%s_%u","SessionDate",i);
+ mir_snprintf(szSessionName, SIZEOF(szSessionName), "%s_%u", "SessionDate", i);
if ((szSessionNameBuf=DBGetStringT(NULL, __INTERNAL_NAME, szSessionName))/*&&(szSessionHandlesBuf=DBGetStringT(NULL,PLGNAME,szSessionHandles))*/)
{
- mir_snprintf(szSessionName,SIZEOF(szSessionName),"%s_%u","SessionDate",i-1);
+ mir_snprintf(szSessionName, SIZEOF(szSessionName), "%s_%u", "SessionDate", i-1);
DBWriteContactSettingTString(NULL, __INTERNAL_NAME, szSessionName, szSessionNameBuf);
}
else
{
- mir_snprintf(szSessionName,SIZEOF(szSessionName),"%s_%u","SessionDate",i-1);
+ mir_snprintf(szSessionName, SIZEOF(szSessionName), "%s_%u", "SessionDate", i-1);
DBDeleteContactSetting(NULL, __INTERNAL_NAME, szSessionName);
break;
}
@@ -971,7 +971,7 @@ static int PluginInit(WPARAM wparam,LPARAM lparam)
hibSessionsLoadLast =(HANDLE)AddIcon(hiSessionsLoadLast, "SessionsLoadLast", _T("Load last Session"));
CLISTMENUITEM cl;
- ZeroMemory(&cl,sizeof(cl));
+ ZeroMemory(&cl, sizeof(cl));
cl.cbSize = sizeof(CLISTMENUITEM);
cl.position = 1000000000;
cl.flags = CMIM_ALL | CMIF_TCHAR;
@@ -998,8 +998,8 @@ static int PluginInit(WPARAM wparam,LPARAM lparam)
cl.position = 10100000;
hmLoadSession = (HANDLE) CallService(MS_CLIST_ADDMAINMENUITEM, 0, (LPARAM) &cl);
- ZeroMemory(&cl,sizeof(cl));
- cl.cbSize=sizeof(cl);
+ ZeroMemory(&cl, sizeof(cl));
+ cl.cbSize = sizeof(cl);
cl.flags = CMIM_ICON;
cl.hIcon = hiSessionsSave;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hmSaveCurrentSession, (LPARAM)&cl);
diff --git a/Sessions/Src/Options.cpp b/Sessions/Src/Options.cpp
index 3eb91c5..3998f2d 100644
--- a/Sessions/Src/Options.cpp
+++ b/Sessions/Src/Options.cpp
@@ -558,7 +558,7 @@ int OptionsInit(WPARAM wparam,LPARAM lparam)
{
OPTIONSDIALOGPAGE odp={0};
- odp.cbSize=sizeof(odp);
+ odp.cbSize = sizeof(odp);
odp.position=955000000;
odp.hInstance=hinstance;
odp.pszTemplate=MAKEINTRESOURCEA(IDD_OPTIONS);
diff --git a/Sessions/Src/Utils.cpp b/Sessions/Src/Utils.cpp
index b055506..c25b6e8 100644
--- a/Sessions/Src/Utils.cpp
+++ b/Sessions/Src/Utils.cpp
@@ -54,12 +54,12 @@ void AddSessionMark(HANDLE hContact,int mode,char bit)
{
if(strlen(dbv.pszVal)<g_ses_count)
{
- pszBuffer = (char*)malloc(g_ses_count+1);
+ pszBuffer = (char*)mir_alloc(g_ses_count+1);
ZeroMemory(pszBuffer,g_ses_count+1);
strcpy(pszBuffer,dbv.pszVal);
}
else
- pszBuffer=_strdup(dbv.pszVal);
+ pszBuffer = mir_strdup(dbv.pszVal);
DBFreeVariant(&dbv);
@@ -73,7 +73,7 @@ void AddSessionMark(HANDLE hContact,int mode,char bit)
pszBuffer[0]=bit;
DBWriteContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsMarks", pszBuffer);
- free(pszBuffer);
+ mir_free(pszBuffer);
}
else if(bit=='1')DBWriteContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsMarks", "10000000000");
else DBWriteContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsMarks", "00000000000");
@@ -135,10 +135,10 @@ void SetSessionMark(HANDLE hContact,int mode,char bit,unsigned int marknum)
DBVARIANT dbv;
if(!DBGetContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsMarks", &dbv) && dbv.pszVal)
{
- pszBuffer=_strdup(dbv.pszVal);
+ pszBuffer = mir_strdup(dbv.pszVal);
pszBuffer[marknum]=bit;
DBWriteContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsMarks", pszBuffer);
- free(pszBuffer);
+ mir_free(pszBuffer);
DBFreeVariant(&dbv);
}
}
@@ -187,9 +187,9 @@ void AddInSessionOrder(HANDLE hContact,int mode,int ordernum,int writemode)
char szFormNumBuf[255]={'\0'};
if(ordernum<10)
- _snprintf(szFormNumBuf,SIZEOF(szFormNumBuf),"%u%u",0,ordernum);
+ mir_snprintf(szFormNumBuf, SIZEOF(szFormNumBuf), "%u%u", 0, ordernum);
else
- _snprintf(szFormNumBuf,SIZEOF(szFormNumBuf), "%u" , ordernum);
+ mir_snprintf(szFormNumBuf, SIZEOF(szFormNumBuf), "%u", ordernum);
if(mode==0)
{
@@ -202,34 +202,34 @@ void AddInSessionOrder(HANDLE hContact,int mode,int ordernum,int writemode)
if(!len)
len=20;
- temp2 = (char*)malloc(len-1);
+ temp2 = (char*)mir_alloc(len-1);
ZeroMemory(temp2,len-1);
- temp = (char*)malloc(len+1);
+ temp = (char*)mir_alloc(len+1);
ZeroMemory(temp,len+1);
if(ordernum<10)
{
strncpy( temp2, dbv.pszVal, len-2 );
temp2[len-2]='\0';
- _snprintf(temp,len+1,"%u%u%s",0,ordernum,temp2);
+ mir_snprintf(temp, len+1, "%u%u%s", 0, ordernum, temp2);
}
else
- _snprintf(temp,len+1, "%u%s" , ordernum,temp2);
+ mir_snprintf(temp, len+1, "%u%s", ordernum, temp2);
for (i=(ses_limit*2);i<20;i++)
temp[i]='0';
DBWriteContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsOrder", temp);
- free(temp);
- free(temp2);
+ mir_free(temp);
+ mir_free(temp2);
DBFreeVariant(&dbv);
}
else if(writemode==1)
{
ZeroMemory(szFormNumBuf,SIZEOF(szFormNumBuf));
if(ordernum<10)
- _snprintf(szFormNumBuf,SIZEOF(szFormNumBuf),"%u%u%s",0,ordernum,"000000000000000000");
+ mir_snprintf(szFormNumBuf, SIZEOF(szFormNumBuf), "%u%u%s", 0, ordernum, "000000000000000000");
else
- _snprintf(szFormNumBuf,SIZEOF(szFormNumBuf), "%u%s" , ordernum,"000000000000000000");
+ mir_snprintf(szFormNumBuf, SIZEOF(szFormNumBuf), "%u%s", ordernum, "000000000000000000");
DBWriteContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsOrder", szFormNumBuf);
}
@@ -246,32 +246,32 @@ void AddInSessionOrder(HANDLE hContact,int mode,int ordernum,int writemode)
int len=0;
if(strlen(dbv.pszVal)<(g_ses_count*2))
{
- pszBuffer = (char*)malloc(g_ses_count*2+1);
+ pszBuffer = (char*)mir_alloc(g_ses_count*2+1);
ZeroMemory(pszBuffer,g_ses_count*2+1);
strcpy(pszBuffer,dbv.pszVal);
}
else
{
- pszBuffer=_strdup(dbv.pszVal);
+ pszBuffer = mir_strdup(dbv.pszVal);
}
if(!(advlen=len= (int)strlen(pszBuffer)))
advlen=len=20;
else
advlen=len+2;
- temp = (char*)malloc(advlen+1);
+ temp = (char*)mir_alloc(advlen+1);
ZeroMemory(temp,advlen+1);
if(ordernum<10)
- _snprintf(temp,advlen+1,"%u%u%s",0,ordernum,dbv.pszVal);
+ mir_snprintf(temp, advlen+1, "%u%u%s", 0, ordernum, dbv.pszVal);
else
- _snprintf(temp,advlen+1, "%u%s" , ordernum,dbv.pszVal);
+ mir_snprintf(temp, advlen+1, "%u%s", ordernum, dbv.pszVal);
DBFreeVariant(&dbv);
DBWriteContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsOrder", temp);
- free(temp);
- free(pszBuffer);
+ mir_free(temp);
+ mir_free(pszBuffer);
}
else if(writemode==1)
DBWriteContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsOrder", szFormNumBuf);
@@ -315,9 +315,9 @@ void SetInSessionOrder(HANDLE hContact,int mode,int count,unsigned int ordernum)
char szTemp[3]={'\0'};
if(ordernum<10)
- _snprintf(szTemp,SIZEOF(szTemp),"%u%u",0,ordernum);
+ mir_snprintf(szTemp, SIZEOF(szTemp), "%u%u", 0, ordernum);
else
- _snprintf(szTemp,SIZEOF(szTemp), "%u" , ordernum);
+ mir_snprintf(szTemp, SIZEOF(szTemp), "%u", ordernum);
if(mode==0)
{
@@ -355,16 +355,16 @@ BOOL ResaveSettings(char* szName,int iFirst,int iLimit,TCHAR* szBuffer)
if (szBuffer)
{
DBVARIANT dbv_temp = {0};
- mir_snprintf(szNameBuf,SIZEOF(szNameBuf),"%s_%u",szName,i);
+ mir_snprintf(szNameBuf, SIZEOF(szNameBuf), "%s_%u", szName, i);
DBGetContactSettingTString(NULL, __INTERNAL_NAME, szNameBuf, &dbv_temp);
DBWriteContactSettingTString(NULL, __INTERNAL_NAME, szNameBuf, szBuffer);
marked=IsMarkedUserDefSession(i);
MarkUserDefSession(i,(BYTE)((i==iFirst)?IsMarkedUserDefSession(iFirst-1):marked_t));
marked_t=marked;
- free(szBuffer);
+ mir_free(szBuffer);
if (dbv_temp.ptszVal)
{
- szBuffer= _tcsdup(dbv_temp.ptszVal);
+ szBuffer = mir_tstrdup(dbv_temp.ptszVal);
DBFreeVariant(&dbv_temp);
}
else
@@ -439,7 +439,7 @@ int LoadSessionToCombobox (HWND hdlg,BOOL mode,int iLimit,char* pszSetting,int i
}
for(i=0;i < iLimit; i++)
{
- mir_snprintf(szBuffer,SIZEOF(szBuffer),"%s_%u",pszSetting,i);
+ mir_snprintf(szBuffer, SIZEOF(szBuffer), "%s_%u", pszSetting, i);
pszBuffer = DBGetStringT(NULL, __INTERNAL_NAME, szBuffer);
if (pszBuffer)
{
@@ -476,7 +476,7 @@ int FillFavoritesMenu (HMENU hMenu,int iLimit)
{
if(IsMarkedUserDefSession(i))
{
- mir_snprintf(szBuffer,SIZEOF(szBuffer),"%s_%u","UserSessionDsc",i);
+ mir_snprintf(szBuffer, SIZEOF(szBuffer), "%s_%u", "UserSessionDsc", i);
pszBuffer = DBGetStringT(NULL, __INTERNAL_NAME, szBuffer);
if ((pszBuffer = DBGetStringT(NULL, __INTERNAL_NAME, szBuffer)))
{
@@ -512,7 +512,7 @@ int CheckContactVisibility(DWORD hContact)
MessageWindowInputData mwid;
MessageWindowData mwd;
- mwid.cbSize=sizeof(MessageWindowInputData);
+ mwid.cbSize = sizeof(MessageWindowInputData);
mwid.hContact=(HANDLE)hContact;
mwid.uFlags=MSG_WINDOW_UFLAG_MSG_BOTH;
@@ -529,14 +529,14 @@ int CheckContactVisibility(DWORD hContact)
void RenameUserDefSession(int ses_count,TCHAR* ptszNewName)
{
char szSession[256]={0};
- mir_snprintf(szSession,SIZEOF(szSession),"%s_%u","UserSessionDsc",ses_count);
+ mir_snprintf(szSession, SIZEOF(szSession), "%s_%u", "UserSessionDsc", ses_count);
DBWriteContactSettingTString(NULL, __INTERNAL_NAME, szSession, ptszNewName);
}
int MarkUserDefSession(int ses_count,BYTE bCheck)
{
char szSessionName[256]={0};
- mir_snprintf(szSessionName,SIZEOF(szSessionName),"%s_%u","FavUserSession",ses_count);
+ mir_snprintf(szSessionName, SIZEOF(szSessionName), "%s_%u", "FavUserSession", ses_count);
DBWriteContactSettingByte(NULL, __INTERNAL_NAME, szSessionName, bCheck);
return 0;
}
@@ -544,7 +544,7 @@ int MarkUserDefSession(int ses_count,BYTE bCheck)
BYTE IsMarkedUserDefSession(int ses_count)
{
char szSessionName[256]={0};
- mir_snprintf(szSessionName,SIZEOF(szSessionName),"%s_%u","FavUserSession",ses_count);
+ mir_snprintf(szSessionName, SIZEOF(szSessionName), "%s_%u","FavUserSession", ses_count);
return DBGetContactSettingByte(NULL, __INTERNAL_NAME, szSessionName, 0);
}
@@ -566,9 +566,9 @@ void SavePosition(HWND hwnd, char *wndName)
RECT rc;
char buffer[512];
GetWindowRect(hwnd, &rc);
- sprintf(buffer, "%sPosX", wndName);
+ mir_snprintf(buffer, SIZEOF(buffer), "%sPosX", wndName);
DBWriteContactSettingDword(0, __INTERNAL_NAME, buffer, rc.left);
- sprintf(buffer, "%sPosY", wndName);
+ mir_snprintf(buffer, SIZEOF(buffer), "%sPosY", wndName);
DBWriteContactSettingDword(0, __INTERNAL_NAME, buffer, rc.top);
}
@@ -576,9 +576,9 @@ void LoadPosition(HWND hWnd, char *wndName)
{
char buffer[512];
int x,y ;
- sprintf(buffer, "%sPosX", wndName);
+ mir_snprintf(buffer, SIZEOF(buffer), "%sPosX", wndName);
x = DBGetContactSettingDword(0, __INTERNAL_NAME, buffer, ((GetSystemMetrics(SM_CXSCREEN)) / 2)-130);
- sprintf(buffer, "%sPosY", wndName);
+ mir_snprintf(buffer, SIZEOF(buffer), "%sPosY", wndName);
y = DBGetContactSettingDword(0, __INTERNAL_NAME, buffer, ((GetSystemMetrics(SM_CYSCREEN))/ 2)-80);
SetWindowPos(hWnd, NULL, x, y, 0, 0, SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOSIZE);
} \ No newline at end of file