From 638ccde5cf7428b75d0de5c0254ce07261085fee Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 19 Jun 2012 17:01:50 +0000 Subject: button control moved to wParam everywhere git-svn-id: http://svn.miranda-ng.org/main/trunk@483 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/m_button.h | 9 +- plugins/BasicHistory/HistoryWindow.cpp | 4 +- plugins/BossKeyPlus/Options.cpp | 2 +- plugins/CSList/cslist.cpp | 2 +- plugins/Chat/window.c | 34 ++-- plugins/Clist_modern/modern_tbbutton.cpp | 37 ++--- plugins/Clist_modern/modern_toolbar.cpp | 2 +- plugins/Clist_modern/modern_viewmodebar.cpp | 10 +- plugins/Clist_nicer/SRC/clcopts.cpp | 8 +- plugins/Clist_nicer/SRC/clistmenus.cpp | 4 +- plugins/Clist_nicer/SRC/extBackg.cpp | 12 +- plugins/Clist_nicer/SRC/viewmodes.cpp | 4 +- plugins/ContactsPlus/utils.cpp | 2 +- plugins/NewAwaySysMod/AwayOpt.cpp | 232 ++-------------------------- plugins/NewAwaySysMod/SetAwayMsg.cpp | 2 +- plugins/Popup/src/opt_adv.cpp | 2 +- plugins/Popup/src/opt_class.cpp | 4 +- plugins/Popup/src/opt_gen.cpp | 6 +- plugins/Popup/src/opt_skins.cpp | 2 +- plugins/SRMM/msgdialog.c | 4 +- plugins/Scriver/chat/window.c | 34 ++-- plugins/Scriver/msgdialog.c | 2 +- plugins/SimpleStatusMsg/msgbox.cpp | 6 +- plugins/SimpleStatusMsg/options.cpp | 2 +- plugins/SmileyAdd/dlgboxsubclass.cpp | 2 +- plugins/TabSRMM/chat/window.cpp | 22 +-- plugins/TabSRMM/include/themes.h | 8 +- plugins/TabSRMM/src/TSButton.cpp | 30 ++-- plugins/TabSRMM/src/buttonsbar.cpp | 22 +-- plugins/TabSRMM/src/msgdialog.cpp | 23 ++- plugins/TabSRMM/src/msgdlgutils.cpp | 8 +- plugins/TabSRMM/src/sidebar.cpp | 8 +- plugins/TipperYM/options.cpp | 8 +- plugins/TopToolBar/toolbar.cpp | 2 +- plugins/UserInfoEx/ctrl_button.cpp | 2 +- protocols/AimOscar/ui.cpp | 2 +- protocols/Gadu-Gadu/image.c | 8 +- protocols/IRCG/ui_utils.cpp | 4 +- protocols/JabberG/jabber_chat.cpp | 4 +- protocols/JabberG/jabber_console.cpp | 4 +- protocols/JabberG/jabber_groupchat.cpp | 4 +- protocols/JabberG/jabber_iqid_muc.cpp | 4 +- protocols/JabberG/jabber_userinfo.cpp | 2 +- protocols/JabberG/jabber_vcard.cpp | 4 +- protocols/JabberG/ui_utils.cpp | 4 +- protocols/Weather/weather_contacts.cpp | 14 +- protocols/Weather/weather_ini.cpp | 8 +- protocols/Weather/weather_opt.cpp | 20 +-- protocols/Weather/weather_popup.cpp | 10 +- protocols/Weather/weather_userinfo.cpp | 2 +- src/modules/button/button.cpp | 6 +- src/modules/skin/skinicons.cpp | 2 +- src/modules/skin/sounds.cpp | 3 +- src/modules/srfile/filexferdlg.cpp | 6 +- 54 files changed, 229 insertions(+), 443 deletions(-) diff --git a/include/m_button.h b/include/m_button.h index cb2528c4ce..d5742ce4b0 100644 --- a/include/m_button.h +++ b/include/m_button.h @@ -43,13 +43,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define BUTTONSETDEFAULT (WM_USER+2) // Sets the button as a push button -// wParam = lParam = not used -// Usage: SendMessage(hwndbutton, BUTTONSETASPUSHBTN, 0, 0); +// wParam = TRUE/FALSE default on/off +// lParam = not used +// Usage: SendMessage(hwndbutton, BUTTONSETASPUSHBTN, 1, 0); // Only works on MButtonClass buttons #define BUTTONSETASPUSHBTN (WM_USER+3) // Sets the button type as a flat button without borders v0.3.3+ -// Usage: SendMessage(hwndbutton, BUTTONSETASFLATBTN, 0, 0); +// wParam = TRUE/FALSE default on/off +// lParam = not used +// Usage: SendMessage(hwndbutton, BUTTONSETASFLATBTN, 1, 0); // Only works on MButtonClass buttons #define BUTTONSETASFLATBTN (WM_USER+4) 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(lParam); + bct->sitem = reinterpret_cast(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(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: diff --git a/protocols/AimOscar/ui.cpp b/protocols/AimOscar/ui.cpp index 87bedbbff8..d4a8116ecd 100644 --- a/protocols/AimOscar/ui.cpp +++ b/protocols/AimOscar/ui.cpp @@ -89,7 +89,7 @@ static INT_PTR CALLBACK userinfo_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, L { case WM_INITDIALOG: { - SendDlgItemMessage(hwndDlg, IDC_BOLD, BUTTONSETASPUSHBTN, 0, 0); + SendDlgItemMessage(hwndDlg, IDC_BOLD, BUTTONSETASPUSHBTN, TRUE, 0); SendDlgItemMessage(hwndDlg, IDC_PROFILE, EM_SETEVENTMASK, 0, ENM_CHANGE|ENM_SELCHANGE|ENM_REQUESTRESIZE); SendDlgItemMessage(hwndDlg, IDC_BACKGROUNDCOLORPICKER, CPM_SETCOLOUR, 0, 0x00ffffff); LOGFONT lf ={0}; diff --git a/protocols/Gadu-Gadu/image.c b/protocols/Gadu-Gadu/image.c index b04bb758b4..a602bf02d8 100644 --- a/protocols/Gadu-Gadu/image.c +++ b/protocols/Gadu-Gadu/image.c @@ -382,10 +382,10 @@ static INT_PTR CALLBACK gg_img_dlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, LP else gg_netlog(dat->gg, "gg_img_dlgproc(): Creation event not found, but someone might be waiting."); // Making buttons flat - SendDlgItemMessage(hwndDlg, IDC_IMG_PREV, BUTTONSETASFLATBTN, 0, 0); - SendDlgItemMessage(hwndDlg, IDC_IMG_NEXT, BUTTONSETASFLATBTN, 0, 0); - SendDlgItemMessage(hwndDlg, IDC_IMG_DELETE, BUTTONSETASFLATBTN, 0, 0); - SendDlgItemMessage(hwndDlg, IDC_IMG_SAVE, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage(hwndDlg, IDC_IMG_PREV, BUTTONSETASFLATBTN, TRUE, 0); + SendDlgItemMessage(hwndDlg, IDC_IMG_NEXT, BUTTONSETASFLATBTN, TRUE, 0); + SendDlgItemMessage(hwndDlg, IDC_IMG_DELETE, BUTTONSETASFLATBTN, TRUE, 0); + SendDlgItemMessage(hwndDlg, IDC_IMG_SAVE, BUTTONSETASFLATBTN, TRUE, 0); // Setting images for buttons SendDlgItemMessage(hwndDlg, IDC_IMG_PREV, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadIconEx("previous", FALSE)); diff --git a/protocols/IRCG/ui_utils.cpp b/protocols/IRCG/ui_utils.cpp index 5e3a41fb87..3f8cb48029 100644 --- a/protocols/IRCG/ui_utils.cpp +++ b/protocols/IRCG/ui_utils.cpp @@ -571,12 +571,12 @@ void CCtrlMButton::OnInit() void CCtrlMButton::MakeFlat() { - SendMessage(m_hwnd, BUTTONSETASFLATBTN, 0, 0); + SendMessage(m_hwnd, BUTTONSETASFLATBTN, TRUE, 0); } void CCtrlMButton::MakePush() { - SendMessage(m_hwnd, BUTTONSETASPUSHBTN, 0, 0); + SendMessage(m_hwnd, BUTTONSETASPUSHBTN, TRUE, 0); } ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/protocols/JabberG/jabber_chat.cpp b/protocols/JabberG/jabber_chat.cpp index 1411cef967..b90ce80d6a 100644 --- a/protocols/JabberG/jabber_chat.cpp +++ b/protocols/JabberG/jabber_chat.cpp @@ -910,11 +910,11 @@ static LRESULT CALLBACK sttUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam SendDlgItemMessage(hwndDlg, IDC_TXT_NICK, WM_SETFONT, (WPARAM)hfnt, TRUE); SendDlgItemMessage(hwndDlg, IDC_BTN_AFFILIATION, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_EVENT_FILE)); - SendDlgItemMessage(hwndDlg, IDC_BTN_AFFILIATION, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage(hwndDlg, IDC_BTN_AFFILIATION, BUTTONSETASFLATBTN, TRUE, 0); SendDlgItemMessage(hwndDlg, IDC_BTN_AFFILIATION, BUTTONADDTOOLTIP, (WPARAM)"Apply", 0); SendDlgItemMessage(hwndDlg, IDC_BTN_ROLE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_EVENT_FILE)); - SendDlgItemMessage(hwndDlg, IDC_BTN_ROLE, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage(hwndDlg, IDC_BTN_ROLE, BUTTONSETASFLATBTN, TRUE, 0); SendDlgItemMessage(hwndDlg, IDC_BTN_ROLE, BUTTONADDTOOLTIP, (WPARAM)"Apply", 0); SendDlgItemMessage(hwndDlg, IDC_ICO_STATUS, STM_SETICON, (WPARAM)LoadSkinnedProtoIcon(dat->ppro->m_szModuleName, dat->him->status), 0); diff --git a/protocols/JabberG/jabber_console.cpp b/protocols/JabberG/jabber_console.cpp index 0f728b25ec..9772446e4d 100644 --- a/protocols/JabberG/jabber_console.cpp +++ b/protocols/JabberG/jabber_console.cpp @@ -412,9 +412,9 @@ void CJabberDlgConsole::OnInitDialog() for (i = 0; i < SIZEOF(buttons); ++i) { SendDlgItemMessage(m_hwnd, buttons[i].idc, BM_SETIMAGE, IMAGE_ICON, (LPARAM)m_proto->LoadIconEx(buttons[i].icon)); - SendDlgItemMessage(m_hwnd, buttons[i].idc, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage(m_hwnd, buttons[i].idc, BUTTONSETASFLATBTN, TRUE, 0); SendDlgItemMessage(m_hwnd, buttons[i].idc, BUTTONADDTOOLTIP, (WPARAM)buttons[i].title, 0); - if (buttons[i].push) SendDlgItemMessage(m_hwnd, buttons[i].idc, BUTTONSETASPUSHBTN, 0, 0); + if (buttons[i].push) SendDlgItemMessage(m_hwnd, buttons[i].idc, BUTTONSETASPUSHBTN, TRUE, 0); if (buttons[i].pushed) CheckDlgButton(m_hwnd, buttons[i].idc, TRUE); } diff --git a/protocols/JabberG/jabber_groupchat.cpp b/protocols/JabberG/jabber_groupchat.cpp index 6a60c59113..de458a46e9 100644 --- a/protocols/JabberG/jabber_groupchat.cpp +++ b/protocols/JabberG/jabber_groupchat.cpp @@ -547,9 +547,9 @@ void CJabberDlgGcJoin::OnInitDialog() } SendDlgItemMessage(m_hwnd, IDC_BOOKMARKS, BM_SETIMAGE, IMAGE_ICON, (LPARAM)m_proto->LoadIconEx("bookmarks")); - SendDlgItemMessage(m_hwnd, IDC_BOOKMARKS, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage(m_hwnd, IDC_BOOKMARKS, BUTTONSETASFLATBTN, TRUE, 0); SendDlgItemMessage(m_hwnd, IDC_BOOKMARKS, BUTTONADDTOOLTIP, (WPARAM)"Bookmarks", 0); - SendDlgItemMessage(m_hwnd, IDC_BOOKMARKS, BUTTONSETASPUSHBTN, 0, 0); + SendDlgItemMessage(m_hwnd, IDC_BOOKMARKS, BUTTONSETASPUSHBTN, TRUE, 0); m_proto->ComboLoadRecentStrings(m_hwnd, IDC_SERVER, "joinWnd_rcSvr"); diff --git a/protocols/JabberG/jabber_iqid_muc.cpp b/protocols/JabberG/jabber_iqid_muc.cpp index 9cd4cdb51c..641988d280 100644 --- a/protocols/JabberG/jabber_iqid_muc.cpp +++ b/protocols/JabberG/jabber_iqid_muc.cpp @@ -198,10 +198,10 @@ static INT_PTR CALLBACK JabberMucJidListDlgProc( HWND hwndDlg, UINT msg, WPARAM for (int i = 0; i < SIZEOF(buttons); ++i) { SendDlgItemMessage(hwndDlg, buttons[i].idc, BM_SETIMAGE, IMAGE_ICON, (LPARAM)dat->ppro->LoadIconEx(buttons[i].icon)); - SendDlgItemMessage(hwndDlg, buttons[i].idc, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage(hwndDlg, buttons[i].idc, BUTTONSETASFLATBTN, TRUE, 0); SendDlgItemMessage(hwndDlg, buttons[i].idc, BUTTONADDTOOLTIP, (WPARAM)buttons[i].title, 0); if (buttons[i].push) - SendDlgItemMessage(hwndDlg, buttons[i].idc, BUTTONSETASPUSHBTN, 0, 0); + SendDlgItemMessage(hwndDlg, buttons[i].idc, BUTTONSETASPUSHBTN, TRUE, 0); } Utils_RestoreWindowPosition(hwndDlg, NULL, dat->ppro->m_szModuleName, "jidListWnd_"); diff --git a/protocols/JabberG/jabber_userinfo.cpp b/protocols/JabberG/jabber_userinfo.cpp index 713b838262..dc433f9b93 100644 --- a/protocols/JabberG/jabber_userinfo.cpp +++ b/protocols/JabberG/jabber_userinfo.cpp @@ -628,7 +628,7 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc( HWND hwndDlg, UINT msg, WPARAM w photoInfo->hBitmap = NULL; SetWindowLongPtr( hwndDlg, GWLP_USERDATA, ( LONG_PTR ) photoInfo ); SendDlgItemMessage( hwndDlg, IDC_SAVE, BM_SETIMAGE, IMAGE_ICON, ( LPARAM )LoadImage( hInst, MAKEINTRESOURCE( IDI_SAVE ), IMAGE_ICON, GetSystemMetrics( SM_CXSMICON ), GetSystemMetrics( SM_CYSMICON ), 0 )); - SendDlgItemMessage( hwndDlg, IDC_SAVE, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage( hwndDlg, IDC_SAVE, BUTTONSETASFLATBTN, TRUE, 0); ShowWindow( GetDlgItem( hwndDlg, IDC_LOAD ), SW_HIDE ); ShowWindow( GetDlgItem( hwndDlg, IDC_DELETE ), SW_HIDE ); break; diff --git a/protocols/JabberG/jabber_vcard.cpp b/protocols/JabberG/jabber_vcard.cpp index 470eac42c6..f8edc245ae 100644 --- a/protocols/JabberG/jabber_vcard.cpp +++ b/protocols/JabberG/jabber_vcard.cpp @@ -273,9 +273,9 @@ static INT_PTR CALLBACK PhotoDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam, LPA if (!lParam) break; // Launched from userinfo TranslateDialogDefault( hwndDlg ); SendDlgItemMessage( hwndDlg, IDC_LOAD, BM_SETIMAGE, IMAGE_ICON, ( LPARAM )LoadImage( hInst, MAKEINTRESOURCE( IDI_OPEN ), IMAGE_ICON, GetSystemMetrics( SM_CXSMICON ), GetSystemMetrics( SM_CYSMICON ), 0 )); - SendDlgItemMessage( hwndDlg, IDC_LOAD, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage( hwndDlg, IDC_LOAD, BUTTONSETASFLATBTN, TRUE, 0); SendDlgItemMessage( hwndDlg, IDC_DELETE, BM_SETIMAGE, IMAGE_ICON, ( LPARAM )LoadImage( hInst, MAKEINTRESOURCE( IDI_DELETE ), IMAGE_ICON, GetSystemMetrics( SM_CXSMICON ), GetSystemMetrics( SM_CYSMICON ), 0 )); - SendDlgItemMessage( hwndDlg, IDC_DELETE, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage( hwndDlg, IDC_DELETE, BUTTONSETASFLATBTN, TRUE, 0); ShowWindow( GetDlgItem( hwndDlg, IDC_SAVE ), SW_HIDE ); { dat = new PhotoDlgProcData; diff --git a/protocols/JabberG/ui_utils.cpp b/protocols/JabberG/ui_utils.cpp index b12e413c81..4386a02a53 100644 --- a/protocols/JabberG/ui_utils.cpp +++ b/protocols/JabberG/ui_utils.cpp @@ -575,12 +575,12 @@ void CCtrlMButton::OnInit() void CCtrlMButton::MakeFlat() { - SendMessage(m_hwnd, BUTTONSETASFLATBTN, 0, 0); + SendMessage(m_hwnd, BUTTONSETASFLATBTN, TRUE, 0); } void CCtrlMButton::MakePush() { - SendMessage(m_hwnd, BUTTONSETASPUSHBTN, 0, 0); + SendMessage(m_hwnd, BUTTONSETASPUSHBTN, TRUE, 0); } ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/protocols/Weather/weather_contacts.cpp b/protocols/Weather/weather_contacts.cpp index 45c322d640..4bf81197d3 100644 --- a/protocols/Weather/weather_contacts.cpp +++ b/protocols/Weather/weather_contacts.cpp @@ -161,13 +161,13 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa SendDlgItemMessage(hwndDlg, IDC_RESET2, BM_SETIMAGE, IMAGE_ICON, (LPARAM)wndData->hRename); // make all buttons flat - SendDlgItemMessage(hwndDlg, IDC_GETNAME, BUTTONSETASFLATBTN, 0, 0); - SendDlgItemMessage(hwndDlg, IDC_SVCINFO, BUTTONSETASFLATBTN, 0, 0); - SendDlgItemMessage(hwndDlg, IDC_BROWSE, BUTTONSETASFLATBTN, 0, 0); - SendDlgItemMessage(hwndDlg, IDC_VIEW1, BUTTONSETASFLATBTN, 0, 0); - SendDlgItemMessage(hwndDlg, IDC_RESET1, BUTTONSETASFLATBTN, 0, 0); - SendDlgItemMessage(hwndDlg, IDC_VIEW2, BUTTONSETASFLATBTN, 0, 0); - SendDlgItemMessage(hwndDlg, IDC_RESET2, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage(hwndDlg, IDC_GETNAME, BUTTONSETASFLATBTN, TRUE, 0); + SendDlgItemMessage(hwndDlg, IDC_SVCINFO, BUTTONSETASFLATBTN, TRUE, 0); + SendDlgItemMessage(hwndDlg, IDC_BROWSE, BUTTONSETASFLATBTN, TRUE, 0); + SendDlgItemMessage(hwndDlg, IDC_VIEW1, BUTTONSETASFLATBTN, TRUE, 0); + SendDlgItemMessage(hwndDlg, IDC_RESET1, BUTTONSETASFLATBTN, TRUE, 0); + SendDlgItemMessage(hwndDlg, IDC_VIEW2, BUTTONSETASFLATBTN, TRUE, 0); + SendDlgItemMessage(hwndDlg, IDC_RESET2, BUTTONSETASFLATBTN, TRUE, 0); // set tooltip for the buttons SendDlgItemMessage(hwndDlg, IDC_GETNAME, BUTTONADDTOOLTIP, (WPARAM)"Get city name from ID", 0); diff --git a/protocols/Weather/weather_ini.cpp b/protocols/Weather/weather_ini.cpp index 6273ecad50..c533ed9bc4 100644 --- a/protocols/Weather/weather_ini.cpp +++ b/protocols/Weather/weather_ini.cpp @@ -548,10 +548,10 @@ INT_PTR CALLBACK DlgProcSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar TranslateDialogDefault(hwndDlg); // make the buttons flat - SendMessage(GetDlgItem(hwndDlg,IDC_STEP1), BUTTONSETASFLATBTN, 0, 0); - SendMessage(GetDlgItem(hwndDlg,IDC_STEP2), BUTTONSETASFLATBTN, 0, 0); - SendMessage(GetDlgItem(hwndDlg,IDC_STEP3), BUTTONSETASFLATBTN, 0, 0); - SendMessage(GetDlgItem(hwndDlg,IDC_STEP4), BUTTONSETASFLATBTN, 0, 0); + SendMessage(GetDlgItem(hwndDlg,IDC_STEP1), BUTTONSETASFLATBTN, TRUE, 0); + SendMessage(GetDlgItem(hwndDlg,IDC_STEP2), BUTTONSETASFLATBTN, TRUE, 0); + SendMessage(GetDlgItem(hwndDlg,IDC_STEP3), BUTTONSETASFLATBTN, TRUE, 0); + SendMessage(GetDlgItem(hwndDlg,IDC_STEP4), BUTTONSETASFLATBTN, TRUE, 0); // set icons SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadIconEx("main", TRUE)); diff --git a/protocols/Weather/weather_opt.cpp b/protocols/Weather/weather_opt.cpp index 68dea66ff6..e896ec5fc0 100644 --- a/protocols/Weather/weather_opt.cpp +++ b/protocols/Weather/weather_opt.cpp @@ -504,16 +504,16 @@ INT_PTR CALLBACK DlgProcText(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) SetDlgItemText(hdlg, IDC_VARLIST, str); // make the more variable and other buttons flat - SendMessage(GetDlgItem(hdlg,IDC_MORE), BUTTONSETASFLATBTN, 0, 0); - SendMessage(GetDlgItem(hdlg,IDC_TM1), BUTTONSETASFLATBTN, 0, 0); - SendMessage(GetDlgItem(hdlg,IDC_TM2), BUTTONSETASFLATBTN, 0, 0); - SendMessage(GetDlgItem(hdlg,IDC_TM3), BUTTONSETASFLATBTN, 0, 0); - SendMessage(GetDlgItem(hdlg,IDC_TM4), BUTTONSETASFLATBTN, 0, 0); - SendMessage(GetDlgItem(hdlg,IDC_TM5), BUTTONSETASFLATBTN, 0, 0); - SendMessage(GetDlgItem(hdlg,IDC_TM6), BUTTONSETASFLATBTN, 0, 0); - SendMessage(GetDlgItem(hdlg,IDC_TM7), BUTTONSETASFLATBTN, 0, 0); - SendMessage(GetDlgItem(hdlg,IDC_TM8), BUTTONSETASFLATBTN, 0, 0); - SendMessage(GetDlgItem(hdlg,IDC_RESET), BUTTONSETASFLATBTN, 0, 0); + SendMessage(GetDlgItem(hdlg,IDC_MORE), BUTTONSETASFLATBTN, TRUE, 0); + SendMessage(GetDlgItem(hdlg,IDC_TM1), BUTTONSETASFLATBTN, TRUE, 0); + SendMessage(GetDlgItem(hdlg,IDC_TM2), BUTTONSETASFLATBTN, TRUE, 0); + SendMessage(GetDlgItem(hdlg,IDC_TM3), BUTTONSETASFLATBTN, TRUE, 0); + SendMessage(GetDlgItem(hdlg,IDC_TM4), BUTTONSETASFLATBTN, TRUE, 0); + SendMessage(GetDlgItem(hdlg,IDC_TM5), BUTTONSETASFLATBTN, TRUE, 0); + SendMessage(GetDlgItem(hdlg,IDC_TM6), BUTTONSETASFLATBTN, TRUE, 0); + SendMessage(GetDlgItem(hdlg,IDC_TM7), BUTTONSETASFLATBTN, TRUE, 0); + SendMessage(GetDlgItem(hdlg,IDC_TM8), BUTTONSETASFLATBTN, TRUE, 0); + SendMessage(GetDlgItem(hdlg,IDC_RESET), BUTTONSETASFLATBTN, TRUE, 0); // load the settings LoadTextSettings(hdlg); opt_startup = FALSE; diff --git a/protocols/Weather/weather_popup.cpp b/protocols/Weather/weather_popup.cpp index 88133f8a2d..5a912714c9 100644 --- a/protocols/Weather/weather_popup.cpp +++ b/protocols/Weather/weather_popup.cpp @@ -298,11 +298,11 @@ INT_PTR CALLBACK DlgPopUpOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) EnableWindow(GetDlgItem(hdlg, IDC_TEXTCOLOUR), !opt.UseWinColors); // buttons - SendMessage(GetDlgItem(hdlg,IDC_PREVIEW), BUTTONSETASFLATBTN, 0, 0); - SendMessage(GetDlgItem(hdlg,IDC_PDEF), BUTTONSETASFLATBTN, 0, 0); - SendMessage(GetDlgItem(hdlg,IDC_LeftClick), BUTTONSETASFLATBTN, 0, 0); - SendMessage(GetDlgItem(hdlg,IDC_RightClick), BUTTONSETASFLATBTN, 0, 0); - SendMessage(GetDlgItem(hdlg,IDC_VAR3), BUTTONSETASFLATBTN, 0, 0); + SendMessage(GetDlgItem(hdlg,IDC_PREVIEW), BUTTONSETASFLATBTN, TRUE, 0); + SendMessage(GetDlgItem(hdlg,IDC_PDEF), BUTTONSETASFLATBTN, TRUE, 0); + SendMessage(GetDlgItem(hdlg,IDC_LeftClick), BUTTONSETASFLATBTN, TRUE, 0); + SendMessage(GetDlgItem(hdlg,IDC_RightClick), BUTTONSETASFLATBTN, TRUE, 0); + SendMessage(GetDlgItem(hdlg,IDC_VAR3), BUTTONSETASFLATBTN, TRUE, 0); return TRUE; case WM_COMMAND: diff --git a/protocols/Weather/weather_userinfo.cpp b/protocols/Weather/weather_userinfo.cpp index 9041805fbd..066b004062 100644 --- a/protocols/Weather/weather_userinfo.cpp +++ b/protocols/Weather/weather_userinfo.cpp @@ -74,7 +74,7 @@ INT_PTR CALLBACK DlgProcUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa switch (msg) { case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); - SendMessage(GetDlgItem(hwndDlg,IDC_MOREDETAIL), BUTTONSETASFLATBTN, 0, 0); + SendMessage(GetDlgItem(hwndDlg,IDC_MOREDETAIL), BUTTONSETASFLATBTN, TRUE, 0); // save the contact handle for later use hContact = (HANDLE)lParam; SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)hContact); diff --git a/src/modules/button/button.cpp b/src/modules/button/button.cpp index ac1b301c4a..32ade1cd7a 100644 --- a/src/modules/button/button.cpp +++ b/src/modules/button/button.cpp @@ -447,17 +447,17 @@ static LRESULT CALLBACK MButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, L 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 = 1; + bct->flatBtn = (wParam != 0); InvalidateRect(bct->hwnd, NULL, TRUE); break; diff --git a/src/modules/skin/skinicons.cpp b/src/modules/skin/skinicons.cpp index 787d22eca9..777cc19757 100644 --- a/src/modules/skin/skinicons.cpp +++ b/src/modules/skin/skinicons.cpp @@ -203,7 +203,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)LoadSkinIcon(iconId)); - SendMessage(hWnd, BUTTONSETASFLATBTN, 0, 0); + SendMessage(hWnd, BUTTONSETASFLATBTN, TRUE, 0); SendMessage(hWnd, BUTTONADDTOOLTIP, (WPARAM)tooltip, 0); } diff --git a/src/modules/skin/sounds.cpp b/src/modules/skin/sounds.cpp index 4bd66ff50b..88c75b6d14 100644 --- a/src/modules/skin/sounds.cpp +++ b/src/modules/skin/sounds.cpp @@ -22,7 +22,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "..\..\core\commonheaders.h" -struct SoundItem { +struct SoundItem +{ char* name; TCHAR* section; TCHAR* description; diff --git a/src/modules/srfile/filexferdlg.cpp b/src/modules/srfile/filexferdlg.cpp index 7864eb5a96..743e220051 100644 --- a/src/modules/srfile/filexferdlg.cpp +++ b/src/modules/srfile/filexferdlg.cpp @@ -284,14 +284,14 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR SendDlgItemMessage(hwndDlg, IDC_CONTACT, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedProtoIcon((char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)dat->hContact, 0), ID_STATUS_ONLINE)); SendDlgItemMessage(hwndDlg, IDC_CONTACT, BUTTONADDTOOLTIP, (WPARAM)LPGEN("Contact menu"), 0); - SendDlgItemMessage(hwndDlg, IDC_CONTACT, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage(hwndDlg, IDC_CONTACT, BUTTONSETASFLATBTN, TRUE, 0); Button_SetIcon_IcoLib(hwndDlg, IDC_OPENFILE, SKINICON_OTHER_DOWNARROW, LPGEN("Open...")); - SendDlgItemMessage(hwndDlg, IDC_OPENFILE, BUTTONSETASPUSHBTN, 0, 0); + SendDlgItemMessage(hwndDlg, IDC_OPENFILE, BUTTONSETASPUSHBTN, TRUE, 0); SendDlgItemMessage(hwndDlg, IDC_OPENFOLDER, BM_SETIMAGE, IMAGE_ICON, (LPARAM)dat->hIconFolder); SendDlgItemMessage(hwndDlg, IDC_OPENFOLDER, BUTTONADDTOOLTIP, (WPARAM)LPGEN("Open folder"), 0); - SendDlgItemMessage(hwndDlg, IDC_OPENFOLDER, BUTTONSETASFLATBTN, 0, 0); + SendDlgItemMessage(hwndDlg, IDC_OPENFOLDER, BUTTONSETASFLATBTN, TRUE, 0); Button_SetIcon_IcoLib(hwndDlg, IDCANCEL, SKINICON_OTHER_DELETE, LPGEN("Cancel")); -- cgit v1.2.3