diff options
Diffstat (limited to 'Plugins/historyevents/sdk/m_variables.h')
-rw-r--r-- | Plugins/historyevents/sdk/m_variables.h | 33 |
1 files changed, 17 insertions, 16 deletions
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 <m_button.h>
#endif
+#ifndef SIZEOF
+#include <win2k.h>
+#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;
|