From 33953cc6a0fab6a91af293c6838f8a46dd7922da Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 14:42:51 +0000 Subject: HCONTACT, part 3 git-svn-id: http://svn.miranda-ng.org/main/trunk@8081 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/contactcache.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'plugins/TabSRMM/src/contactcache.cpp') diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp index 63001f7931..a255657c65 100644 --- a/plugins/TabSRMM/src/contactcache.cpp +++ b/plugins/TabSRMM/src/contactcache.cpp @@ -622,15 +622,10 @@ HICON CContactCache::getIcon(int& iSize) const int CContactCache::getMaxMessageLength() { - HANDLE hContact; - const char* szProto; - - hContact = getActiveContact(); - szProto = getActiveProto(); - + HCONTACT hContact = getActiveContact(); + LPCSTR szProto = getActiveProto(); if (szProto) { - - m_nMax = CallProtoService(szProto, PS_GETCAPS, PFLAG_MAXLENOFMESSAGE, reinterpret_cast(hContact)); + m_nMax = CallProtoService(szProto, PS_GETCAPS, PFLAG_MAXLENOFMESSAGE, (LPARAM)hContact); if (m_nMax) { if (M.GetByte("autosplit", 0)) { if (m_hwnd) @@ -640,7 +635,8 @@ int CContactCache::getMaxMessageLength() if (m_hwnd) ::SendDlgItemMessage(m_hwnd, IDC_MESSAGE, EM_EXLIMITTEXT, 0, (LPARAM)m_nMax); } - } else { + } + else { if (m_hwnd) ::SendDlgItemMessage(m_hwnd, IDC_MESSAGE, EM_EXLIMITTEXT, 0, 20000); m_nMax = 20000; -- cgit v1.2.3