summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/BasicHistory/HistoryWindow.cpp4
-rw-r--r--plugins/BossKeyPlus/Options.cpp2
-rw-r--r--plugins/CSList/cslist.cpp2
-rw-r--r--plugins/Chat/window.c34
-rw-r--r--plugins/Clist_modern/modern_tbbutton.cpp37
-rw-r--r--plugins/Clist_modern/modern_toolbar.cpp2
-rw-r--r--plugins/Clist_modern/modern_viewmodebar.cpp10
-rw-r--r--plugins/Clist_nicer/SRC/clcopts.cpp8
-rw-r--r--plugins/Clist_nicer/SRC/clistmenus.cpp4
-rw-r--r--plugins/Clist_nicer/SRC/extBackg.cpp12
-rw-r--r--plugins/Clist_nicer/SRC/viewmodes.cpp4
-rw-r--r--plugins/ContactsPlus/utils.cpp2
-rw-r--r--plugins/NewAwaySysMod/AwayOpt.cpp232
-rw-r--r--plugins/NewAwaySysMod/SetAwayMsg.cpp2
-rw-r--r--plugins/Popup/src/opt_adv.cpp2
-rw-r--r--plugins/Popup/src/opt_class.cpp4
-rw-r--r--plugins/Popup/src/opt_gen.cpp6
-rw-r--r--plugins/Popup/src/opt_skins.cpp2
-rw-r--r--plugins/SRMM/msgdialog.c4
-rw-r--r--plugins/Scriver/chat/window.c34
-rw-r--r--plugins/Scriver/msgdialog.c2
-rw-r--r--plugins/SimpleStatusMsg/msgbox.cpp6
-rw-r--r--plugins/SimpleStatusMsg/options.cpp2
-rw-r--r--plugins/SmileyAdd/dlgboxsubclass.cpp2
-rw-r--r--plugins/TabSRMM/chat/window.cpp22
-rw-r--r--plugins/TabSRMM/include/themes.h8
-rw-r--r--plugins/TabSRMM/src/TSButton.cpp30
-rw-r--r--plugins/TabSRMM/src/buttonsbar.cpp22
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp23
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp8
-rw-r--r--plugins/TabSRMM/src/sidebar.cpp8
-rw-r--r--plugins/TipperYM/options.cpp8
-rw-r--r--plugins/TopToolBar/toolbar.cpp2
-rw-r--r--plugins/UserInfoEx/ctrl_button.cpp2
34 files changed, 167 insertions, 385 deletions
diff --git a/plugins/BasicHistory/HistoryWindow.cpp b/plugins/BasicHistory/HistoryWindow.cpp
index 894be667b4..e693693b8c 100644
--- a/plugins/BasicHistory/HistoryWindow.cpp
+++ b/plugins/BasicHistory/HistoryWindow.cpp
@@ -1168,8 +1168,8 @@ void HistoryWindow::Initialise()
plusIco = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 1, (LPARAM)hPlusIcon);
minusIco = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 1, (LPARAM)hMinusIcon);
- SendDlgItemMessage( hWnd, IDC_SHOWHIDE, BUTTONSETASPUSHBTN, 0, 0 );
- SendDlgItemMessage( hWnd, IDC_SHOWHIDE, BUTTONSETASFLATBTN, 0, 0 );
+ SendDlgItemMessage( hWnd, IDC_SHOWHIDE, BUTTONSETASPUSHBTN, TRUE, 0 );
+ SendDlgItemMessage( hWnd, IDC_SHOWHIDE, BUTTONSETASFLATBTN, TRUE, 0 );
if(hContact == NULL || Options::instance->showContacts)
{
SendDlgItemMessage( hWnd, IDC_SHOWHIDE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)minusIco);
diff --git a/plugins/BossKeyPlus/Options.cpp b/plugins/BossKeyPlus/Options.cpp
index 7e375c7ae8..eefb5bac96 100644
--- a/plugins/BossKeyPlus/Options.cpp
+++ b/plugins/BossKeyPlus/Options.cpp
@@ -62,7 +62,7 @@ INT_PTR CALLBACK MainOptDlg(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam)
if (hIcon != NULL)
SendMessage(GetDlgItem(hwndDlg, IDC_MAINOPT_VARHELP), BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
SendMessage(GetDlgItem(hwndDlg, IDC_MAINOPT_VARHELP), BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open String Formatting Help"), BATF_TCHAR);
- SendDlgItemMessage(hwndDlg, IDC_MAINOPT_VARHELP, BUTTONSETASFLATBTN, 0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_MAINOPT_VARHELP, BUTTONSETASFLATBTN, TRUE, 0);
}
SendDlgItemMessage(hwndDlg,IDC_MAINOPT_PASS,EM_LIMITTEXT,MAXPASSLEN,0); // limit password length
diff --git a/plugins/CSList/cslist.cpp b/plugins/CSList/cslist.cpp
index 4ce3f66d18..0f511d72ab 100644
--- a/plugins/CSList/cslist.cpp
+++ b/plugins/CSList/cslist.cpp
@@ -576,7 +576,7 @@ void CSWindow::initButtons( )
continue;
SendDlgItemMessage( this->handle, forms[i].idc, BM_SETIMAGE, IMAGE_ICON, ( LPARAM )LoadIconExEx( forms[i].pszIconIcoLib, forms[i].iconNoIcoLib ) );
- SendDlgItemMessage( this->handle, forms[i].idc, BUTTONSETASFLATBTN, 0, 0 ); //maybe set as BUTTONSETDEFAULT?
+ SendDlgItemMessage( this->handle, forms[i].idc, BUTTONSETASFLATBTN, TRUE, 0 ); //maybe set as BUTTONSETDEFAULT?
SendDlgItemMessage( this->handle, forms[i].idc, BUTTONADDTOOLTIP, ( WPARAM )TranslateTS(forms[i].ptszTitle), BATF_TCHAR );
}
}
diff --git a/plugins/Chat/window.c b/plugins/Chat/window.c
index 67052b2a35..f59df07a30 100644
--- a/plugins/Chat/window.c
+++ b/plugins/Chat/window.c
@@ -98,17 +98,17 @@ static void InitButtons(HWND hwndDlg, SESSION_INFO* si)
SendDlgItemMessage( hwndDlg, IDC_SHOWNICKLIST, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadIconEx( si->bNicklistEnabled ? "nicklist" : "nicklist2", FALSE ));
SendDlgItemMessage( hwndDlg, IDC_FILTER, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadIconEx( si->bFilterEnabled ? "filter" : "filter2", FALSE ));
- SendDlgItemMessage( hwndDlg, IDC_SMILEY, BUTTONSETASFLATBTN, 0, 0 );
- SendDlgItemMessage( hwndDlg, IDC_BOLD, BUTTONSETASFLATBTN, 0, 0 );
- SendDlgItemMessage( hwndDlg, IDC_ITALICS, BUTTONSETASFLATBTN, 0, 0 );
- SendDlgItemMessage( hwndDlg, IDC_UNDERLINE, BUTTONSETASFLATBTN, 0, 0 );
- SendDlgItemMessage( hwndDlg, IDC_BKGCOLOR, BUTTONSETASFLATBTN, 0, 0 );
- SendDlgItemMessage( hwndDlg, IDC_COLOR, BUTTONSETASFLATBTN, 0, 0 );
- SendDlgItemMessage( hwndDlg, IDC_HISTORY, BUTTONSETASFLATBTN, 0, 0 );
- SendDlgItemMessage( hwndDlg, IDC_SHOWNICKLIST, BUTTONSETASFLATBTN, 0, 0 );
- SendDlgItemMessage( hwndDlg, IDC_CHANMGR, BUTTONSETASFLATBTN, 0, 0 );
- SendDlgItemMessage( hwndDlg, IDC_FILTER, BUTTONSETASFLATBTN, 0, 0 );
- SendDlgItemMessage( hwndDlg, IDC_CLOSE, BUTTONSETASFLATBTN, 0, 0 );
+ SendDlgItemMessage( hwndDlg, IDC_SMILEY, BUTTONSETASFLATBTN, TRUE, 0 );
+ SendDlgItemMessage( hwndDlg, IDC_BOLD, BUTTONSETASFLATBTN, TRUE, 0 );
+ SendDlgItemMessage( hwndDlg, IDC_ITALICS, BUTTONSETASFLATBTN, TRUE, 0 );
+ SendDlgItemMessage( hwndDlg, IDC_UNDERLINE, BUTTONSETASFLATBTN, TRUE, 0 );
+ SendDlgItemMessage( hwndDlg, IDC_BKGCOLOR, BUTTONSETASFLATBTN, TRUE, 0 );
+ SendDlgItemMessage( hwndDlg, IDC_COLOR, BUTTONSETASFLATBTN, TRUE, 0 );
+ SendDlgItemMessage( hwndDlg, IDC_HISTORY, BUTTONSETASFLATBTN, TRUE, 0 );
+ SendDlgItemMessage( hwndDlg, IDC_SHOWNICKLIST, BUTTONSETASFLATBTN, TRUE, 0 );
+ SendDlgItemMessage( hwndDlg, IDC_CHANMGR, BUTTONSETASFLATBTN, TRUE, 0 );
+ SendDlgItemMessage( hwndDlg, IDC_FILTER, BUTTONSETASFLATBTN, TRUE, 0 );
+ SendDlgItemMessage( hwndDlg, IDC_CLOSE, BUTTONSETASFLATBTN, TRUE, 0 );
SendMessage(GetDlgItem(hwndDlg,IDC_SMILEY), BUTTONADDTOOLTIP, (WPARAM)LPGEN("Insert a smiley"), 0);
SendMessage(GetDlgItem(hwndDlg,IDC_BOLD), BUTTONADDTOOLTIP, (WPARAM)LPGEN("Make the text bold (CTRL+B)"), 0);
@@ -121,13 +121,11 @@ static void InitButtons(HWND hwndDlg, SESSION_INFO* si)
SendMessage(GetDlgItem(hwndDlg,IDC_CHANMGR), BUTTONADDTOOLTIP, (WPARAM)LPGEN("Control this room (CTRL+O)"), 0);
SendMessage(GetDlgItem(hwndDlg,IDC_FILTER), BUTTONADDTOOLTIP, (WPARAM)LPGEN("Enable/disable the event filter (CTRL+F)"), 0);
SendMessage(GetDlgItem(hwndDlg,IDC_CLOSE), BUTTONADDTOOLTIP, (WPARAM)LPGEN("Close current tab (CTRL+F4)"), 0);
- SendDlgItemMessage(hwndDlg, IDC_BOLD, BUTTONSETASPUSHBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_ITALICS, BUTTONSETASPUSHBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_UNDERLINE, BUTTONSETASPUSHBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_COLOR, BUTTONSETASPUSHBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_BKGCOLOR, BUTTONSETASPUSHBTN, 0, 0);
- // SendDlgItemMessage(hwndDlg, IDC_SHOWNICKLIST, BUTTONSETASPUSHBTN, 0, 0);
- // SendDlgItemMessage(hwndDlg, IDC_FILTER, BUTTONSETASPUSHBTN, 0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_BOLD, BUTTONSETASPUSHBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_ITALICS, BUTTONSETASPUSHBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_UNDERLINE, BUTTONSETASPUSHBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_COLOR, BUTTONSETASPUSHBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_BKGCOLOR, BUTTONSETASPUSHBTN, TRUE, 0);
if (pInfo) {
EnableWindow(GetDlgItem(hwndDlg, IDC_BOLD), pInfo->bBold);
diff --git a/plugins/Clist_modern/modern_tbbutton.cpp b/plugins/Clist_modern/modern_tbbutton.cpp
index f6dac962f5..bf0fe2add4 100644
--- a/plugins/Clist_modern/modern_tbbutton.cpp
+++ b/plugins/Clist_modern/modern_tbbutton.cpp
@@ -256,35 +256,28 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam
SendMessage(hwndToolTips, TTM_ADDTOOL, 0, (LPARAM) &ti);
break;
}
+
case BUTTONSETASPUSHBTN:
- {
+ lpSBData->pushBtn = (wParam != 0);
+ lpSBData->pbState = (lParam & 2) != 0;
+ return 0;
- if (lParam==0)
- lpSBData->pushBtn=1;
- else
- {
- lpSBData->pushBtn=wParam;
- lpSBData->pbState = (lParam&2) ? TRUE : FALSE;
- }
- return 0;
- }
case WM_SETFOCUS:
- {
- // set keyboard focus and redraw
- lpSBData->fFocused = TRUE;
- InvalidateParentRect(lpSBData->hWnd, NULL, TRUE);
- break;
- }
+ // set keyboard focus and redraw
+ lpSBData->fFocused = TRUE;
+ InvalidateParentRect(lpSBData->hWnd, NULL, TRUE);
+ break;
+
case WM_KILLFOCUS:
- {
- // kill focus and redraw
- lpSBData->fFocused = FALSE;
- InvalidateParentRect(lpSBData->hWnd, NULL, TRUE);
- break;
- }
+ // kill focus and redraw
+ lpSBData->fFocused = FALSE;
+ InvalidateParentRect(lpSBData->hWnd, NULL, TRUE);
+ break;
+
case WM_WINDOWPOSCHANGED:
InvalidateParentRect(lpSBData->hWnd, NULL, TRUE);
break;
+
case WM_ENABLE:
// windows tells us to enable/disable
{
diff --git a/plugins/Clist_modern/modern_toolbar.cpp b/plugins/Clist_modern/modern_toolbar.cpp
index d39bbf4c48..50ad1064ad 100644
--- a/plugins/Clist_modern/modern_toolbar.cpp
+++ b/plugins/Clist_modern/modern_toolbar.cpp
@@ -910,7 +910,7 @@ static LRESULT CALLBACK ToolBar_WndProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM
strcat(buttonId,mtbi->szButtonID);
SendMessage(hwndButton, BUTTONSETID, 0 ,(LPARAM) buttonId );
if (pMTBInfo->bFlatButtons)
- SendMessage(hwndButton, BUTTONSETASFLATBTN, 0, 1 );
+ SendMessage(hwndButton, BUTTONSETASFLATBTN, TRUE, 0 );
SetWindowLongPtr(hwndButton,GWLP_USERDATA,(LONG_PTR)mtbi);
SendMessage(hwndButton, MBM_UPDATETRANSPARENTFLAG, 0, 2);
}
diff --git a/plugins/Clist_modern/modern_viewmodebar.cpp b/plugins/Clist_modern/modern_viewmodebar.cpp
index c896e3b852..ae385f77bb 100644
--- a/plugins/Clist_modern/modern_viewmodebar.cpp
+++ b/plugins/Clist_modern/modern_viewmodebar.cpp
@@ -1081,7 +1081,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
SendMessage(hwndSelector, BUTTONSETMARGINS,0 ,(LPARAM) &rcMargins);
SendMessage(hwndSelector, BUTTONSETID,0 ,(LPARAM) "ViewMode.Select" );
SendMessage(hwndSelector, WM_SETFONT,0 ,(LPARAM) FONTID_VIEMODES+1 );
- SendMessage(hwndSelector, BUTTONSETASFLATBTN, 0, 1 );
+ SendMessage(hwndSelector, BUTTONSETASFLATBTN, TRUE, 0 );
SendMessage(hwndSelector, MBM_UPDATETRANSPARENTFLAG, 0, 2);
SendMessage(hwndSelector, BUTTONSETSENDONDOWN, 0 ,(LPARAM) 1 );
@@ -1090,7 +1090,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
hwnd, (HMENU) IDC_CONFIGUREMODES, g_hInst, NULL);
SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Setup view modes"), 0);
SendMessage(hwndButton, BUTTONSETID,0 ,(LPARAM) "ViewMode.Setup" );
- SendMessage(hwndButton, BUTTONSETASFLATBTN, 0, 1 );
+ SendMessage(hwndButton, BUTTONSETASFLATBTN, TRUE, 0 );
SendMessage(hwndButton, MBM_UPDATETRANSPARENTFLAG, 0, 2);
hwndButton = CreateWindow( SKINBUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
@@ -1098,7 +1098,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Clear view mode and return to default display"), 0);
SendMessage(hwndButton, BUTTONSETID,0 ,(LPARAM) "ViewMode.Clear" );
SendMessage(hwnd, WM_USER + 100, 0, 0);
- SendMessage(hwndButton, BUTTONSETASFLATBTN, 0, 1 );
+ SendMessage(hwndButton, BUTTONSETASFLATBTN, TRUE, 0 );
SendMessage(hwndButton, MBM_UPDATETRANSPARENTFLAG, 0, 2);
return FALSE;
}
@@ -1140,11 +1140,11 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
while(_buttons[i] != 0) {
//SendMessage(GetDlgItem(hwnd, _buttons[i]), BM_SETSKINNED, 0, bSkinned);
if(1&&bSkinned) {
- SendDlgItemMessage(hwnd, _buttons[i], BUTTONSETASFLATBTN, 0, 0);
+ SendDlgItemMessage(hwnd, _buttons[i], BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(hwnd, _buttons[i], BUTTONSETASFLATBTN + 10, 0, 0);
}
else {
- SendDlgItemMessage(hwnd, _buttons[i], BUTTONSETASFLATBTN, 0, 1);
+ SendDlgItemMessage(hwnd, _buttons[i], BUTTONSETASFLATBTN, TRUE, 1);
SendDlgItemMessage(hwnd, _buttons[i], BUTTONSETASFLATBTN + 10, 0, 1);
}
i++;
diff --git a/plugins/Clist_nicer/SRC/clcopts.cpp b/plugins/Clist_nicer/SRC/clcopts.cpp
index b4b8128eea..110ca15111 100644
--- a/plugins/Clist_nicer/SRC/clcopts.cpp
+++ b/plugins/Clist_nicer/SRC/clcopts.cpp
@@ -1056,25 +1056,25 @@ static INT_PTR CALLBACK DlgProcDspProfiles(HWND hwnd, UINT msg, WPARAM wParam, L
hwndList = GetDlgItem(hwnd, IDC_PROFILELIST);
HWND hwndAdd = GetDlgItem(hwnd, IDC_DSP_ADD);
- SendMessage(hwndAdd, BUTTONSETASFLATBTN, 0, 1);
+ SendMessage(hwndAdd, BUTTONSETASFLATBTN, TRUE, 1);
SendMessage(hwndAdd, BUTTONSETASFLATBTN + 10, 0, 1);
SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_ADDCONTACT), IMAGE_ICON, 16, 16, LR_SHARED));
SetWindowText(hwndAdd, TranslateT("Add New..."));
hwndAdd = GetDlgItem(hwnd, IDC_DSP_DELETE);
- SendMessage(hwndAdd, BUTTONSETASFLATBTN, 0, 1);
+ SendMessage(hwndAdd, BUTTONSETASFLATBTN, TRUE, 1);
SendMessage(hwndAdd, BUTTONSETASFLATBTN + 10, 0, 1);
SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_DELETE), IMAGE_ICON, 16, 16, LR_SHARED));
SetWindowText(hwndAdd, TranslateT("Delete"));
hwndAdd = GetDlgItem(hwnd, IDC_DSP_RENAME);
- SendMessage(hwndAdd, BUTTONSETASFLATBTN, 0, 1);
+ SendMessage(hwndAdd, BUTTONSETASFLATBTN, TRUE, 1);
SendMessage(hwndAdd, BUTTONSETASFLATBTN + 10, 0, 1);
SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_RENAME), IMAGE_ICON, 16, 16, LR_SHARED));
SetWindowText(hwndAdd, TranslateT("Rename..."));
hwndAdd = GetDlgItem(hwnd, IDC_DSP_APPLY);
- SendMessage(hwndAdd, BUTTONSETASFLATBTN, 0, 1);
+ SendMessage(hwndAdd, BUTTONSETASFLATBTN, TRUE, 1);
SendMessage(hwndAdd, BUTTONSETASFLATBTN + 10, 0, 1);
SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_OPTIONS), IMAGE_ICON, 16, 16, LR_SHARED));
SetWindowText(hwndAdd, TranslateT("Apply this profile"));
diff --git a/plugins/Clist_nicer/SRC/clistmenus.cpp b/plugins/Clist_nicer/SRC/clistmenus.cpp
index bd28435954..58f6a0fcc8 100644
--- a/plugins/Clist_nicer/SRC/clistmenus.cpp
+++ b/plugins/Clist_nicer/SRC/clistmenus.cpp
@@ -113,7 +113,7 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA
SendMessage(hWnd, WM_USER + 120, 0, 0);
TranslateDialogDefault(hWnd);
hwndAdd = GetDlgItem(hWnd, IDC_IGN_ADDPERMANENTLY); // CreateWindowEx(0, _T("CLCButtonClass"), _T("FOO"), WS_VISIBLE | BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 200, 276, 106, 24, hWnd, (HMENU)IDC_IGN_ADDPERMANENTLY, g_hInst, NULL);
- SendMessage(hwndAdd, BUTTONSETASFLATBTN, 0, 1);
+ SendMessage(hwndAdd, BUTTONSETASFLATBTN, TRUE, 1);
SendMessage(hwndAdd, BUTTONSETASFLATBTN + 10, 0, 1);
SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(210), IMAGE_ICON, 16, 16, LR_SHARED));
@@ -121,7 +121,7 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA
EnableWindow(hwndAdd, cfg::getByte(hContact, "CList", "NotOnList", 0));
hwndAdd = GetDlgItem(hWnd, IDC_DSP_LOADDEFAULT); // CreateWindowEx(0, _T("CLCButtonClass"), _T("FOO"), WS_VISIBLE | BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 200, 276, 106, 24, hWnd, (HMENU)IDC_IGN_ADDPERMANENTLY, g_hInst, NULL);
- SendMessage(hwndAdd, BUTTONSETASFLATBTN, 0, 1);
+ SendMessage(hwndAdd, BUTTONSETASFLATBTN, TRUE, 1);
SendMessage(hwndAdd, BUTTONSETASFLATBTN + 10, 0, 1);
SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_DELETE), IMAGE_ICON, 16, 16, LR_SHARED));
diff --git a/plugins/Clist_nicer/SRC/extBackg.cpp b/plugins/Clist_nicer/SRC/extBackg.cpp
index 503c288d4e..4e2f0a852e 100644
--- a/plugins/Clist_nicer/SRC/extBackg.cpp
+++ b/plugins/Clist_nicer/SRC/extBackg.cpp
@@ -419,14 +419,14 @@ void SetButtonToSkinned()
SendDlgItemMessage(pcli->hwndContactList, IDC_TBMENU, BM_SETSKINNED, 0, bSkinned);
SendDlgItemMessage(pcli->hwndContactList, IDC_TBGLOBALSTATUS, BM_SETSKINNED, 0, bSkinned);
if(bSkinned) {
- SendDlgItemMessage(pcli->hwndContactList, IDC_TBMENU, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(pcli->hwndContactList, IDC_TBGLOBALSTATUS, BUTTONSETASFLATBTN, 0, 0);
+ SendDlgItemMessage(pcli->hwndContactList, IDC_TBMENU, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(pcli->hwndContactList, IDC_TBGLOBALSTATUS, BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(pcli->hwndContactList, IDC_TBGLOBALSTATUS, BUTTONSETASFLATBTN + 10, 0, 0);
SendDlgItemMessage(pcli->hwndContactList, IDC_TBMENU, BUTTONSETASFLATBTN + 10, 0, 0);
}
else {
- SendDlgItemMessage(pcli->hwndContactList, IDC_TBMENU, BUTTONSETASFLATBTN, 0, 1);
- SendDlgItemMessage(pcli->hwndContactList, IDC_TBGLOBALSTATUS, BUTTONSETASFLATBTN, 0, 1);
+ SendDlgItemMessage(pcli->hwndContactList, IDC_TBMENU, BUTTONSETASFLATBTN, TRUE, 1);
+ SendDlgItemMessage(pcli->hwndContactList, IDC_TBGLOBALSTATUS, BUTTONSETASFLATBTN, TRUE, 1);
SendDlgItemMessage(pcli->hwndContactList, IDC_TBGLOBALSTATUS, BUTTONSETASFLATBTN + 10, 0, 1);
SendDlgItemMessage(pcli->hwndContactList, IDC_TBMENU, BUTTONSETASFLATBTN + 10, 0, 1);
}
@@ -1235,10 +1235,10 @@ static void BTN_ReadItem(char *itemName, char *file)
}
newItem->hWnd = CreateWindowEx(0, MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 5, 5, pcli->hwndContactList, (HMENU)newItem->uId, g_hInst, NULL);
SendMessage(newItem->hWnd, BM_SETBTNITEM, 0, (LPARAM)newItem);
- SendMessage(newItem->hWnd, BUTTONSETASFLATBTN, 0, 0);
+ SendMessage(newItem->hWnd, BUTTONSETASFLATBTN, TRUE, 0);
SendMessage(newItem->hWnd, BUTTONSETASFLATBTN + 10, 0, 0);
if(newItem->dwFlags & BUTTON_ISTOGGLE)
- SendMessage(newItem->hWnd, BUTTONSETASPUSHBTN, 0, 0);
+ SendMessage(newItem->hWnd, BUTTONSETASPUSHBTN, TRUE, 0);
if(newItem->szTip[0])
SendMessage(newItem->hWnd, BUTTONADDTOOLTIP, (WPARAM)newItem->szTip, BATF_UNICODE);
diff --git a/plugins/Clist_nicer/SRC/viewmodes.cpp b/plugins/Clist_nicer/SRC/viewmodes.cpp
index e19a0a89c2..aecf8029e6 100644
--- a/plugins/Clist_nicer/SRC/viewmodes.cpp
+++ b/plugins/Clist_nicer/SRC/viewmodes.cpp
@@ -949,11 +949,11 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
while(_buttons[i] != 0) {
SendMessage(GetDlgItem(hwnd, _buttons[i]), BM_SETSKINNED, 0, bSkinned);
if(bSkinned) {
- SendDlgItemMessage(hwnd, _buttons[i], BUTTONSETASFLATBTN, 0, 0);
+ SendDlgItemMessage(hwnd, _buttons[i], BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(hwnd, _buttons[i], BUTTONSETASFLATBTN + 10, 0, 0);
}
else {
- SendDlgItemMessage(hwnd, _buttons[i], BUTTONSETASFLATBTN, 0, 1);
+ SendDlgItemMessage(hwnd, _buttons[i], BUTTONSETASFLATBTN, TRUE, 1);
SendDlgItemMessage(hwnd, _buttons[i], BUTTONSETASFLATBTN + 10, 0, 1);
}
i++;
diff --git a/plugins/ContactsPlus/utils.cpp b/plugins/ContactsPlus/utils.cpp
index 314e018a39..43e8bed305 100644
--- a/plugins/ContactsPlus/utils.cpp
+++ b/plugins/ContactsPlus/utils.cpp
@@ -308,7 +308,7 @@ HICON InitMButton(HWND hDlg, int idButton, LPCSTR szIcon, char* szTip)
HICON hIcon = (HICON)LoadImage(GetModuleHandle(NULL),szIcon,IMAGE_ICON,GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),0);
SendMessageT(hButton, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
- SendMessageT(hButton, BUTTONSETASFLATBTN, 0, 0);
+ SendMessageT(hButton, BUTTONSETASFLATBTN, TRUE, 0);
SendMessageT(hButton, BUTTONADDTOOLTIP, (WPARAM)Translate(szTip), 0);
return hIcon;
diff --git a/plugins/NewAwaySysMod/AwayOpt.cpp b/plugins/NewAwaySysMod/AwayOpt.cpp
index e875afe353..d40fb85b18 100644
--- a/plugins/NewAwaySysMod/AwayOpt.cpp
+++ b/plugins/NewAwaySysMod/AwayOpt.cpp
@@ -71,222 +71,10 @@ void MySetPos(HWND hwndParent)
}
}
-
-// ================================================ Popup options ================================================
-/*
-COptPage g_PopupOptPage(MOD_NAME, NULL);
-
-
-void EnablePopupOptDlgControls()
-{
- int I;
- g_PopupOptPage.PageToMem();
- int UsePopups = g_PopupOptPage.GetValue(IDC_POPUPOPTDLG_USEPOPUPS);
- for (I = 0; I < g_PopupOptPage.Items.GetSize(); I++)
- {
- switch (g_PopupOptPage.Items[I]->GetParam())
- {
- case IDC_POPUPOPTDLG_USEPOPUPS:
- {
- g_PopupOptPage.Items[I]->Enable(UsePopups);
- } break;
- case IDC_POPUPOPTDLG_DEFBGCOLOUR:
- {
- g_PopupOptPage.Items[I]->Enable(UsePopups && !g_PopupOptPage.GetValue(IDC_POPUPOPTDLG_DEFBGCOLOUR));
- } break;
- case IDC_POPUPOPTDLG_DEFTEXTCOLOUR:
- {
- g_PopupOptPage.Items[I]->Enable(UsePopups && !g_PopupOptPage.GetValue(IDC_POPUPOPTDLG_DEFTEXTCOLOUR));
- } break;
- }
- }
- if (!ServiceExists(MS_VARS_FORMATSTRING))
- {
- g_PopupOptPage.Find(IDC_POPUPOPTDLG_POPUPFORMAT)->Enable(false);
- }
- if (!ServiceExists(MS_LOGSERVICE_LOG))
- {
- g_PopupOptPage.Find(IDC_POPUPOPTDLG_LOGONLYWITHPOPUP)->Enable(false);
- }
- g_PopupOptPage.MemToPage(true);
- InvalidateRect(GetDlgItem(g_PopupOptPage.GetWnd(), IDC_POPUPOPTDLG_POPUPDELAY_SPIN), NULL, false); // update spin control
-}
-
-
-int CALLBACK PopupOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- static int ChangeLock = 0;
- static struct {
- int DlgItem, Status, IconIndex;
- } StatusButtons[] = {
- IDC_POPUPOPTDLG_ONLNOTIFY, ID_STATUS_ONLINE, ILI_PROTO_ONL,
- IDC_POPUPOPTDLG_AWAYNOTIFY, ID_STATUS_AWAY, ILI_PROTO_AWAY,
- IDC_POPUPOPTDLG_NANOTIFY, ID_STATUS_NA, ILI_PROTO_NA,
- IDC_POPUPOPTDLG_OCCNOTIFY, ID_STATUS_OCCUPIED, ILI_PROTO_OCC,
- IDC_POPUPOPTDLG_DNDNOTIFY, ID_STATUS_DND, ILI_PROTO_DND,
- IDC_POPUPOPTDLG_FFCNOTIFY, ID_STATUS_FREECHAT, ILI_PROTO_FFC
- };
- static struct {
- int DlgItem, IconIndex;
- TCHAR* Text;
- } Buttons[] = {
- IDC_POPUPOPTDLG_VARS, ILI_NOICON, LPGENT("Open Variables help dialog"),
- IDC_POPUPOPTDLG_OTHERNOTIFY, ILI_STATUS_OTHER, LPGENT("Other (XStatus)")
- };
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hwndDlg);
- ChangeLock++;
- g_PopupOptPage.SetWnd(hwndDlg);
- SendDlgItemMessage(hwndDlg, IDC_POPUPOPTDLG_POPUPFORMAT, EM_LIMITTEXT, AWAY_MSGDATA_MAX, 0);
- SendDlgItemMessage(hwndDlg, IDC_POPUPOPTDLG_POPUPDELAY, EM_LIMITTEXT, 4, 0);
- SendDlgItemMessage(hwndDlg, IDC_POPUPOPTDLG_POPUPDELAY_SPIN, UDM_SETRANGE32, -1, 9999);
-
- HWND hLCombo = GetDlgItem(hwndDlg, IDC_POPUPOPTDLG_LCLICK_ACTION);
- HWND hRCombo = GetDlgItem(hwndDlg, IDC_POPUPOPTDLG_RCLICK_ACTION);
- static struct {
- TCHAR *Text;
- int Action;
- } PopupActions[] = {
- LPGENT("Open message window"), PCA_OPENMESSAGEWND,
- LPGENT("Close popup"), PCA_CLOSEPOPUP,
- LPGENT("Open contact details window"), PCA_OPENDETAILS,
- LPGENT("Open contact menu"), PCA_OPENMENU,
- LPGENT("Open contact history"), PCA_OPENHISTORY,
- LPGENT("Open log file"), PCA_OPENLOG,
- LPGENT("Do nothing"), PCA_DONOTHING
- };
- int I;
- for (I = 0; I < lengthof(PopupActions); I++)
- {
- SendMessage(hLCombo, CB_SETITEMDATA, SendMessage(hLCombo, CB_ADDSTRING, 0, (LPARAM)TranslateTS(PopupActions[I].Text)), PopupActions[I].Action);
- SendMessage(hRCombo, CB_SETITEMDATA, SendMessage(hRCombo, CB_ADDSTRING, 0, (LPARAM)TranslateTS(PopupActions[I].Text)), PopupActions[I].Action);
- }
- for (I = 0; I < lengthof(StatusButtons); I++)
- {
- HWND hButton = GetDlgItem(hwndDlg, StatusButtons[I].DlgItem);
- SendMessage(hButton, BUTTONADDTOOLTIP, CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, StatusButtons[I].Status, GSMDF_TCHAR), BATF_TCHAR);
- SendMessage(hButton, BUTTONSETASPUSHBTN, 0, 0);
- SendMessage(hButton, BUTTONSETASFLATBTN, 0, 0);
- }
- for (I = 0; I < lengthof(Buttons); I++)
- {
- HWND hButton = GetDlgItem(hwndDlg, Buttons[I].DlgItem);
- SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(Buttons[I].Text), BATF_TCHAR);
- SendMessage(hButton, BUTTONSETASFLATBTN, 0, 0);
- }
- SendDlgItemMessage(hwndDlg, IDC_POPUPOPTDLG_OTHERNOTIFY, BUTTONSETASPUSHBTN, 0, 0);
- SendMessage(hwndDlg, UM_ICONSCHANGED, 0, 0);
- g_PopupOptPage.DBToMemToPage();
- EnablePopupOptDlgControls();
- ChangeLock--;
- MakeGroupCheckbox(GetDlgItem(hwndDlg, IDC_POPUPOPTDLG_USEPOPUPS));
- return true;
- } break;
- case UM_ICONSCHANGED:
- {
- int I;
- for (I = 0; I < lengthof(StatusButtons); I++)
- {
- SendDlgItemMessage(hwndDlg, StatusButtons[I].DlgItem, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_IconList[StatusButtons[I].IconIndex]);
- }
- for (I = 0; I < lengthof(Buttons); I++)
- {
- if (Buttons[I].IconIndex != ILI_NOICON)
- {
- SendDlgItemMessage(hwndDlg, Buttons[I].DlgItem, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_IconList[Buttons[I].IconIndex]);
- }
- }
- my_variables_skin_helpbutton(hwndDlg, IDC_POPUPOPTDLG_VARS);
- } break;
- case WM_NOTIFY:
- {
- switch (((NMHDR*)lParam)->code)
- {
- case PSN_APPLY:
- {
- g_PopupOptPage.PageToMemToDB();
- return true;
- } break;
- }
- } break;
- case WM_COMMAND:
- {
- switch (HIWORD(wParam))
- {
- case BN_CLICKED:
- {
- switch (LOWORD(wParam))
- {
- case IDC_POPUPOPTDLG_USEPOPUPS:
- case IDC_POPUPOPTDLG_DEFBGCOLOUR:
- case IDC_POPUPOPTDLG_DEFTEXTCOLOUR:
- {
- EnablePopupOptDlgControls();
- }; // go through
- case IDC_POPUPOPTDLG_ONLNOTIFY:
- case IDC_POPUPOPTDLG_AWAYNOTIFY:
- case IDC_POPUPOPTDLG_NANOTIFY:
- case IDC_POPUPOPTDLG_OCCNOTIFY:
- case IDC_POPUPOPTDLG_DNDNOTIFY:
- case IDC_POPUPOPTDLG_FFCNOTIFY:
- case IDC_POPUPOPTDLG_OTHERNOTIFY:
- case IDC_POPUPOPTDLG_LOGONLYWITHPOPUP:
- {
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
- return 0;
- } break;
- case IDC_POPUPOPTDLG_VARS:
- {
- my_variables_showhelp(hwndDlg, IDC_POPUPOPTDLG_POPUPFORMAT);
- } break;
- case IDC_POPUPOPTDLG_POPUPPREVIEW:
- {
- COptPage PreviewPopupData(g_PopupOptPage);
- PreviewPopupData.PageToMem();
- GetDynamicStatMsg(NULL, "ICQ", DBGetContactSettingDword(NULL, "ICQ", "UIN", 0)); ShowPopupNotification(PreviewPopupData, NULL, g_ProtoStates[(char*)NULL].Status);
-// SkinPlaySound(AWAYSYS_STATUSMSGREQUEST_SOUND);
- } break;
- }
- } break;
- case EN_CHANGE:
- {
- if ((LOWORD(wParam) == IDC_POPUPOPTDLG_POPUPFORMAT) || (LOWORD(wParam) == IDC_POPUPOPTDLG_POPUPDELAY))
- {
- if (!ChangeLock && g_PopupOptPage.GetWnd())
- {
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
- }
- }
- } break;
- case CBN_SELCHANGE:
-// case CPN_COLOURCHANGED:
- {
- if ((LOWORD(wParam) == IDC_POPUPOPTDLG_LCLICK_ACTION) || (LOWORD(wParam) == IDC_POPUPOPTDLG_RCLICK_ACTION) || (LOWORD(wParam) == IDC_POPUPOPTDLG_BGCOLOUR) || (LOWORD(wParam) == IDC_POPUPOPTDLG_TEXTCOLOUR))
- {
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
- }
- } break;
- }
- } break;
- case WM_DESTROY:
- {
- g_PopupOptPage.SetWnd(NULL);
- return 0;
- } break;
- }
- return 0;
-}
-*/
-
// ================================================ Message options ================================================
-
COptPage g_MessagesOptPage(MOD_NAME, NULL);
-
void EnableMessagesOptDlgControls(CMsgTree* MsgTree)
{
int I;
@@ -365,7 +153,7 @@ INT_PTR CALLBACK MessagesOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
{
HWND hButton = GetDlgItem(hwndDlg, Buttons[I].DlgItem);
SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(Buttons[I].Text), BATF_TCHAR);
- SendMessage(hButton, BUTTONSETASFLATBTN, 0, 0);
+ SendMessage(hButton, BUTTONSETASFLATBTN, TRUE, 0);
}
// now default status message buttons
for (I = 0; I < lengthof(DefMsgDlgItems); I++)
@@ -373,7 +161,7 @@ INT_PTR CALLBACK MessagesOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
HWND hButton = GetDlgItem(hwndDlg, DefMsgDlgItems[I].DlgItem);
SendMessage(hButton, BUTTONADDTOOLTIP, CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, DefMsgDlgItems[I].Status, GSMDF_TCHAR), BATF_TCHAR);
SendMessage(hButton, BUTTONSETASPUSHBTN, 0, 0);
- SendMessage(hButton, BUTTONSETASFLATBTN, 0, 0);
+ SendMessage(hButton, BUTTONSETASFLATBTN, TRUE, 0);
g_OrigDefStatusButtonMsgProc = (WNDPROC)SetWindowLongPtr(hButton, GWLP_WNDPROC, (LONG_PTR)DefStatusButtonSubclassProc);
}
SendMessage(hwndDlg, UM_ICONSCHANGED, 0, 0);
@@ -655,8 +443,8 @@ INT_PTR CALLBACK MoreOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam
{
HWND hButton = GetDlgItem(hwndDlg, StatusButtons[I].DlgItem);
SendMessage(hButton, BUTTONADDTOOLTIP, CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, StatusButtons[I].Status, GSMDF_TCHAR), BATF_TCHAR);
- SendMessage(hButton, BUTTONSETASPUSHBTN, 0, 0);
- SendMessage(hButton, BUTTONSETASFLATBTN, 0, 0);
+ SendMessage(hButton, BUTTONSETASPUSHBTN, TRUE, 0);
+ SendMessage(hButton, BUTTONSETASFLATBTN, TRUE, 0);
}
SendMessage(hwndDlg, UM_ICONSCHANGED, 0, 0);
g_MoreOptPage.DBToMemToPage();
@@ -835,12 +623,12 @@ INT_PTR CALLBACK AutoreplyOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
{
HWND hButton = GetDlgItem(hwndDlg, StatusButtons[I].DlgItem);
SendMessage(hButton, BUTTONADDTOOLTIP, CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, StatusButtons[I].Status, GSMDF_TCHAR), BATF_TCHAR);
- SendMessage(hButton, BUTTONSETASPUSHBTN, 0, 0);
- SendMessage(hButton, BUTTONSETASFLATBTN, 0, 0);
+ SendMessage(hButton, BUTTONSETASPUSHBTN, TRUE, 0);
+ SendMessage(hButton, BUTTONSETASFLATBTN, TRUE, 0);
}
HWND hButton = GetDlgItem(hwndDlg, IDC_REPLYDLG_VARS);
SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open Variables help dialog"), BATF_TCHAR);
- SendMessage(hButton, BUTTONSETASFLATBTN, 0, 0);
+ SendMessage(hButton, BUTTONSETASFLATBTN, TRUE, 0);
MakeThemedImageCheckbox(GetDlgItem(hwndDlg, IDC_MOREOPTDLG_EVNTMSG));
MakeThemedImageCheckbox(GetDlgItem(hwndDlg, IDC_MOREOPTDLG_EVNTURL));
MakeThemedImageCheckbox(GetDlgItem(hwndDlg, IDC_MOREOPTDLG_EVNTFILE));
@@ -1021,15 +809,15 @@ INT_PTR CALLBACK MessagesModernOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
{
HWND hButton = GetDlgItem(hwndDlg, Buttons[I].DlgItem);
SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(Buttons[I].Text), BATF_TCHAR);
- SendMessage(hButton, BUTTONSETASFLATBTN, 0, 0);
+ SendMessage(hButton, BUTTONSETASFLATBTN, TRUE, 0);
}
// now default status message buttons
for (I = 0; I < lengthof(DefMsgDlgItems); I++)
{
HWND hButton = GetDlgItem(hwndDlg, DefMsgDlgItems[I].DlgItem);
SendMessage(hButton, BUTTONADDTOOLTIP, CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, DefMsgDlgItems[I].Status, GSMDF_TCHAR), BATF_TCHAR);
- SendMessage(hButton, BUTTONSETASPUSHBTN, 0, 0);
- SendMessage(hButton, BUTTONSETASFLATBTN, 0, 0);
+ SendMessage(hButton, BUTTONSETASPUSHBTN, TRUE, 0);
+ SendMessage(hButton, BUTTONSETASFLATBTN, TRUE, 0);
g_OrigDefStatusButtonMsgProc = (WNDPROC)SetWindowLongPtr(hButton, GWLP_WNDPROC, (LONG_PTR)DefStatusButtonSubclassProc);
}
SendMessage(hwndDlg, UM_ICONSCHANGED, 0, 0);
diff --git a/plugins/NewAwaySysMod/SetAwayMsg.cpp b/plugins/NewAwaySysMod/SetAwayMsg.cpp
index 177a7a01e5..a35db042a9 100644
--- a/plugins/NewAwaySysMod/SetAwayMsg.cpp
+++ b/plugins/NewAwaySysMod/SetAwayMsg.cpp
@@ -764,7 +764,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
{
HWND hButton = GetDlgItem(hwndDlg, Buttons[I].DlgItem);
SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(Buttons[I].Text), BATF_TCHAR);
- SendMessage(hButton, BUTTONSETASFLATBTN, 0, 0);
+ SendMessage(hButton, BUTTONSETASFLATBTN, TRUE, 0);
}
// init tooltips
diff --git a/plugins/Popup/src/opt_adv.cpp b/plugins/Popup/src/opt_adv.cpp
index 52cc033ba3..ff804b78f3 100644
--- a/plugins/Popup/src/opt_adv.cpp
+++ b/plugins/Popup/src/opt_adv.cpp
@@ -110,7 +110,7 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
CheckDlgButton(hwnd, IDC_HPPLOG, PopUpOptions.UseHppHistoryLog);
hCtrl = GetDlgItem(hwnd, IDC_SHOWHISTORY);
- SendMessage(hCtrl, BUTTONSETASFLATBTN, 0, 0);
+ SendMessage(hCtrl, BUTTONSETASFLATBTN, TRUE, 0);
SendMessage(hCtrl, BUTTONADDTOOLTIP, (WPARAM)Translate("Popup History"), 0);
SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIcon(ICO_HISTORY,0));
diff --git a/plugins/Popup/src/opt_class.cpp b/plugins/Popup/src/opt_class.cpp
index b6376b88c0..bba0731eda 100644
--- a/plugins/Popup/src/opt_class.cpp
+++ b/plugins/Popup/src/opt_class.cpp
@@ -233,8 +233,8 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
//status buttons
for (i = 0; i < SIZEOF(statusButtons); ++i)
{
- SendDlgItemMessage(hwnd, statusButtons[i].idCtrl, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwnd, statusButtons[i].idCtrl, BUTTONSETASPUSHBTN, 0, 0);
+ SendDlgItemMessage(hwnd, statusButtons[i].idCtrl, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwnd, statusButtons[i].idCtrl, BUTTONSETASPUSHBTN, TRUE, 0);
SendDlgItemMessage(hwnd, statusButtons[i].idCtrl, BM_SETIMAGE,
IMAGE_ICON, (LPARAM)LoadSkinnedIcon(statusButtons[i].iconId));
SendDlgItemMessage(hwnd, statusButtons[i].idCtrl, BUTTONADDTOOLTIP,
diff --git a/plugins/Popup/src/opt_gen.cpp b/plugins/Popup/src/opt_gen.cpp
index e124702f80..37d6d97d0b 100644
--- a/plugins/Popup/src/opt_gen.cpp
+++ b/plugins/Popup/src/opt_gen.cpp
@@ -191,7 +191,7 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
//Configure popup area
{
hCtrl = GetDlgItem(hwnd, IDC_CUSTOMPOS);
- SendMessage(hCtrl, BUTTONSETASFLATBTN, 0, 0);
+ SendMessage(hCtrl, BUTTONSETASFLATBTN, TRUE, 0);
SendMessage(hCtrl, BUTTONADDTOOLTIP, (WPARAM)_T("Popup Area"), BATF_TCHAR);
SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIcon(ICO_OPT_RESIZE,0));
}
@@ -701,11 +701,11 @@ INT_PTR CALLBACK PositionBoxDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
hFontTitle = CreateFontIndirect(&lf);
SendMessage(GetDlgItem(hwndDlg, IDC_TITLE), WM_SETFONT, (WPARAM)hFontTitle, TRUE);
- SendMessage(GetDlgItem(hwndDlg, IDOK), BUTTONSETASFLATBTN, 0, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDOK), BUTTONSETASFLATBTN, TRUE, 0);
SendMessage(GetDlgItem(hwndDlg, IDOK), BUTTONADDTOOLTIP, (WPARAM)_T("OK"), BATF_TCHAR);
SendMessage(GetDlgItem(hwndDlg, IDOK), BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIcon(ICO_OPT_OK,0));
- SendMessage(GetDlgItem(hwndDlg, IDCANCEL), BUTTONSETASFLATBTN, 0, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDCANCEL), BUTTONSETASFLATBTN, TRUE, 0);
SendMessage(GetDlgItem(hwndDlg, IDCANCEL), BUTTONADDTOOLTIP, (WPARAM)_T("Cancel"), BATF_TCHAR);
SendMessage(GetDlgItem(hwndDlg, IDCANCEL), BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIcon(ICO_OPT_CANCEL,0));
diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp
index 207c817401..89a413e747 100644
--- a/plugins/Popup/src/opt_skins.cpp
+++ b/plugins/Popup/src/opt_skins.cpp
@@ -386,7 +386,7 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
ListBox_SetCurSel(hCtrl, ListBox_FindString(hCtrl, 0, PopUpOptions.SkinPack));
//Skin List reload button
- SendMessage(GetDlgItem(hwndDlg, IDC_BTN_RELOAD), BUTTONSETASFLATBTN, 0, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTN_RELOAD), BUTTONSETASFLATBTN, TRUE, 0);
SendMessage(GetDlgItem(hwndDlg, IDC_BTN_RELOAD), BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIcon(ICO_OPT_RELOAD,0));
SendMessage(GetDlgItem(hwndDlg, IDC_BTN_RELOAD), BUTTONADDTOOLTIP, (WPARAM)Translate("Refresh List"), 0);
diff --git a/plugins/SRMM/msgdialog.c b/plugins/SRMM/msgdialog.c
index c5fce0f782..fc01fc51bc 100644
--- a/plugins/SRMM/msgdialog.c
+++ b/plugins/SRMM/msgdialog.c
@@ -729,7 +729,7 @@ void Button_SetIcon_IcoLib(HWND hwndDlg, int itemId, int iconId, const char* too
{
HWND hWnd = GetDlgItem( hwndDlg, itemId );
SendMessage( hWnd, BM_SETIMAGE, IMAGE_ICON, ( LPARAM )LoadSkinnedIcon( iconId ));
- SendMessage( hWnd, BUTTONSETASFLATBTN, 0, 0 );
+ SendMessage( hWnd, BUTTONSETASFLATBTN, TRUE, 0 );
SendMessage( hWnd, BUTTONADDTOOLTIP, (WPARAM)tooltip, 0);
}
@@ -824,7 +824,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
Button_SetIcon_IcoLib(hwndDlg, IDC_DETAILS, SKINICON_OTHER_USERDETAILS, "View User's Details" );
Button_SetIcon_IcoLib(hwndDlg, IDC_HISTORY, SKINICON_OTHER_HISTORY, "View User's History" );
Button_SetIcon_IcoLib(hwndDlg, IDC_USERMENU, SKINICON_OTHER_DOWNARROW, "User Menu" );
- SendDlgItemMessage(hwndDlg, IDC_NAME, BUTTONSETASFLATBTN, 0, 0 );
+ SendDlgItemMessage(hwndDlg, IDC_NAME, BUTTONSETASFLATBTN, TRUE, 0 );
EnableWindow(GetDlgItem(hwndDlg, IDC_PROTOCOL), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_AVATAR), FALSE);
diff --git a/plugins/Scriver/chat/window.c b/plugins/Scriver/chat/window.c
index a1a295e49d..adae5fd909 100644
--- a/plugins/Scriver/chat/window.c
+++ b/plugins/Scriver/chat/window.c
@@ -118,17 +118,17 @@ static void InitButtons(HWND hwndDlg, SESSION_INFO* si)
SendDlgItemMessage(hwndDlg,IDC_CHAT_FILTER,BM_SETIMAGE,IMAGE_ICON,(LPARAM)GetCachedIcon(si->bFilterEnabled?"chat_filter":"chat_filter2"));
SendDlgItemMessage(hwndDlg, IDOK, BM_SETIMAGE, IMAGE_ICON, (LPARAM) GetCachedIcon("scriver_SEND"));
- SendDlgItemMessage(hwndDlg,IDC_CHAT_SMILEY, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg,IDC_CHAT_BOLD, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg,IDC_CHAT_ITALICS, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg,IDC_CHAT_UNDERLINE, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg,IDC_CHAT_BKGCOLOR, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg,IDC_CHAT_COLOR, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg,IDC_CHAT_HISTORY, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg,IDC_CHAT_SHOWNICKLIST, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg,IDC_CHAT_CHANMGR, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg,IDC_CHAT_FILTER, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg,IDOK, BUTTONSETASFLATBTN, 0, 0);
+ SendDlgItemMessage(hwndDlg,IDC_CHAT_SMILEY, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg,IDC_CHAT_BOLD, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg,IDC_CHAT_ITALICS, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg,IDC_CHAT_UNDERLINE, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg,IDC_CHAT_BKGCOLOR, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg,IDC_CHAT_COLOR, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg,IDC_CHAT_HISTORY, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg,IDC_CHAT_SHOWNICKLIST, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg,IDC_CHAT_CHANMGR, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg,IDC_CHAT_FILTER, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg,IDOK, BUTTONSETASFLATBTN, TRUE, 0);
SendMessage(GetDlgItem(hwndDlg,IDC_CHAT_SMILEY), BUTTONADDTOOLTIP, (WPARAM)Translate("Insert a smiley"), 0);
SendMessage(GetDlgItem(hwndDlg,IDC_CHAT_BOLD), BUTTONADDTOOLTIP, (WPARAM)Translate("Make the text bold (CTRL+B)"), 0);
@@ -141,13 +141,11 @@ static void InitButtons(HWND hwndDlg, SESSION_INFO* si)
SendMessage(GetDlgItem(hwndDlg,IDC_CHAT_CHANMGR), BUTTONADDTOOLTIP, (WPARAM)Translate("Control this room (CTRL+O)"), 0);
SendMessage(GetDlgItem(hwndDlg,IDC_CHAT_FILTER), BUTTONADDTOOLTIP, (WPARAM)Translate("Enable/disable the event filter (CTRL+F)"), 0);
SendMessage(GetDlgItem(hwndDlg, IDOK), BUTTONADDTOOLTIP, (WPARAM) Translate("Send Message"), 0);
- SendDlgItemMessage(hwndDlg, IDC_CHAT_BOLD, BUTTONSETASPUSHBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_CHAT_ITALICS, BUTTONSETASPUSHBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_CHAT_UNDERLINE, BUTTONSETASPUSHBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_CHAT_COLOR, BUTTONSETASPUSHBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_CHAT_BKGCOLOR, BUTTONSETASPUSHBTN, 0, 0);
-// SendDlgItemMessage(hwndDlg, IDC_CHAT_SHOWNICKLIST, BUTTONSETASPUSHBTN, 0, 0);
-// SendDlgItemMessage(hwndDlg, IDC_CHAT_FILTER, BUTTONSETASPUSHBTN, 0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CHAT_BOLD, BUTTONSETASPUSHBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CHAT_ITALICS, BUTTONSETASPUSHBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CHAT_UNDERLINE, BUTTONSETASPUSHBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CHAT_COLOR, BUTTONSETASPUSHBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CHAT_BKGCOLOR, BUTTONSETASPUSHBTN, TRUE, 0);
if (pInfo)
{
diff --git a/plugins/Scriver/msgdialog.c b/plugins/Scriver/msgdialog.c
index a260fa2034..13709baaef 100644
--- a/plugins/Scriver/msgdialog.c
+++ b/plugins/Scriver/msgdialog.c
@@ -845,7 +845,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
{
int i;
for (i = 0; i < SIZEOF(toolbarButtons) ; i++)
- SendMessage(GetDlgItem(hwndDlg, toolbarButtons[i].controlId), BUTTONSETASFLATBTN, 0, 0);
+ SendMessage(GetDlgItem(hwndDlg, toolbarButtons[i].controlId), BUTTONSETASFLATBTN, TRUE, 0);
}
SendMessage(GetDlgItem(hwndDlg, IDC_ADD), BUTTONADDTOOLTIP, (WPARAM) Translate("Add Contact Permanently to List"), 0);
SendMessage(GetDlgItem(hwndDlg, IDC_USERMENU), BUTTONADDTOOLTIP, (WPARAM) Translate("User Menu"), 0);
diff --git a/plugins/SimpleStatusMsg/msgbox.cpp b/plugins/SimpleStatusMsg/msgbox.cpp
index c6cec33b6b..d2fd146baa 100644
--- a/plugins/SimpleStatusMsg/msgbox.cpp
+++ b/plugins/SimpleStatusMsg/msgbox.cpp
@@ -1066,9 +1066,9 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
if (copy_init_data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)
{
- SendMessage(GetDlgItem(hwndDlg, IDC_BADD), BUTTONSETASFLATBTN, 0, 0);
- SendMessage(GetDlgItem(hwndDlg, IDC_BDEL), BUTTONSETASFLATBTN, 0, 0);
- SendMessage(GetDlgItem(hwndDlg, IDC_BCLEAR), BUTTONSETASFLATBTN, 0, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_BADD), BUTTONSETASFLATBTN, TRUE, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_BDEL), BUTTONSETASFLATBTN, TRUE, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_BCLEAR), BUTTONSETASFLATBTN, TRUE, 0);
}
}
else
diff --git a/plugins/SimpleStatusMsg/options.cpp b/plugins/SimpleStatusMsg/options.cpp
index c4868ddf1b..9ae8bae627 100644
--- a/plugins/SimpleStatusMsg/options.cpp
+++ b/plugins/SimpleStatusMsg/options.cpp
@@ -274,7 +274,7 @@ static INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
else
SendMessage(GetDlgItem(hwndDlg, IDC_VARSHELP), BUTTONADDTOOLTIP, (WPARAM)szTipInfo, 0);
- SendDlgItemMessage(hwndDlg, IDC_VARSHELP, BUTTONSETASFLATBTN, 0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_VARSHELP, BUTTONSETASFLATBTN, TRUE, 0);
}
ShowWindow(GetDlgItem(hwndDlg, IDC_VARSHELP), ServiceExists(MS_VARS_FORMATSTRING));
diff --git a/plugins/SmileyAdd/dlgboxsubclass.cpp b/plugins/SmileyAdd/dlgboxsubclass.cpp
index 1cec51ce5a..03a0a6e5fd 100644
--- a/plugins/SmileyAdd/dlgboxsubclass.cpp
+++ b/plugins/SmileyAdd/dlgboxsubclass.cpp
@@ -261,7 +261,7 @@ public:
}
SendMessage(hSmlButton, BUTTONADDTOOLTIP, (WPARAM)LPGEN("Show Smiley Selection Window"), 0);
- SendMessage(hSmlButton, BUTTONSETASFLATBTN, 0, 0);
+ SendMessage(hSmlButton, BUTTONSETASFLATBTN, TRUE, 0);
}
}
};
diff --git a/plugins/TabSRMM/chat/window.cpp b/plugins/TabSRMM/chat/window.cpp
index 175dc95d35..2401db2d0a 100644
--- a/plugins/TabSRMM/chat/window.cpp
+++ b/plugins/TabSRMM/chat/window.cpp
@@ -2012,7 +2012,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
BB_InitDlgButtons(dat);
DM_InitTip(dat);
- SendMessage(GetDlgItem(hwndDlg,IDC_COLOR), BUTTONSETASPUSHBTN, 0, 0);
+ SendMessage(GetDlgItem(hwndDlg,IDC_COLOR), BUTTONSETASPUSHBTN, TRUE, 0);
OldSplitterProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_SPLITTERX), GWLP_WNDPROC, (LONG_PTR)SplitterSubclassProc);
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_SPLITTERY), GWLP_WNDPROC, (LONG_PTR)SplitterSubclassProc);
@@ -2053,10 +2053,10 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
GetMYUIN(dat);
GetMyNick(dat);
- SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETASFLATBTN + 10, 0, PluginConfig.m_bIsXP);
- SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETASFLATBTN + 12, 0, (LPARAM)dat->pContainer);
- SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETASTOOLBARBUTTON, 0, 1);
+ SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETASTHEMED, PluginConfig.m_bIsXP, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONSETASTOOLBARBUTTON, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_CHAT_TOGGLESIDEBAR, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Expand or collapse the side bar"), 1);
dat->hwndIEView = dat->hwndHPP = 0;
@@ -2101,13 +2101,13 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
SendDlgItemMessage(hwndDlg, IDC_CHAT_LOG, EM_SETBKGNDCOLOR, 0, colour);
DM_InitRichEdit(dat);
- SendDlgItemMessage(hwndDlg, IDOK, BUTTONSETASFLATBTN + 14, 0, 0);
+ SendDlgItemMessage(hwndDlg, IDOK, BUTTONSETASNORMAL, TRUE, 0);
{
SendMessage(GetDlgItem(hwndDlg, IDC_LIST), LB_SETITEMHEIGHT, 0, (LPARAM)g_Settings.iNickListFontHeight);
InvalidateRect(GetDlgItem(hwndDlg, IDC_LIST), NULL, TRUE);
}
- SendDlgItemMessage(hwndDlg, IDC_FILTER, BUTTONSETOVERLAYICON, 0,
- (LPARAM)(si->bFilterEnabled ? PluginConfig.g_iconOverlayEnabled : PluginConfig.g_iconOverlayDisabled));
+ SendDlgItemMessage(hwndDlg, IDC_FILTER, BUTTONSETOVERLAYICON,
+ (LPARAM)(si->bFilterEnabled ? PluginConfig.g_iconOverlayEnabled : PluginConfig.g_iconOverlayDisabled), 0);
SendMessage(hwndDlg, WM_SIZE, 0, 0);
SendMessage(hwndDlg, GC_REDRAWLOG2, 0, 0);
}
@@ -3222,7 +3222,7 @@ LABEL_SHOWWINDOW:
UpdateReadChars(dat);
dat->dwLastActivity = GetTickCount();
dat->pContainer->dwLastActivity = dat->dwLastActivity;
- SendDlgItemMessage(hwndDlg, IDOK, BUTTONSETASFLATBTN + 14, GetRichTextLength(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE)) != 0, 0);
+ SendDlgItemMessage(hwndDlg, IDOK, BUTTONSETASNORMAL, GetRichTextLength(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE)) != 0, 0);
Utils::enableDlgControl(hwndDlg, IDOK, GetRichTextLength(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE)) != 0);
}
break;
@@ -3288,8 +3288,8 @@ LABEL_SHOWWINDOW:
} else
si->bFilterEnabled = !si->bFilterEnabled;
- SendDlgItemMessage(hwndDlg, IDC_FILTER, BUTTONSETOVERLAYICON, 0,
- (LPARAM)(si->bFilterEnabled ? PluginConfig.g_iconOverlayEnabled : PluginConfig.g_iconOverlayDisabled));
+ SendDlgItemMessage(hwndDlg, IDC_FILTER, BUTTONSETOVERLAYICON,
+ (LPARAM)(si->bFilterEnabled ? PluginConfig.g_iconOverlayEnabled : PluginConfig.g_iconOverlayDisabled), 0);
if (si->bFilterEnabled && M->GetByte("Chat", "RightClickFilter", 0) == 0) {
SendMessage(hwndDlg, GC_SHOWFILTERMENU, 0, 0);
diff --git a/plugins/TabSRMM/include/themes.h b/plugins/TabSRMM/include/themes.h
index e06110c6f3..2079b2eaa0 100644
--- a/plugins/TabSRMM/include/themes.h
+++ b/plugins/TabSRMM/include/themes.h
@@ -67,9 +67,15 @@ typedef struct {
CSideBarButton *sitem;
} MButtonCtrl;
+#define BUTTONSETASTHEMED (BUTTONSETASFLATBTN + 10)
+#define BUTTONSETASDIMMED (BUTTONSETASFLATBTN + 11)
+#define BUTTONSETCONTAINER (BUTTONSETASFLATBTN + 12)
+#define BUTTONSETASTITLE (BUTTONSETASFLATBTN + 13)
+#define BUTTONSETASNORMAL (BUTTONSETASFLATBTN + 14)
+#define BUTTONGETSTATEID (BUTTONSETASFLATBTN + 15)
#define BUTTONSETASTOOLBARBUTTON (BUTTONSETASFLATBTN + 21)
#define BUTTONSETASSIDEBARBUTTON (BUTTONSETASFLATBTN + 22)
-#define BUTTONSETOVERLAYICON (BUTTONSETASFLATBTN + 23)
+#define BUTTONSETOVERLAYICON (BUTTONSETASFLATBTN + 23)
struct AeroEffect {
TCHAR tszName[40];
diff --git a/plugins/TabSRMM/src/TSButton.cpp b/plugins/TabSRMM/src/TSButton.cpp
index 57c3221f38..7c47c1d05a 100644
--- a/plugins/TabSRMM/src/TSButton.cpp
+++ b/plugins/TabSRMM/src/TSButton.cpp
@@ -542,43 +542,43 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam,
InvalidateRect(bct->hwnd, NULL, TRUE);
break;
case BUTTONSETDEFAULT:
- bct->defbutton = wParam ? 1 : 0;
+ bct->defbutton = (wParam != 0);
InvalidateRect(bct->hwnd, NULL, TRUE);
break;
case BUTTONSETASPUSHBTN:
- bct->pushBtn = 1;
+ bct->pushBtn = (wParam != 0);
InvalidateRect(bct->hwnd, NULL, TRUE);
break;
case BUTTONSETASFLATBTN:
- bct->flatBtn = lParam == 0 ? 1 : 0;
+ bct->flatBtn = (wParam != 0);
InvalidateRect(bct->hwnd, NULL, TRUE);
break;
- case BUTTONSETASFLATBTN + 10:
- bct->bThemed = lParam ? TRUE : FALSE;
+ case BUTTONSETASTHEMED:
+ bct->bThemed = (wParam != 0);
break;
- case BUTTONSETASFLATBTN + 11:
- bct->dimmed = lParam ? TRUE : FALSE;
+ case BUTTONSETASDIMMED:
+ bct->dimmed = (wParam != 0);
break;
- case BUTTONSETASFLATBTN + 12:
- bct->pContainer = (struct TContainerData *)lParam;
+ case BUTTONSETCONTAINER:
+ bct->pContainer = (struct TContainerData *)wParam;
break;
- case BUTTONSETASFLATBTN + 13:
+ case BUTTONSETASTITLE:
bct->bTitleButton = TRUE;
break;
- case BUTTONSETASFLATBTN + 14:
+ case BUTTONSETASNORMAL:
bct->stateId = (wParam) ? PBS_NORMAL : PBS_DISABLED;
InvalidateRect(bct->hwnd, NULL, FALSE);
break;
- case BUTTONSETASFLATBTN + 15:
+ case BUTTONGETSTATEID:
return bct->stateId;
case BUTTONSETASTOOLBARBUTTON:
- bct->bToolbarButton = lParam;
+ bct->bToolbarButton = wParam;
break;
case BUTTONSETASSIDEBARBUTTON:
- bct->sitem = reinterpret_cast<CSideBarButton *>(lParam);
+ bct->sitem = reinterpret_cast<CSideBarButton *>(wParam);
break;
case BUTTONSETOVERLAYICON:
- bct->overlay = (HICON)lParam;
+ bct->overlay = (HICON)wParam;
break;
case BUTTONADDTOOLTIP: {
TOOLINFO ti;
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp
index 43115a116b..29d15161fb 100644
--- a/plugins/TabSRMM/src/buttonsbar.cpp
+++ b/plugins/TabSRMM/src/buttonsbar.cpp
@@ -213,7 +213,7 @@ void CB_ChangeButton(HWND hwndDlg, struct TWindowData *dat, CustomButtonData* cb
SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)cbd->hIcon));
if (cbd->ptszTooltip)
SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(cbd->ptszTooltip), 0);
- SendMessage(hwndBtn, BUTTONSETASFLATBTN + 12, 0, (LPARAM)dat->pContainer);
+ SendMessage(hwndBtn, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0);
}
}
@@ -567,19 +567,19 @@ void TSAPI BB_InitDlgButtons(TWindowData *dat)
if (!cbd->bDummy && !GetDlgItem(hdlg, cbd->dwButtonCID))
hwndBtn = CreateWindowEx(0, _T("TSButtonClass"), _T(""), WS_CHILD | WS_VISIBLE | WS_TABSTOP, rect.right - rwidth + gap, splitterY, cbd->iButtonWidth, DPISCALEY_S(22), hdlg, (HMENU) cbd->dwButtonCID, g_hInst, NULL);
if (!cbd->bDummy && hwndBtn) {
- SendMessage(hwndBtn, BUTTONSETASFLATBTN, 0, 0);
- SendMessage(hwndBtn, BUTTONSETASFLATBTN + 10, 0, isThemed ? 1 : 0);
+ SendMessage(hwndBtn, BUTTONSETASFLATBTN, TRUE, 0);
+ SendMessage(hwndBtn, BUTTONSETASTHEMED, isThemed != 0, 0);
if (cbd->hIcon)
SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)cbd->hIcon));
if (cbd->ptszTooltip)
SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(cbd->ptszTooltip), 0);
- SendMessage(hwndBtn, BUTTONSETASFLATBTN + 12, 0, (LPARAM)dat->pContainer);
- SendMessage(hwndBtn, BUTTONSETASTOOLBARBUTTON, 0, 1);
+ SendMessage(hwndBtn, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0);
+ SendMessage(hwndBtn, BUTTONSETASTOOLBARBUTTON, TRUE, 0);
if (hwndBtn && cbd->dwArrowCID)
SendMessage(hwndBtn, BUTTONSETARROW, cbd->dwArrowCID, 0);
if (hwndBtn && cbd->bPushButton)
- SendMessage(hwndBtn, BUTTONSETASPUSHBTN, 0, 0);
+ SendMessage(hwndBtn, BUTTONSETASPUSHBTN, TRUE, 0);
}
} else if (GetDlgItem(hdlg, cbd->dwButtonCID))
DestroyWindow(GetDlgItem(hdlg, cbd->dwButtonCID));
@@ -605,19 +605,19 @@ void TSAPI BB_InitDlgButtons(TWindowData *dat)
if (!cbd->bHidden && !cbd->bCanBeHidden)
dat->iButtonBarReallyNeeds += cbd->iButtonWidth + gap;
if (!cbd->bDummy && hwndBtn) {
- SendMessage(hwndBtn, BUTTONSETASFLATBTN, 0, 0);
- SendMessage(hwndBtn, BUTTONSETASFLATBTN + 10, 0, isThemed ? 1 : 0);
+ SendMessage(hwndBtn, BUTTONSETASFLATBTN, TRUE, 0);
+ SendMessage(hwndBtn, BUTTONSETASTHEMED, isThemed != 0, 0);
if (cbd->hIcon)
SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)cbd->hIcon));
if (cbd->ptszTooltip)
SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(cbd->ptszTooltip), 0);
- SendMessage(hwndBtn, BUTTONSETASFLATBTN + 12, 0, (LPARAM)dat->pContainer);
- SendMessage(hwndBtn, BUTTONSETASTOOLBARBUTTON, 0, 1);
+ SendMessage(hwndBtn, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0);
+ SendMessage(hwndBtn, BUTTONSETASTOOLBARBUTTON, TRUE, 0);
if (hwndBtn && cbd->dwArrowCID)
SendMessage(hwndBtn, BUTTONSETARROW, cbd->dwArrowCID, 0);
if (hwndBtn && cbd->bPushButton)
- SendMessage(hwndBtn, BUTTONSETASPUSHBTN, 0, 0);
+ SendMessage(hwndBtn, BUTTONSETASPUSHBTN, TRUE, 0);
}
} else if (GetDlgItem(hdlg, cbd->dwButtonCID))
DestroyWindow(GetDlgItem(hdlg, cbd->dwButtonCID));
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 1116c4139e..c174aed362 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -1460,13 +1460,13 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
isThemed = FALSE;
}
- SendMessage(GetDlgItem(hwndDlg, IDC_ADD), BUTTONSETASFLATBTN, 0, 0);
- SendMessage(GetDlgItem(hwndDlg, IDC_CANCELADD), BUTTONSETASFLATBTN, 0, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_ADD), BUTTONSETASFLATBTN, TRUE, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_CANCELADD), BUTTONSETASFLATBTN, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDC_TOGGLESIDEBAR, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_TOGGLESIDEBAR, BUTTONSETASFLATBTN + 10, 0, isThemed ? 1 : 0);
- SendDlgItemMessage(hwndDlg, IDC_TOGGLESIDEBAR, BUTTONSETASFLATBTN + 12, 0, (LPARAM)m_pContainer);
- SendDlgItemMessage(hwndDlg, IDC_TOGGLESIDEBAR, BUTTONSETASTOOLBARBUTTON, 0, 1);
+ SendDlgItemMessage(hwndDlg, IDC_TOGGLESIDEBAR, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_TOGGLESIDEBAR, BUTTONSETASTHEMED, isThemed != 0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_TOGGLESIDEBAR, BUTTONSETCONTAINER, (LPARAM)m_pContainer, 0);
+ SendDlgItemMessage(hwndDlg, IDC_TOGGLESIDEBAR, BUTTONSETASTOOLBARBUTTON, TRUE, 0);
TABSRMM_FireEvent(dat->hContact, hwndDlg, MSG_WINDOW_EVT_OPENING, 0);
@@ -1486,10 +1486,9 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
{
UINT _ctrls[] = {IDC_RETRY, IDC_CANCELSEND, IDC_MSGSENDLATER};
for(i = 0; i < 3; i++) {
- SendDlgItemMessage(hwndDlg, _ctrls[i], BUTTONSETASPUSHBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, _ctrls[i], BUTTONSETASFLATBTN, 0, 1);
- SendDlgItemMessage(hwndDlg, _ctrls[i], BUTTONSETASFLATBTN + 10, 0, 1);
-
+ SendDlgItemMessage(hwndDlg, _ctrls[i], BUTTONSETASPUSHBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, _ctrls[i], BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, _ctrls[i], BUTTONSETASTHEMED, TRUE, 0);
}
}
@@ -2389,7 +2388,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
dat->hTabIcon = dat->hTabStatusIcon = MY_GetContactIcon(dat);
if (M->GetByte("use_xicons", 1))
dat->hXStatusIcon = GetXStatusIcon(dat);
- SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, BUTTONSETASFLATBTN + 11, 0, dat->dwFlagsEx & MWF_SHOW_ISIDLE ? 1 : 0);
+ SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, BUTTONSETASDIMMED, (dat->dwFlagsEx & MWF_SHOW_ISIDLE) != 0, 0);
SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)(dat->hXStatusIcon ? dat->hXStatusIcon : dat->hTabIcon));
if (m_pContainer->hwndActive == hwndDlg)
@@ -2427,7 +2426,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
if (buttonicons[i].id == -1)
break;
SendDlgItemMessage(hwndDlg, buttonicons[i].id, BM_SETIMAGE, IMAGE_ICON, (LPARAM)*buttonicons[i].pIcon);
- SendDlgItemMessage(hwndDlg, buttonicons[i].id, BUTTONSETASFLATBTN + 12, 0, (LPARAM)m_pContainer);
+ SendDlgItemMessage(hwndDlg, buttonicons[i].id, BUTTONSETCONTAINER, (LPARAM)m_pContainer, 0);
}
BB_UpdateIcons(hwndDlg, dat);
SendMessage(hwndDlg, DM_UPDATEWINICON, 0, 0);
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index 27bb4741cb..770b415110 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -2213,7 +2213,7 @@ LRESULT TSAPI GetSendButtonState(HWND hwnd)
HWND hwndIDok=GetDlgItem(hwnd, IDOK);
if(hwndIDok)
- return(SendMessage(hwndIDok, BUTTONSETASFLATBTN + 15, 0, 0));
+ return(SendMessage(hwndIDok, BUTTONGETSTATEID, TRUE, 0));
else
return 0;
}
@@ -2221,13 +2221,13 @@ LRESULT TSAPI GetSendButtonState(HWND hwnd)
void TSAPI EnableSendButton(const TWindowData *dat, int iMode)
{
HWND hwndOK;
- SendMessage(GetDlgItem(dat->hwnd, IDOK), BUTTONSETASFLATBTN + 14, iMode, 0);
- SendMessage(GetDlgItem(dat->hwnd, IDC_PIC), BUTTONSETASFLATBTN + 14, dat->fEditNotesActive ? TRUE : (!iMode && dat->iOpenJobs == 0) ? TRUE : FALSE, 0);
+ SendMessage(GetDlgItem(dat->hwnd, IDOK), BUTTONSETASNORMAL, iMode, 0);
+ SendMessage(GetDlgItem(dat->hwnd, IDC_PIC), BUTTONSETASNORMAL, dat->fEditNotesActive ? TRUE : (!iMode && dat->iOpenJobs == 0) ? TRUE : FALSE, 0);
hwndOK = GetDlgItem(GetParent(GetParent(dat->hwnd)), IDOK);
if (IsWindow(hwndOK))
- SendMessage(hwndOK, BUTTONSETASFLATBTN + 14, iMode, 0);
+ SendMessage(hwndOK, BUTTONSETASNORMAL, iMode, 0);
}
void TSAPI SendNudge(const TWindowData *dat)
diff --git a/plugins/TabSRMM/src/sidebar.cpp b/plugins/TabSRMM/src/sidebar.cpp
index d5e2e86cdd..481e00f171 100644
--- a/plugins/TabSRMM/src/sidebar.cpp
+++ b/plugins/TabSRMM/src/sidebar.cpp
@@ -110,10 +110,10 @@ void CSideBarButton::_create()
0, 0, 40, 40, m_sideBar->getScrollWnd(), reinterpret_cast<HMENU>(m_id), g_hInst, NULL);
if(m_hwnd) {
- ::SendMessage(m_hwnd, BUTTONSETASSIDEBARBUTTON, 0, (LPARAM)this);
- ::SendMessage(m_hwnd, BUTTONSETASFLATBTN, 1, 1);
- ::SendMessage(m_hwnd, BUTTONSETASFLATBTN + 10, 1, 1);
- ::SendMessage(m_hwnd, BUTTONSETASFLATBTN + 12, 0, (LPARAM)m_sideBar->getContainer());
+ ::SendMessage(m_hwnd, BUTTONSETASSIDEBARBUTTON, (WPARAM)this, 0);
+ ::SendMessage(m_hwnd, BUTTONSETASFLATBTN, TRUE, 0);
+ ::SendMessage(m_hwnd, BUTTONSETASTHEMED, TRUE, 0);
+ ::SendMessage(m_hwnd, BUTTONSETCONTAINER, (LPARAM)m_sideBar->getContainer(), 0);
m_buttonControl = (MButtonCtrl *)::GetWindowLongPtr(m_hwnd, 0);
}
else
diff --git a/plugins/TipperYM/options.cpp b/plugins/TipperYM/options.cpp
index b6035e8d67..ceb4a223b5 100644
--- a/plugins/TipperYM/options.cpp
+++ b/plugins/TipperYM/options.cpp
@@ -839,7 +839,7 @@ INT_PTR CALLBACK DlgProcOptsContent(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
for (int i = 0; i < SIZEOF(btns); i++)
{
- SendDlgItemMessage(hwndDlg, btns[i].id, BUTTONSETASFLATBTN, 0, 0);
+ SendDlgItemMessage(hwndDlg, btns[i].id, BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(hwndDlg, btns[i].id, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(btns[i].swzTooltip), BATF_TCHAR);
if (btns[i].uintCoreIconId)
{
@@ -1893,19 +1893,19 @@ INT_PTR CALLBACK DlgProcOptsSkin(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
TranslateDialogDefault(hwndDlg);
iLastSel = RefreshSkinList(hwndDlg);
- SendDlgItemMessage(hwndDlg, IDC_BTN_RELOADLIST, BUTTONSETASFLATBTN, 0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_RELOADLIST, BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_BTN_RELOADLIST, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Reload skin list"), BATF_TCHAR);
HICON hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_RELOAD));
SendDlgItemMessage(hwndDlg, IDC_BTN_RELOADLIST, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
DestroyIcon(hIcon);
- SendDlgItemMessage(hwndDlg, IDC_BTN_APPLYSKIN, BUTTONSETASFLATBTN, 0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_APPLYSKIN, BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_BTN_APPLYSKIN, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Apply skin"), BATF_TCHAR);
hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_APPLY));
SendDlgItemMessage(hwndDlg, IDC_BTN_APPLYSKIN, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
DestroyIcon(hIcon);
- SendDlgItemMessage(hwndDlg, IDC_BTN_GETSKINS, BUTTONSETASFLATBTN, 0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_BTN_GETSKINS, BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_BTN_GETSKINS, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Get more skins"), BATF_TCHAR);
SendDlgItemMessage(hwndDlg, IDC_BTN_GETSKINS, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_EVENT_URL));
diff --git a/plugins/TopToolBar/toolbar.cpp b/plugins/TopToolBar/toolbar.cpp
index 3b7237512e..ab04f4e87b 100644
--- a/plugins/TopToolBar/toolbar.cpp
+++ b/plugins/TopToolBar/toolbar.cpp
@@ -386,7 +386,7 @@ int CreateOneWindow(int ButtonPos)
SetWindowLongPtr(Buttons[ButtonPos].hwnd, GWLP_USERDATA, Buttons[ButtonPos].id);
if (DBGetContactSettingByte(0, TTB_OPTDIR, "UseFlatButton", 1))
- SendMessage(Buttons[ButtonPos].hwnd, BUTTONSETASFLATBTN, 0, 0);
+ SendMessage(Buttons[ButtonPos].hwnd, BUTTONSETASFLATBTN, TRUE, 0);
return 0;
}
diff --git a/plugins/UserInfoEx/ctrl_button.cpp b/plugins/UserInfoEx/ctrl_button.cpp
index d8cbafd20b..8278b5b07d 100644
--- a/plugins/UserInfoEx/ctrl_button.cpp
+++ b/plugins/UserInfoEx/ctrl_button.cpp
@@ -562,7 +562,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L
if (bct->dwStyle & MBS_PUSHBUTTON) return bct->pbState ? BST_CHECKED : BST_UNCHECKED;
return 0;
case BUTTONSETDEFAULT:
- bct->defbutton = wParam ? 1 : 0;
+ bct->defbutton = (wParam != 0);
InvalidateRect(bct->hwnd, NULL, TRUE);
break;
case BUTTONADDTOOLTIP: