summaryrefslogtreecommitdiff
path: root/plugins/mTextControl/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-07-25 15:32:06 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-07-25 15:32:06 +0000
commita757184e5db3112d3de0b69eec7d39b937e396bc (patch)
treee903787b3ca3af22a4d95ddf757e178b23da8619 /plugins/mTextControl/src
parent33ebc5347bee5432ca63efb330acdd5a3b82f3fd (diff)
replace sprintf to mir_snprintf (part 5)
git-svn-id: http://svn.miranda-ng.org/main/trunk@5481 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/mTextControl/src')
-rw-r--r--plugins/mTextControl/src/FormattedTextDraw.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/mTextControl/src/FormattedTextDraw.cpp b/plugins/mTextControl/src/FormattedTextDraw.cpp
index fe8b0b27ea..247b688189 100644
--- a/plugins/mTextControl/src/FormattedTextDraw.cpp
+++ b/plugins/mTextControl/src/FormattedTextDraw.cpp
@@ -120,7 +120,7 @@ HRESULT CFormattedTextDraw::putTextA(char *newVal)
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_FACE|CFM_BOLD;
cf.dwEffects = 0;
- wsprintf(cf.szFaceName, _T("MS Shell Dlg"));
+ mir_sntprintf(cf.szFaceName, SIZEOF(cf.szFaceName), _T("MS Shell Dlg"));
m_spTextServices->TxSendMessage(EM_SETCHARFORMAT, (WPARAM)(SCF_ALL), (LPARAM)&cf, &lResult);
return S_OK;
@@ -149,7 +149,7 @@ HRESULT CFormattedTextDraw::putTextW(WCHAR *newVal)
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_FACE|CFM_BOLD;
cf.dwEffects = 0;
- wsprintf(cf.szFaceName, _T("MS Shell Dlg"));
+ mir_sntprintf(cf.szFaceName, SIZEOF(cf.szFaceName), _T("MS Shell Dlg"));
m_spTextServices->TxSendMessage(EM_SETCHARFORMAT, (WPARAM)(SCF_ALL), (LPARAM)&cf, &lResult);
return S_OK;
@@ -173,7 +173,7 @@ HRESULT CFormattedTextDraw::Draw(void *hdcDraw, RECT *prc)
cf.crTextColor = GetTextColor((HDC)hdcDraw);
cf.bCharSet = lf.lfCharSet;
cf.yHeight = 1440 * abs(lf.lfHeight) / GetDeviceCaps((HDC)hdcDraw, LOGPIXELSY);
- wsprintf(cf.szFaceName, lf.lfFaceName);
+ mir_sntprintf(cf.szFaceName, SIZEOF(cf.szFaceName), lf.lfFaceName);
m_spTextServices->TxSendMessage(EM_SETCHARFORMAT, (WPARAM)(SCF_ALL), (LPARAM)&cf, &lResult);
m_spTextServices->TxDraw(
@@ -214,7 +214,7 @@ HRESULT CFormattedTextDraw::get_NaturalSize(void *hdcDraw, long *Width, long *He
cf.crTextColor = GetTextColor((HDC)hdcDraw);
cf.bCharSet = lf.lfCharSet;
cf.yHeight = 1440 * abs(lf.lfHeight) / GetDeviceCaps((HDC)hdcDraw, LOGPIXELSY);
- wsprintf(cf.szFaceName, lf.lfFaceName);
+ mir_sntprintf(cf.szFaceName, SIZEOF(cf.szFaceName), lf.lfFaceName);
if (!m_spTextServices)
return S_FALSE;