From fc771dfd08bb363fb3767285ab88503edfebdf98 Mon Sep 17 00:00:00 2001 From: "wishmaster51@gmail.com" Date: Wed, 21 Mar 2012 15:06:28 +0000 Subject: HistoryEvents: -x64 version -destroy service functions -support for costum langpacks -updated header files -updated copyrights git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@238 c086bb3d-8645-0410-b8da-73a8550f86e7 --- Plugins/historyevents/sdk/m_variables.h | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'Plugins/historyevents/sdk/m_variables.h') diff --git a/Plugins/historyevents/sdk/m_variables.h b/Plugins/historyevents/sdk/m_variables.h index 3f13c96..1264643 100644 --- a/Plugins/historyevents/sdk/m_variables.h +++ b/Plugins/historyevents/sdk/m_variables.h @@ -28,6 +28,10 @@ #include #endif +#ifndef SIZEOF +#include +#endif + // -------------------------------------------------------------------------- // Memory management // -------------------------------------------------------------------------- @@ -578,41 +582,38 @@ __inline static int variables_skin_helpbutton(HWND hwndDlg, UINT uIDButton) { hIcon = NULL; res = 0; - if (ServiceExists(MS_VARS_GETSKINITEM)) { + if (ServiceExists(MS_VARS_GETSKINITEM)) hIcon = (HICON)CallService(MS_VARS_GETSKINITEM, 0, (LPARAM)VSI_HELPICON); - } - GetClassName(GetDlgItem(hwndDlg, uIDButton), tszClass, sizeof(tszClass)); + + GetClassName(GetDlgItem(hwndDlg, uIDButton), tszClass, SIZEOF(tszClass)); if (!_tcscmp(tszClass, _T("Button"))) { if (hIcon != NULL) { - SetWindowLong(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE, GetWindowLong(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE)|BS_ICON); + SetWindowLongPtr(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE)|BS_ICON); SendMessage(GetDlgItem(hwndDlg, uIDButton), BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)hIcon); } else { - SetWindowLong(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE, GetWindowLong(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE)&~BS_ICON); + SetWindowLongPtr(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE)&~BS_ICON); SetDlgItemText(hwndDlg, uIDButton, _T("V")); } } else if (!_tcscmp(tszClass, MIRANDABUTTONCLASS)) { if (hIcon != NULL) { - char *szTipInfo; + char *szTipInfo = NULL; SendMessage(GetDlgItem(hwndDlg, uIDButton), BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)hIcon); - if (ServiceExists(MS_VARS_GETSKINITEM)) { + if (ServiceExists(MS_VARS_GETSKINITEM)) szTipInfo = (char *)CallService(MS_VARS_GETSKINITEM, 0, (LPARAM)VSI_HELPTIPTEXT); - } - if (szTipInfo == NULL) { + + if (szTipInfo == NULL) szTipInfo = Translate("Open String Formatting Help"); - } + SendMessage(GetDlgItem(hwndDlg, uIDButton), BUTTONADDTOOLTIP, (WPARAM)szTipInfo, 0); SendDlgItemMessage(hwndDlg, uIDButton, BUTTONSETASFLATBTN, 0, 0); } - else { - SetDlgItemText(hwndDlg, uIDButton, _T("V")); - } - } - else { - res = -1; + else SetDlgItemText(hwndDlg, uIDButton, _T("V")); } + else res = -1; + ShowWindow(GetDlgItem(hwndDlg, uIDButton), ServiceExists(MS_VARS_FORMATSTRING)); return res; -- cgit v1.2.3