From 6a32de54e79c7f572f552922aed3273206298f92 Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Sat, 13 Dec 2014 23:12:37 +0000 Subject: SendDlgItemMessage(..., ..., BM_GETCHECK,0,0) -> IsDlgButtonChecked(..., ...) git-svn-id: http://svn.miranda-ng.org/main/trunk@11385 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/BuddyExpectator/src/options.cpp | 32 +++++----- plugins/ChangeKeyboardLayout/src/options.cpp | 42 ++++++------- plugins/Clist_nicer/src/clistmenus.cpp | 4 +- plugins/ContactsPlus/src/receive.cpp | 2 +- plugins/HistoryLinkListPlus/src/linklist_dlg.cpp | 36 +++++------ plugins/NotesAndReminders/src/reminders.cpp | 4 +- plugins/SecureIM/src/options.cpp | 34 +++++----- plugins/SeenPlugin/src/history.cpp | 2 +- plugins/Spamotron/src/options.cpp | 51 ++++++++------- plugins/Spamotron/src/popups.cpp | 34 +++++----- plugins/StopSpamMod/src/options.cpp | 40 ++++++------ plugins/StopSpamPlus/src/options.cpp | 12 ++-- plugins/UserInfoEx/src/psp_general.cpp | 4 +- plugins/UserInfoEx/src/psp_options.cpp | 20 +++--- plugins/YARelay/src/options.cpp | 24 +++---- protocols/JabberG/src/jabber_bookmarks.cpp | 6 +- protocols/JabberG/src/jabber_privacy.cpp | 8 +-- protocols/SkypeClassic/src/skypeopt.cpp | 80 ++++++++++++------------ 18 files changed, 216 insertions(+), 219 deletions(-) diff --git a/plugins/BuddyExpectator/src/options.cpp b/plugins/BuddyExpectator/src/options.cpp index f9862248ee..8a9bf88b87 100644 --- a/plugins/BuddyExpectator/src/options.cpp +++ b/plugins/BuddyExpectator/src/options.cpp @@ -229,16 +229,16 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, default: options.iSilencePeriod = num; break; } - options.iShowPopup = SendDlgItemMessage(hwndDlg, IDC_CHECK_POPUP, BM_GETCHECK, 0, 0) == BST_CHECKED ? 1:0; - options.iShowEvent = SendDlgItemMessage(hwndDlg, IDC_CHECK_FLASHICON, BM_GETCHECK, 0, 0) == BST_CHECKED ? 1:0; - options.iShowUDetails = SendDlgItemMessage(hwndDlg, IDC_CHECK_UDETAILS, BM_GETCHECK, 0, 0) == BST_CHECKED ? 1:0; - options.iShowMessageWindow = SendDlgItemMessage(hwndDlg, IDC_CHECK_MSGWINDOW, BM_GETCHECK, 0, 0) == BST_CHECKED ? 1:0; - options.notifyFirstOnline = SendDlgItemMessage(hwndDlg, IDC_CHECK_FIRSTSIGHT, BM_GETCHECK, 0, 0) == BST_CHECKED ? true : false; - options.hideInactive = SendDlgItemMessage(hwndDlg, IDC_CHECK_NOMSGS, BM_GETCHECK, 0, 0) == BST_CHECKED ? true : false; - options.enableMissYou = SendDlgItemMessage(hwndDlg, IDC_CHECK_MISSYOU, BM_GETCHECK, 0, 0) == BST_CHECKED ? true : false; + options.iShowPopup = IsDlgButtonChecked(hwndDlg, IDC_CHECK_POPUP) == BST_CHECKED ? 1:0; + options.iShowEvent = IsDlgButtonChecked(hwndDlg, IDC_CHECK_FLASHICON) == BST_CHECKED ? 1:0; + options.iShowUDetails = IsDlgButtonChecked(hwndDlg, IDC_CHECK_UDETAILS) == BST_CHECKED ? 1:0; + options.iShowMessageWindow = IsDlgButtonChecked(hwndDlg, IDC_CHECK_MSGWINDOW) == BST_CHECKED ? 1:0; + options.notifyFirstOnline = IsDlgButtonChecked(hwndDlg, IDC_CHECK_FIRSTSIGHT) == BST_CHECKED ? true : false; + options.hideInactive = IsDlgButtonChecked(hwndDlg, IDC_CHECK_NOMSGS) == BST_CHECKED ? true : false; + options.enableMissYou = IsDlgButtonChecked(hwndDlg, IDC_CHECK_MISSYOU) == BST_CHECKED ? true : false; - options.iShowPopup2 = SendDlgItemMessage(hwndDlg, IDC_CHECK_POPUP2, BM_GETCHECK, 0, 0) == BST_CHECKED ? 1:0; - options.iShowEvent2 = SendDlgItemMessage(hwndDlg, IDC_CHECK_FLASHICON2, BM_GETCHECK, 0, 0) == BST_CHECKED ? 1:0; + options.iShowPopup2 = IsDlgButtonChecked(hwndDlg, IDC_CHECK_POPUP2) == BST_CHECKED ? 1:0; + options.iShowEvent2 = IsDlgButtonChecked(hwndDlg, IDC_CHECK_FLASHICON2) == BST_CHECKED ? 1:0; options.action2 = (GoneContactAction)SendDlgItemMessage(hwndDlg, IDC_COMBO_ACTIONS, CB_GETCURSEL, 0, 0); @@ -318,9 +318,9 @@ static INT_PTR CALLBACK PopupOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP //iPopupDelay options.iPopupDelay = GetDlgItemInt(hwndDlg, IDC_EDIT_POPUPDELAY, 0, FALSE); - if (SendDlgItemMessage(hwndDlg, IDC_DELAY_PERM, BM_GETCHECK, 0, 0) == BST_CHECKED) + if (IsDlgButtonChecked(hwndDlg, IDC_DELAY_PERM) == BST_CHECKED) options.iPopupDelay = -1; - else if (SendDlgItemMessage(hwndDlg, IDC_DELAY_DEF, BM_GETCHECK, 0, 0) == BST_CHECKED) + else if (IsDlgButtonChecked(hwndDlg, IDC_DELAY_DEF) == BST_CHECKED) options.iPopupDelay = 0; ppd.lchContact = NULL; @@ -410,9 +410,9 @@ static INT_PTR CALLBACK PopupOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP //iPopupDelay options.iPopupDelay = GetDlgItemInt(hwndDlg, IDC_EDIT_POPUPDELAY, 0, FALSE); - if (SendDlgItemMessage(hwndDlg, IDC_DELAY_PERM, BM_GETCHECK, 0, 0) == BST_CHECKED) + if (IsDlgButtonChecked(hwndDlg, IDC_DELAY_PERM) == BST_CHECKED) options.iPopupDelay = -1; - else if (SendDlgItemMessage(hwndDlg, IDC_DELAY_DEF, BM_GETCHECK, 0, 0) == BST_CHECKED) + else if (IsDlgButtonChecked(hwndDlg, IDC_DELAY_DEF) == BST_CHECKED) options.iPopupDelay = 0; // save value to the DB @@ -503,9 +503,9 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lpar if (hContact) { db_set_dw(hContact, MODULE_NAME, "iAbsencePeriod", GetDlgItemInt(hdlg, IDC_EDITABSENCE, 0, FALSE)); - db_set_b(hContact, MODULE_NAME, "MissYou", (SendDlgItemMessage(hdlg, IDC_CHECK_MISSYOU, BM_GETCHECK, 0, 0) == BST_CHECKED) ? 1 : 0); - db_set_b(hContact, MODULE_NAME, "MissYouNotifyAlways", (SendDlgItemMessage(hdlg, IDC_CHECK_NOTIFYALWAYS, BM_GETCHECK, 0, 0) == BST_CHECKED) ? 1 : 0); - db_set_b(hContact, MODULE_NAME, "NeverHide", (SendDlgItemMessage(hdlg, IDC_CHECK_NEVERHIDE, BM_GETCHECK, 0, 0) == BST_CHECKED) ? 1 : 0); + db_set_b(hContact, MODULE_NAME, "MissYou", (IsDlgButtonChecked(hdlg, IDC_CHECK_MISSYOU) == BST_CHECKED) ? 1 : 0); + db_set_b(hContact, MODULE_NAME, "MissYouNotifyAlways", (IsDlgButtonChecked(hdlg, IDC_CHECK_NOTIFYALWAYS) == BST_CHECKED) ? 1 : 0); + db_set_b(hContact, MODULE_NAME, "NeverHide", (IsDlgButtonChecked(hdlg, IDC_CHECK_NEVERHIDE) == BST_CHECKED) ? 1 : 0); } break; } diff --git a/plugins/ChangeKeyboardLayout/src/options.cpp b/plugins/ChangeKeyboardLayout/src/options.cpp index ce1b374952..67537030ca 100644 --- a/plugins/ChangeKeyboardLayout/src/options.cpp +++ b/plugins/ChangeKeyboardLayout/src/options.cpp @@ -155,47 +155,47 @@ INT_PTR CALLBACK DlgMainProcOptions(HWND hWnd, UINT uiMessage, WPARAM wParam, LP moOptions.dwHotkey_Case = SendDlgItemMessage(hWnd, IDC_HOTKEY_CASE, HKM_GETHOTKEY, 0, 0); //Допишем к символам управляющие клавиши - if (SendDlgItemMessage(hWnd, IDC_CHECK_LAYOUT_SHIFT, BM_GETCHECK, 0, 0)) + if (IsDlgButtonChecked(hWnd, IDC_CHECK_LAYOUT_SHIFT)) moOptions.dwHotkey_Layout |= 0x00000100; - if (SendDlgItemMessage(hWnd, IDC_CHECK_LAYOUT_CTRL, BM_GETCHECK, 0, 0)) + if (IsDlgButtonChecked(hWnd, IDC_CHECK_LAYOUT_CTRL)) moOptions.dwHotkey_Layout |= 0x00000200; - if (SendDlgItemMessage(hWnd, IDC_CHECK_LAYOUT_ALT, BM_GETCHECK, 0, 0)) + if (IsDlgButtonChecked(hWnd, IDC_CHECK_LAYOUT_ALT)) moOptions.dwHotkey_Layout |= 0x00000400; - if (SendDlgItemMessage(hWnd, IDC_CHECK_LAYOUT_WIN, BM_GETCHECK, 0, 0)) + if (IsDlgButtonChecked(hWnd, IDC_CHECK_LAYOUT_WIN)) moOptions.dwHotkey_Layout |= 0x00000800; - if (SendDlgItemMessage(hWnd, IDC_CHECK_LAYOUT2_SHIFT, BM_GETCHECK, 0, 0)) + if (IsDlgButtonChecked(hWnd, IDC_CHECK_LAYOUT2_SHIFT)) moOptions.dwHotkey_Layout2 |= 0x00000100; - if (SendDlgItemMessage(hWnd, IDC_CHECK_LAYOUT2_CTRL, BM_GETCHECK, 0, 0)) + if (IsDlgButtonChecked(hWnd, IDC_CHECK_LAYOUT2_CTRL)) moOptions.dwHotkey_Layout2 |= 0x00000200; - if (SendDlgItemMessage(hWnd, IDC_CHECK_LAYOUT2_ALT, BM_GETCHECK, 0, 0)) + if (IsDlgButtonChecked(hWnd, IDC_CHECK_LAYOUT2_ALT)) moOptions.dwHotkey_Layout2 |= 0x00000400; - if (SendDlgItemMessage(hWnd, IDC_CHECK_LAYOUT2_WIN, BM_GETCHECK, 0, 0)) + if (IsDlgButtonChecked(hWnd, IDC_CHECK_LAYOUT2_WIN)) moOptions.dwHotkey_Layout2 |= 0x00000800; - if (SendDlgItemMessage(hWnd, IDC_CHECK_CASE_SHIFT, BM_GETCHECK, 0, 0)) + if (IsDlgButtonChecked(hWnd, IDC_CHECK_CASE_SHIFT)) moOptions.dwHotkey_Case |= 0x00000100; - if (SendDlgItemMessage(hWnd, IDC_CHECK_CASE_CTRL, BM_GETCHECK, 0, 0)) + if (IsDlgButtonChecked(hWnd, IDC_CHECK_CASE_CTRL)) moOptions.dwHotkey_Case |= 0x00000200; - if (SendDlgItemMessage(hWnd, IDC_CHECK_CASE_ALT, BM_GETCHECK, 0, 0)) + if (IsDlgButtonChecked(hWnd, IDC_CHECK_CASE_ALT)) moOptions.dwHotkey_Case |= 0x00000400; - if (SendDlgItemMessage(hWnd, IDC_CHECK_CASE_WIN, BM_GETCHECK, 0, 0)) + if (IsDlgButtonChecked(hWnd, IDC_CHECK_CASE_WIN)) moOptions.dwHotkey_Case |= 0x00000800; //Прочие опции - moOptions.CurrentWordLayout = SendDlgItemMessage(hWnd, IDC_CHECK_LAYOUT_MODE, BM_GETCHECK, 0, 0); - moOptions.CurrentWordLayout2 = SendDlgItemMessage(hWnd, IDC_CHECK_LAYOUT_MODE2, BM_GETCHECK, 0, 0); - moOptions.CurrentWordCase = SendDlgItemMessage(hWnd, IDC_CHECK_CASE_MODE, BM_GETCHECK, 0, 0); - moOptions.TwoWay = SendDlgItemMessage(hWnd, IDC_CHECK_TWOWAY, BM_GETCHECK, 0, 0); - moOptions.ChangeSystemLayout = SendDlgItemMessage(hWnd, IDC_CHECK_SYSTEMLAYOUT, BM_GETCHECK, 0, 0); - moOptions.CopyToClipboard = SendDlgItemMessage(hWnd, IDC_CHECK_CLIPBOARD, BM_GETCHECK, 0, 0); - moOptions.ShowPopup = SendDlgItemMessage(hWnd, IDC_CHECK_POPUP, BM_GETCHECK, 0, 0); + moOptions.CurrentWordLayout = IsDlgButtonChecked(hWnd, IDC_CHECK_LAYOUT_MODE); + moOptions.CurrentWordLayout2 = IsDlgButtonChecked(hWnd, IDC_CHECK_LAYOUT_MODE2); + moOptions.CurrentWordCase = IsDlgButtonChecked(hWnd, IDC_CHECK_CASE_MODE); + moOptions.TwoWay = IsDlgButtonChecked(hWnd, IDC_CHECK_TWOWAY); + moOptions.ChangeSystemLayout = IsDlgButtonChecked(hWnd, IDC_CHECK_SYSTEMLAYOUT); + moOptions.CopyToClipboard = IsDlgButtonChecked(hWnd, IDC_CHECK_CLIPBOARD); + moOptions.ShowPopup = IsDlgButtonChecked(hWnd, IDC_CHECK_POPUP); // CapsLock - if (SendDlgItemMessage(hWnd, IDC_RADIO_OFFCAPS, BM_GETCHECK, 0, 0) == BST_CHECKED) + if (IsDlgButtonChecked(hWnd, IDC_RADIO_OFFCAPS) == BST_CHECKED) moOptions.bCaseOperations = 1; - else if (SendDlgItemMessage(hWnd, IDC_RADIO_IGNORECAPS, BM_GETCHECK, 0, 0) == BST_CHECKED) + else if (IsDlgButtonChecked(hWnd, IDC_RADIO_IGNORECAPS) == BST_CHECKED) moOptions.bCaseOperations = 2; else moOptions.bCaseOperations = 0; diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp index 4b983cf631..8cd75b19b2 100644 --- a/plugins/Clist_nicer/src/clistmenus.cpp +++ b/plugins/Clist_nicer/src/clistmenus.cpp @@ -234,13 +234,13 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA dwFlags &= ~(ECF_FORCEOVERLAY | ECF_HIDEOVERLAY | ECF_FORCELOCALTIME | ECF_HIDELOCALTIME); - checked = SendDlgItemMessage(hWnd, IDC_OVERLAYICON, BM_GETCHECK, 0, 0); + checked = IsDlgButtonChecked(hWnd, IDC_OVERLAYICON); if (checked == BST_CHECKED) dwFlags |= ECF_FORCEOVERLAY; else if (checked == BST_UNCHECKED) dwFlags |= ECF_HIDEOVERLAY; - checked = SendDlgItemMessage(hWnd, IDC_SHOWLOCALTIME1, BM_GETCHECK, 0, 0); + checked = IsDlgButtonChecked(hWnd, IDC_SHOWLOCALTIME1); if (checked == BST_CHECKED) dwFlags |= ECF_FORCELOCALTIME; else if (checked == BST_UNCHECKED) diff --git a/plugins/ContactsPlus/src/receive.cpp b/plugins/ContactsPlus/src/receive.cpp index 02ba5fb8c7..beb4ba0fa2 100644 --- a/plugins/ContactsPlus/src/receive.cpp +++ b/plugins/ContactsPlus/src/receive.cpp @@ -98,7 +98,7 @@ static TCHAR* ListView_GetItemTextEx(HWND hLV, int iItem, int iSubItem) static void EnableGroupCombo(HWND hwndDlg) { - EnableDlgItem(hwndDlg, IDC_GROUPS, SendDlgItemMessage(hwndDlg, IDC_ENABLEGROUPS, BM_GETCHECK, 0, 0)); + EnableDlgItem(hwndDlg, IDC_GROUPS, IsDlgButtonChecked(hwndDlg, IDC_ENABLEGROUPS)); } static void RebuildGroupCombo(HWND hwndDlg) diff --git a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp index 75f879271e..3f0940157f 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp @@ -395,15 +395,15 @@ INT_PTR CALLBACK SearchDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPara if (hListDlg == NULL) break; SetDlgItemText(hListDlg, IDC_MAIN, _T("")); - if (SendDlgItemMessage(hDlg, IDC_TYPE_WEB, BM_GETCHECK, 0, 0) == BST_UNCHECKED) + if (IsDlgButtonChecked(hDlg, IDC_TYPE_WEB) == BST_UNCHECKED) flags |= WLL_MAIL; - if (SendDlgItemMessage(hDlg, IDC_TYPE_MAIL, BM_GETCHECK, 0, 0) == BST_UNCHECKED) + if (IsDlgButtonChecked(hDlg, IDC_TYPE_MAIL) == BST_UNCHECKED) flags |= WLL_URL; - if (SendDlgItemMessage(hDlg, IDC_DIR_IN, BM_GETCHECK, 0, 0) == BST_UNCHECKED) + if (IsDlgButtonChecked(hDlg, IDC_DIR_IN) == BST_UNCHECKED) flags |= WLL_OUT; - if (SendDlgItemMessage(hDlg, IDC_DIR_OUT, BM_GETCHECK, 0, 0) == BST_UNCHECKED) + if (IsDlgButtonChecked(hDlg, IDC_DIR_OUT) == BST_UNCHECKED) flags |= WLL_IN; - if (SendDlgItemMessage(hDlg, IDC_WHOLE_MESSAGE, BM_GETCHECK, 0, 0) == BST_CHECKED) + if (IsDlgButtonChecked(hDlg, IDC_WHOLE_MESSAGE) == BST_CHECKED) flags |= SLL_DEEP; length = GetWindowTextLength(GetDlgItem(hDlg, IDC_SEARCHSTRING)) + 1; @@ -591,8 +591,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM l if ( LOWORD(wParam) == IDC_CHECK1 ) { SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0); - if ( SendDlgItemMessage(hDlg, IDC_CHECK1, BM_GETCHECK, 0, 0) == BST_UNCHECKED ) - { + if (IsDlgButtonChecked(hDlg, IDC_CHECK1) == BST_UNCHECKED) { EnableWindow(GetDlgItem(hDlg, IDC_INCOMING), TRUE); EnableWindow(GetDlgItem(hDlg, IDC_OUTGOING), TRUE); EnableWindow(GetDlgItem(hDlg, IDC_BACKGROUND), TRUE); @@ -643,7 +642,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM l if ( wParam == IDC_CHECK2 ) { SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0); - if ( SendDlgItemMessage(hDlg, IDC_CHECK2, BM_GETCHECK, 0, 0) == BST_UNCHECKED ) + if (IsDlgButtonChecked(hDlg, IDC_CHECK2) == BST_UNCHECKED) options.openNewWindow = 0; else options.openNewWindow = 1; @@ -655,7 +654,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM l if ( wParam == IDC_CHECK3 ) { SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0); - if ( SendDlgItemMessage(hDlg, IDC_CHECK3, BM_GETCHECK, 0, 0) == BST_UNCHECKED ) + if (IsDlgButtonChecked(hDlg, IDC_CHECK3) == BST_UNCHECKED) options.updateWindow = 0; else options.updateWindow = 1; @@ -668,7 +667,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM l if ( wParam == IDC_CHECK4 ) { SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0); - if ( SendDlgItemMessage(hDlg, IDC_CHECK4, BM_GETCHECK, 0, 0) == BST_UNCHECKED ) + if (IsDlgButtonChecked(hDlg, IDC_CHECK4) == BST_UNCHECKED ) options.mouseEvent = 0; else options.mouseEvent = 1; @@ -681,7 +680,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM l if ( wParam == IDC_CHECK5 ) { SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0); - if(SendDlgItemMessage(hDlg, IDC_CHECK5, BM_GETCHECK, 0, 0) == BST_UNCHECKED) + if (IsDlgButtonChecked(hDlg, IDC_CHECK5) == BST_UNCHECKED) options.saveSpecial = 0; else options.saveSpecial = 1; @@ -694,7 +693,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM l if ( wParam == IDC_CHECK6 ) { SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0); - if(SendDlgItemMessage(hDlg, IDC_CHECK6, BM_GETCHECK, 0, 0) == BST_UNCHECKED) + if (IsDlgButtonChecked(hDlg, IDC_CHECK6) == BST_UNCHECKED) options.showDate = 0; else options.showDate = 1; @@ -707,7 +706,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM l if ( wParam == IDC_CHECK7 ) { SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0); - if(SendDlgItemMessage(hDlg, IDC_CHECK7, BM_GETCHECK, 0, 0) == BST_UNCHECKED) + if (IsDlgButtonChecked(hDlg, IDC_CHECK7) == BST_UNCHECKED) options.showLine = 0; else options.showLine = 1; @@ -720,7 +719,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM l if ( wParam == IDC_CHECK8 ) { SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0); - if(SendDlgItemMessage(hDlg, IDC_CHECK8, BM_GETCHECK, 0, 0) == BST_UNCHECKED) + if (IsDlgButtonChecked(hDlg, IDC_CHECK8) == BST_UNCHECKED) options.showTime = 0; else options.showTime = 1; @@ -735,7 +734,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM l if ( wParam == IDC_CHECK9 ) { SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0); - if(SendDlgItemMessage(hDlg, IDC_CHECK9, BM_GETCHECK, 0, 0) == BST_UNCHECKED) + if (IsDlgButtonChecked(hDlg, IDC_CHECK9) == BST_UNCHECKED) options.showDirection = 0; else options.showDirection = 1; @@ -750,7 +749,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM l if ( wParam == IDC_CHECK10 ) { SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0); - if(SendDlgItemMessage(hDlg, IDC_CHECK10, BM_GETCHECK, 0, 0) == BST_UNCHECKED) + if (IsDlgButtonChecked(hDlg, IDC_CHECK10) == BST_UNCHECKED) options.showType = 0; else options.showType = 1; @@ -769,10 +768,9 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM l if ( ((LPNMHDR)lParam)->code == PSN_APPLY ) { // Write Settings to Database - if ( SendDlgItemMessage(hDlg, IDC_CHECK1, BM_GETCHECK, 0, 0) == BST_CHECKED ) + if (IsDlgButtonChecked(hDlg, IDC_CHECK1) == BST_CHECKED) db_set_b(NULL, LINKLIST_MODULE, LINKLIST_USE_DEF, 0x01); - else - { + else { db_set_b(NULL, LINKLIST_MODULE, LINKLIST_USE_DEF, 0x00); colourSet.incoming = SendDlgItemMessage(hDlg, IDC_INCOMING, CPM_GETCOLOUR, 0, 0); colourSet.outgoing = SendDlgItemMessage(hDlg, IDC_OUTGOING, CPM_GETCOLOUR, 0, 0); diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp index e6e2b35639..d7428069e7 100644 --- a/plugins/NotesAndReminders/src/reminders.cpp +++ b/plugins/NotesAndReminders/src/reminders.cpp @@ -1747,7 +1747,7 @@ INT_PTR CALLBACK DlgProcNotifyReminder(HWND Dialog,UINT Message,WPARAM wParam,LP if (pReminder->handle == Dialog) { - if (SendDlgItemMessage(Dialog, IDC_AFTER, BM_GETCHECK, 0, 0) == BST_CHECKED) + if (IsDlgButtonChecked(Dialog, IDC_AFTER) == BST_CHECKED) { // delta time @@ -1810,7 +1810,7 @@ INT_PTR CALLBACK DlgProcNotifyReminder(HWND Dialog,UINT Message,WPARAM wParam,LP pReminder->When = li; pReminder->When.QuadPart += (TT * FILETIME_TICKS_PER_SEC); } - else if (SendDlgItemMessage(Dialog, IDC_ONDATE, BM_GETCHECK, 0, 0) == BST_CHECKED) + else if (IsDlgButtonChecked(Dialog, IDC_ONDATE) == BST_CHECKED) { SYSTEMTIME Date; diff --git a/plugins/SecureIM/src/options.cpp b/plugins/SecureIM/src/options.cpp index 02dca0b603..cce9d06151 100644 --- a/plugins/SecureIM/src/options.cpp +++ b/plugins/SecureIM/src/options.cpp @@ -687,7 +687,7 @@ INT_PTR CALLBACK DlgProcOptionsPGP(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM l case IDC_NO_KEYRINGS: { - BOOL bNoKR = (SendDlgItemMessage(hDlg, IDC_NO_KEYRINGS, BM_GETCHECK, 0L, 0L) == BST_CHECKED); + BOOL bNoKR = (IsDlgButtonChecked(hDlg, IDC_NO_KEYRINGS) == BST_CHECKED); EnableWindow(GetDlgItem(hDlg, IDC_SET_KEYRINGS), !bNoKR); EnableWindow(GetDlgItem(hDlg, IDC_LOAD_PRIVKEY), bNoKR); SetDlgItemText(hDlg, IDC_KEYRING_STATUS, bNoKR ? Translate(sim225) : ((bPGP9) ? Translate(sim220) : (bPGPkeyrings ? Translate(sim216) : Translate(sim217)))); @@ -1227,28 +1227,28 @@ void ApplyGeneralSettings(HWND hDlg) mir_itoa(tmp, timeout, 10); SetDlgItemText(hDlg, IDC_OKT, timeout); - bSFT = (SendDlgItemMessage(hDlg, IDC_SFT, BM_GETCHECK, 0L, 0L) == BST_CHECKED); - bSOM = (SendDlgItemMessage(hDlg, IDC_SOM, BM_GETCHECK, 0L, 0L) == BST_CHECKED); - bASI = (SendDlgItemMessage(hDlg, IDC_ASI, BM_GETCHECK, 0L, 0L) == BST_CHECKED); - bMCD = (SendDlgItemMessage(hDlg, IDC_MCD, BM_GETCHECK, 0L, 0L) == BST_CHECKED); - bSCM = (SendDlgItemMessage(hDlg, IDC_SCM, BM_GETCHECK, 0L, 0L) == BST_CHECKED); - bDGP = (SendDlgItemMessage(hDlg, IDC_DGP, BM_GETCHECK, 0L, 0L) == BST_CHECKED); - bAIP = (SendDlgItemMessage(hDlg, IDC_AIP, BM_GETCHECK, 0L, 0L) == BST_CHECKED); - bNOL = (SendDlgItemMessage(hDlg, IDC_NOL, BM_GETCHECK, 0L, 0L) == BST_CHECKED); - bAAK = (SendDlgItemMessage(hDlg, IDC_AAK, BM_GETCHECK, 0L, 0L) == BST_CHECKED); - bMCM = (SendDlgItemMessage(hDlg, IDC_MCM, BM_GETCHECK, 0L, 0L) == BST_CHECKED); + bSFT = (IsDlgButtonChecked(hDlg, IDC_SFT) == BST_CHECKED); + bSOM = (IsDlgButtonChecked(hDlg, IDC_SOM) == BST_CHECKED); + bASI = (IsDlgButtonChecked(hDlg, IDC_ASI) == BST_CHECKED); + bMCD = (IsDlgButtonChecked(hDlg, IDC_MCD) == BST_CHECKED); + bSCM = (IsDlgButtonChecked(hDlg, IDC_SCM) == BST_CHECKED); + bDGP = (IsDlgButtonChecked(hDlg, IDC_DGP) == BST_CHECKED); + bAIP = (IsDlgButtonChecked(hDlg, IDC_AIP) == BST_CHECKED); + bNOL = (IsDlgButtonChecked(hDlg, IDC_NOL) == BST_CHECKED); + bAAK = (IsDlgButtonChecked(hDlg, IDC_AAK) == BST_CHECKED); + bMCM = (IsDlgButtonChecked(hDlg, IDC_MCM) == BST_CHECKED); SetFlags(); // PGP &| GPG flags { tmp = 0; - i = SendDlgItemMessage(hDlg, IDC_PGP, BM_GETCHECK, 0L, 0L) == BST_CHECKED; + i = (IsDlgButtonChecked(hDlg, IDC_PGP) == BST_CHECKED); if (i != bPGP) { bPGP = i; tmp++; db_set_b(0, MODULENAME, "pgp", bPGP); } - i = SendDlgItemMessage(hDlg, IDC_GPG, BM_GETCHECK, 0L, 0L) == BST_CHECKED; + i = (IsDlgButtonChecked(hDlg, IDC_GPG) == BST_CHECKED); if (i != bGPG) { bGPG = i; tmp++; db_set_b(0, MODULENAME, "gpg", bGPG); @@ -1310,7 +1310,7 @@ void ApplyProtoSettings(HWND hDlg) void ApplyPGPSettings(HWND hDlg) { - bUseKeyrings = !(SendDlgItemMessage(hDlg, IDC_NO_KEYRINGS, BM_GETCHECK, 0L, 0L) == BST_CHECKED); + bUseKeyrings = !(IsDlgButtonChecked(hDlg, IDC_NO_KEYRINGS) == BST_CHECKED); db_set_b(0, MODULENAME, "ukr", bUseKeyrings); char *priv = db_get_sa(0, MODULENAME, "tpgpPrivKey"); @@ -1332,17 +1332,17 @@ void ApplyGPGSettings(HWND hDlg) GetDlgItemText(hDlg, IDC_GPGHOME_EDIT, tmp, SIZEOF(tmp)); db_set_s(0, MODULENAME, "gpgHome", tmp); - bSavePass = (SendDlgItemMessage(hDlg, IDC_SAVEPASS_CBOX, BM_GETCHECK, 0L, 0L) == BST_CHECKED); + bSavePass = (IsDlgButtonChecked(hDlg, IDC_SAVEPASS_CBOX) == BST_CHECKED); db_set_b(0, MODULENAME, "gpgSaveFlag", bSavePass); - BOOL bgpgLogFlag = (SendDlgItemMessage(hDlg, IDC_LOGGINGON_CBOX, BM_GETCHECK, 0L, 0L) == BST_CHECKED); + BOOL bgpgLogFlag = (IsDlgButtonChecked(hDlg, IDC_LOGGINGON_CBOX) == BST_CHECKED); db_set_b(0, MODULENAME, "gpgLogFlag", bgpgLogFlag); GetDlgItemText(hDlg, IDC_GPGLOGFILE_EDIT, tmp, SIZEOF(tmp)); db_set_s(0, MODULENAME, "gpgLog", tmp); if (bgpgLogFlag) gpg_set_log(tmp); else gpg_set_log(0); - BOOL bgpgTmpFlag = (SendDlgItemMessage(hDlg, IDC_TMPPATHON_CBOX, BM_GETCHECK, 0L, 0L) == BST_CHECKED); + BOOL bgpgTmpFlag = (IsDlgButtonChecked(hDlg, IDC_TMPPATHON_CBOX) == BST_CHECKED); db_set_b(0, MODULENAME, "gpgTmpFlag", bgpgTmpFlag); GetDlgItemText(hDlg, IDC_GPGTMPPATH_EDIT, tmp, SIZEOF(tmp)); db_set_s(0, MODULENAME, "gpgTmp", tmp); diff --git a/plugins/SeenPlugin/src/history.cpp b/plugins/SeenPlugin/src/history.cpp index 1e3985bdfc..abe71fc6bd 100644 --- a/plugins/SeenPlugin/src/history.cpp +++ b/plugins/SeenPlugin/src/history.cpp @@ -208,7 +208,7 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARA SendMessage(hwndDlg, WM_CLOSE, 0, 0); break; case IDOK: - if (SendDlgItemMessage(hwndDlg, IDC_STATUSCHANGE, BM_GETCHECK, 0, 0) == BST_CHECKED) + if (IsDlgButtonChecked(hwndDlg, IDC_STATUSCHANGE) == BST_CHECKED) db_set_b(hContact,S_MOD,"OnlineAlert",1); else db_set_b(hContact,S_MOD,"OnlineAlert",0); diff --git a/plugins/Spamotron/src/options.cpp b/plugins/Spamotron/src/options.cpp index 70de5acef5..dd04e495ac 100644 --- a/plugins/Spamotron/src/options.cpp +++ b/plugins/Spamotron/src/options.cpp @@ -184,13 +184,13 @@ INT_PTR CALLBACK DlgProcOptionsMain(HWND optDlg, UINT msg, WPARAM wParam, LPARAM } switch (((NMHDR*)lParam)->code) { case PSN_APPLY: - _setOptB("ApproveOnMsgOut", SendDlgItemMessage(optDlg, IDC_OPT_OUT_MSG_APPROVE, BM_GETCHECK, 0, 0)); - _setOptB("ApproveOnMsgIn", SendDlgItemMessage(optDlg, IDC_OPT_IN_MSG_APPROVE, BM_GETCHECK, 0, 0)); - _setOptB("DontReplySameMsg", SendDlgItemMessage(optDlg, IDC_OPT_DONT_REPLY_SAME_MSG, BM_GETCHECK, 0, 0)); - _setOptB("DontReplyMsg", SendDlgItemMessage(optDlg, IDC_OPT_DONT_REPLY_MSG, BM_GETCHECK, 0, 0)); - _setOptB("AddPermanently", SendDlgItemMessage(optDlg, IDC_OPT_ADD_PERMANENTLY, BM_GETCHECK, 0, 0)); - _setOptB("HideUnverified", SendDlgItemMessage(optDlg, IDC_OPT_HIDE_UNTIL_VERIFIED, BM_GETCHECK, 0, 0)); - _setOptB("LogActions", SendDlgItemMessage(optDlg, IDC_OPT_LOG_ACTIONS, BM_GETCHECK, 0, 0)); + _setOptB("ApproveOnMsgOut", IsDlgButtonChecked(optDlg, IDC_OPT_OUT_MSG_APPROVE)); + _setOptB("ApproveOnMsgIn", IsDlgButtonChecked(optDlg, IDC_OPT_IN_MSG_APPROVE)); + _setOptB("DontReplySameMsg", IsDlgButtonChecked(optDlg, IDC_OPT_DONT_REPLY_SAME_MSG)); + _setOptB("DontReplyMsg", IsDlgButtonChecked(optDlg, IDC_OPT_DONT_REPLY_MSG)); + _setOptB("AddPermanently", IsDlgButtonChecked(optDlg, IDC_OPT_ADD_PERMANENTLY)); + _setOptB("HideUnverified", IsDlgButtonChecked(optDlg, IDC_OPT_HIDE_UNTIL_VERIFIED)); + _setOptB("LogActions", IsDlgButtonChecked(optDlg, IDC_OPT_LOG_ACTIONS)); _saveDlgItemText(optDlg, IDC_OPT_IN_MSG_APPROVE_WORDLIST, "ApproveOnMsgInWordlist"); _saveDlgItemText(optDlg, IDC_OPT_DONT_REPLY_MSG_WORDLIST, "DontReplyMsgWordlist"); _saveDlgItemInt(optDlg, IDC_OPT_MAX_MSG_CONTACT, "MaxMsgContactCountPerDay"); @@ -321,7 +321,7 @@ INT_PTR CALLBACK DlgProcOptionsQuestion(HWND optDlg, UINT msg, WPARAM wParam, LP case IDC_OPT_KEEP_BLOCKED_MSG: case IDC_OPT_MARK_MSG_UNREAD_ON_APPROVAL: case IDC_OPT_CCRESPONSE: - EnableWindow(GetDlgItem(optDlg, IDC_OPT_MARK_MSG_UNREAD_ON_APPROVAL), SendDlgItemMessage(optDlg, IDC_OPT_KEEP_BLOCKED_MSG, BM_GETCHECK, 0, 0)); + EnableWindow(GetDlgItem(optDlg, IDC_OPT_MARK_MSG_UNREAD_ON_APPROVAL), IsDlgButtonChecked(optDlg, IDC_OPT_KEEP_BLOCKED_MSG)); if (HIWORD(wParam) != BN_CLICKED) return FALSE; break; @@ -358,12 +358,12 @@ INT_PTR CALLBACK DlgProcOptionsQuestion(HWND optDlg, UINT msg, WPARAM wParam, LP i = SendDlgItemMessage(optDlg, IDC_OPT_MODE, CB_GETCURSEL, 0, 0); selectedMode = SendDlgItemMessage(optDlg, IDC_OPT_MODE, CB_GETITEMDATA, i, 0); _setOptB("Mode", selectedMode); - _setOptB("ReplyOnSuccess", SendDlgItemMessage(optDlg, IDC_OPT_REPLY_ON_SUCCESS, BM_GETCHECK, 0, 0)); - _setOptB("ReplyOnAuth", SendDlgItemMessage(optDlg, IDC_OPT_REPLY_ON_AUTH, BM_GETCHECK, 0, 0)); - _setOptB("ReplyOnMsg", SendDlgItemMessage(optDlg, IDC_OPT_REPLY_ON_MSG, BM_GETCHECK, 0, 0)); - _setOptB("KeepBlockedMsg", SendDlgItemMessage(optDlg, IDC_OPT_KEEP_BLOCKED_MSG, BM_GETCHECK, 0, 0)); - _setOptB("MarkMsgUnreadOnApproval", SendDlgItemMessage(optDlg, IDC_OPT_MARK_MSG_UNREAD_ON_APPROVAL, BM_GETCHECK, 0, 0)); - _setOptB("ResponseCC", SendDlgItemMessage(optDlg, IDC_OPT_CCRESPONSE, BM_GETCHECK, 0, 0)); + _setOptB("ReplyOnSuccess", IsDlgButtonChecked(optDlg, IDC_OPT_REPLY_ON_SUCCESS)); + _setOptB("ReplyOnAuth", IsDlgButtonChecked(optDlg, IDC_OPT_REPLY_ON_AUTH)); + _setOptB("ReplyOnMsg", IsDlgButtonChecked(optDlg, IDC_OPT_REPLY_ON_MSG)); + _setOptB("KeepBlockedMsg", IsDlgButtonChecked(optDlg, IDC_OPT_KEEP_BLOCKED_MSG)); + _setOptB("MarkMsgUnreadOnApproval", IsDlgButtonChecked(optDlg, IDC_OPT_MARK_MSG_UNREAD_ON_APPROVAL)); + _setOptB("ResponseCC", IsDlgButtonChecked(optDlg, IDC_OPT_CCRESPONSE)); switch (selectedMode) { case SPAMOTRON_MODE_PLAIN: _saveDlgItemText(optDlg, IDC_OPT_CHALLENGE, "Challenge"); @@ -399,8 +399,7 @@ void EnableControlsBayes(HWND hwnd, BOOL enable) EnableWindow(GetDlgItem(hwnd, IDC_OPT_BAYES_AUTO_APPROVE), enable); EnableWindow(GetDlgItem(hwnd, IDC_OPT_BAYES_HAM_SCORE), enable); EnableWindow(GetDlgItem(hwnd, IDC_OPT_BAYES_AUTOLEARN_APPROVED), enable); - EnableWindow(GetDlgItem(hwnd, IDC_OPT_BAYES_AUTOLEARN_AUTOAPPROVED), enable && - SendDlgItemMessage(hwnd, IDC_OPT_BAYES_AUTO_APPROVE, BM_GETCHECK, 0, 0)); + EnableWindow(GetDlgItem(hwnd, IDC_OPT_BAYES_AUTOLEARN_AUTOAPPROVED), enable && IsDlgButtonChecked(hwnd, IDC_OPT_BAYES_AUTO_APPROVE)); EnableWindow(GetDlgItem(hwnd, IDC_OPT_BAYES_AUTOLEARN_NOT_APPROVED), enable); EnableWindow(GetDlgItem(hwnd, IDC_OPT_BAYES_WAIT_APPROVE), enable); EnableWindow(GetDlgItem(hwnd, IDC_OPT_BAYES_AUTOLEARN_NOT_APPROVED2), enable); @@ -459,12 +458,12 @@ INT_PTR CALLBACK DlgProcOptionsBayes(HWND optDlg, UINT msg, WPARAM wParam, LPARA return FALSE; switch (LOWORD(wParam)) { case IDC_OPT_BAYES_ENABLED: - bEnabled = SendDlgItemMessage(optDlg, IDC_OPT_BAYES_ENABLED, BM_GETCHECK, 0, 0); + bEnabled = IsDlgButtonChecked(optDlg, IDC_OPT_BAYES_ENABLED); EnableControlsBayes(optDlg, bEnabled); case IDC_OPT_BAYES_AUTO_APPROVE: - bEnabled = SendDlgItemMessage(optDlg, IDC_OPT_BAYES_ENABLED, BM_GETCHECK, 0, 0); + bEnabled = IsDlgButtonChecked(optDlg, IDC_OPT_BAYES_ENABLED); EnableWindow(GetDlgItem(optDlg, IDC_OPT_BAYES_AUTOLEARN_AUTOAPPROVED), - bEnabled && SendDlgItemMessage(optDlg, IDC_OPT_BAYES_AUTO_APPROVE, BM_GETCHECK, 0, 0)); + bEnabled && IsDlgButtonChecked(optDlg, IDC_OPT_BAYES_AUTO_APPROVE)); case IDC_OPT_BAYES_BLOCK_MSG: case IDC_OPT_BAYES_AUTOLEARN_APPROVED: case IDC_OPT_BAYES_AUTOLEARN_AUTOAPPROVED: @@ -533,13 +532,13 @@ INT_PTR CALLBACK DlgProcOptionsBayes(HWND optDlg, UINT msg, WPARAM wParam, LPARA case WM_NOTIFY: switch (((NMHDR*)lParam)->code) { case PSN_APPLY: - _setOptB("BayesEnabled", SendDlgItemMessage(optDlg, IDC_OPT_BAYES_ENABLED, BM_GETCHECK, 0, 0)); - _setOptB("BayesBlockMsg", SendDlgItemMessage(optDlg, IDC_OPT_BAYES_BLOCK_MSG, BM_GETCHECK, 0, 0)); - _setOptB("BayesAutoApprove", SendDlgItemMessage(optDlg, IDC_OPT_BAYES_AUTO_APPROVE, BM_GETCHECK, 0, 0)); - _setOptB("BayesAutolearnApproved", SendDlgItemMessage(optDlg, IDC_OPT_BAYES_AUTOLEARN_APPROVED, BM_GETCHECK, 0, 0)); - _setOptB("BayesAutolearnAutoApproved", SendDlgItemMessage(optDlg, IDC_OPT_BAYES_AUTOLEARN_AUTOAPPROVED, BM_GETCHECK, 0, 0)); - _setOptB("BayesAutolearnNotApproved", SendDlgItemMessage(optDlg, IDC_OPT_BAYES_AUTOLEARN_NOT_APPROVED, BM_GETCHECK, 0, 0)); - _setOptB("BayesAutolearnOutgoing", SendDlgItemMessage(optDlg, IDC_OPT_BAYES_AUTOLEARN_OUTGOING, BM_GETCHECK, 0, 0)); + _setOptB("BayesEnabled", IsDlgButtonChecked(optDlg, IDC_OPT_BAYES_ENABLED)); + _setOptB("BayesBlockMsg", IsDlgButtonChecked(optDlg, IDC_OPT_BAYES_BLOCK_MSG)); + _setOptB("BayesAutoApprove", IsDlgButtonChecked(optDlg, IDC_OPT_BAYES_AUTO_APPROVE)); + _setOptB("BayesAutolearnApproved", IsDlgButtonChecked(optDlg, IDC_OPT_BAYES_AUTOLEARN_APPROVED)); + _setOptB("BayesAutolearnAutoApproved", IsDlgButtonChecked(optDlg, IDC_OPT_BAYES_AUTOLEARN_AUTOAPPROVED)); + _setOptB("BayesAutolearnNotApproved", IsDlgButtonChecked(optDlg, IDC_OPT_BAYES_AUTOLEARN_NOT_APPROVED)); + _setOptB("BayesAutolearnOutgoing", IsDlgButtonChecked(optDlg, IDC_OPT_BAYES_AUTOLEARN_OUTGOING)); _saveDlgItemScore(optDlg, IDC_OPT_BAYES_SPAM_SCORE, "BayesSpamScore"); _saveDlgItemScore(optDlg, IDC_OPT_BAYES_HAM_SCORE, "BayesHamScore"); _saveDlgItemInt(optDlg, IDC_OPT_BAYES_WAIT_APPROVE, "BayesWaitApprove"); diff --git a/plugins/Spamotron/src/popups.cpp b/plugins/Spamotron/src/popups.cpp index 3635aa33bc..eb03aec353 100644 --- a/plugins/Spamotron/src/popups.cpp +++ b/plugins/Spamotron/src/popups.cpp @@ -25,7 +25,7 @@ void EnablePopupControls(HWND hwnd, BOOL enable) void EnablePopupColors(HWND hwnd, BOOL enableDefault, BOOL enableWindows) { BOOL enable, bEnabled; - bEnabled = SendDlgItemMessage(hwnd, IDC_OPT_POPUPS_ENABLED, BM_GETCHECK, 0, 0); + bEnabled = IsDlgButtonChecked(hwnd, IDC_OPT_POPUPS_ENABLED); enable = enableDefault || enableWindows; EnableWindow(GetDlgItem(hwnd, IDC_OPT_POPUPS_BLOCKED_FOREGROUND), !enable && bEnabled); EnableWindow(GetDlgItem(hwnd, IDC_OPT_POPUPS_BLOCKED_BACKGROUND), !enable && bEnabled); @@ -40,7 +40,7 @@ void EnablePopupColors(HWND hwnd, BOOL enableDefault, BOOL enableWindows) void EnablePopupTimeouts(HWND hwnd, BOOL enable) { - BOOL bEnabled = SendDlgItemMessage(hwnd, IDC_OPT_POPUPS_ENABLED, BM_GETCHECK, 0, 0); + BOOL bEnabled = IsDlgButtonChecked(hwnd, IDC_OPT_POPUPS_ENABLED); EnableWindow(GetDlgItem(hwnd, IDC_OPT_POPUPS_BLOCKED_TIMEOUT), !enable && bEnabled); EnableWindow(GetDlgItem(hwnd, IDC_OPT_POPUPS_APPROVED_TIMEOUT), !enable && bEnabled); EnableWindow(GetDlgItem(hwnd, IDC_OPT_POPUPS_CHALLENGE_TIMEOUT), !enable && bEnabled); @@ -73,7 +73,7 @@ INT_PTR CALLBACK DlgProcOptionsPopups(HWND optDlg, UINT msg, WPARAM wParam, LPAR SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_APPROVED_BACKGROUND, CPM_SETCOLOUR, 0, _getOptD("PopupApprovedBackground", defaultPopupApprovedBackground)); SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_CHALLENGE_FOREGROUND, CPM_SETCOLOUR, 0, _getOptD("PopupChallengeForeground", defaultPopupChallengeForeground)); SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_CHALLENGE_BACKGROUND, CPM_SETCOLOUR, 0, _getOptD("PopupChallengeBackground", defaultPopupChallengeBackground)); - EnablePopupTimeouts(optDlg, SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_DEFAULT_TIMEOUT, BM_GETCHECK, 0, 0)); + EnablePopupTimeouts(optDlg, IsDlgButtonChecked(optDlg, IDC_OPT_POPUPS_DEFAULT_TIMEOUT)); EnablePopupColors(optDlg, _getOptB("PopupDefaultColors", defaultPopupDefaultColors), _getOptB("PopupWindowsColors", defaultPopupWindowsColors)); @@ -85,7 +85,7 @@ INT_PTR CALLBACK DlgProcOptionsPopups(HWND optDlg, UINT msg, WPARAM wParam, LPAR return FALSE; switch (LOWORD(wParam)) { case IDC_OPT_POPUPS_ENABLED: - bEnabled = SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_ENABLED, BM_GETCHECK, 0, 0); + bEnabled = IsDlgButtonChecked(optDlg, IDC_OPT_POPUPS_ENABLED); EnablePopupControls(optDlg, bEnabled); case IDC_OPT_POPUPS_NOTIFY_BLOCKED: case IDC_OPT_POPUPS_NOTIFY_APPROVED: @@ -94,9 +94,9 @@ INT_PTR CALLBACK DlgProcOptionsPopups(HWND optDlg, UINT msg, WPARAM wParam, LPAR case IDC_OPT_POPUPS_WINDOWS_COLORS: case IDC_OPT_POPUPS_DEFAULT_TIMEOUT: EnablePopupColors(optDlg, - SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_DEFAULT_COLORS, BM_GETCHECK, 0, 0), - SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_WINDOWS_COLORS, BM_GETCHECK, 0, 0)); - EnablePopupTimeouts(optDlg, SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_DEFAULT_TIMEOUT, BM_GETCHECK, 0, 0)); + IsDlgButtonChecked(optDlg, IDC_OPT_POPUPS_DEFAULT_COLORS), + IsDlgButtonChecked(optDlg, IDC_OPT_POPUPS_WINDOWS_COLORS)); + EnablePopupTimeouts(optDlg, IsDlgButtonChecked(optDlg, IDC_OPT_POPUPS_DEFAULT_TIMEOUT)); if (HIWORD(wParam) != BN_CLICKED) return FALSE; @@ -118,13 +118,13 @@ INT_PTR CALLBACK DlgProcOptionsPopups(HWND optDlg, UINT msg, WPARAM wParam, LPAR case WM_NOTIFY: switch (((NMHDR*)lParam)->code) { case PSN_APPLY: - _setOptB("NotifyPopup", SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_ENABLED, BM_GETCHECK, 0, 0)); - _setOptB("NotifyPopupBlocked", SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_NOTIFY_BLOCKED, BM_GETCHECK, 0, 0)); - _setOptB("NotifyPopupApproved", SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_NOTIFY_APPROVED, BM_GETCHECK, 0, 0)); - _setOptB("NotifyPopupChallenge", SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_NOTIFY_CHALLENGE, BM_GETCHECK, 0, 0)); - _setOptB("PopupDefaultColors", SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_DEFAULT_COLORS, BM_GETCHECK, 0, 0)); - _setOptB("PopupWindowsColors", SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_WINDOWS_COLORS, BM_GETCHECK, 0, 0)); - _setOptB("PopupDefaultTimeout", SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_DEFAULT_TIMEOUT, BM_GETCHECK, 0, 0)); + _setOptB("NotifyPopup", IsDlgButtonChecked(optDlg, IDC_OPT_POPUPS_ENABLED)); + _setOptB("NotifyPopupBlocked", IsDlgButtonChecked(optDlg, IDC_OPT_POPUPS_NOTIFY_BLOCKED)); + _setOptB("NotifyPopupApproved", IsDlgButtonChecked(optDlg, IDC_OPT_POPUPS_NOTIFY_APPROVED)); + _setOptB("NotifyPopupChallenge", IsDlgButtonChecked(optDlg, IDC_OPT_POPUPS_NOTIFY_CHALLENGE)); + _setOptB("PopupDefaultColors", IsDlgButtonChecked(optDlg, IDC_OPT_POPUPS_DEFAULT_COLORS)); + _setOptB("PopupWindowsColors", IsDlgButtonChecked(optDlg, IDC_OPT_POPUPS_WINDOWS_COLORS)); + _setOptB("PopupDefaultTimeout", IsDlgButtonChecked(optDlg, IDC_OPT_POPUPS_DEFAULT_TIMEOUT)); _saveDlgItemInt(optDlg, IDC_OPT_POPUPS_BLOCKED_TIMEOUT, "PopupBlockedTimeout"); _saveDlgItemInt(optDlg, IDC_OPT_POPUPS_APPROVED_TIMEOUT, "PopupApprovedTimeout"); _saveDlgItemInt(optDlg, IDC_OPT_POPUPS_CHALLENGE_TIMEOUT, "PopupChallengeTimeout"); @@ -171,17 +171,17 @@ int ShowPopupPreview(HWND optDlg, BYTE popupType, TCHAR *line1, TCHAR *line2) ppdp.lchIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE); break; } - if (SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_WINDOWS_COLORS, BM_GETCHECK, 0, 0)) { + if (IsDlgButtonChecked(optDlg, IDC_OPT_POPUPS_WINDOWS_COLORS)) { ppdp.colorText = GetSysColor(COLOR_WINDOWTEXT); ppdp.colorBack = GetSysColor(COLOR_WINDOW); } - if (SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_DEFAULT_COLORS, BM_GETCHECK, 0, 0)) { + if (IsDlgButtonChecked(optDlg, IDC_OPT_POPUPS_DEFAULT_COLORS)) { ppdp.colorText = NULL; ppdp.colorBack = NULL; } if (ppdp.iSeconds < 1) ppdp.iSeconds = -1; - if (SendDlgItemMessage(optDlg, IDC_OPT_POPUPS_DEFAULT_TIMEOUT, BM_GETCHECK, 0, 0) || popupType == POPUP_DEFAULT) + if (IsDlgButtonChecked(optDlg, IDC_OPT_POPUPS_DEFAULT_TIMEOUT) || popupType == POPUP_DEFAULT) ppdp.iSeconds = 0; ppdp.lchContact = NULL; diff --git a/plugins/StopSpamMod/src/options.cpp b/plugins/StopSpamMod/src/options.cpp index 52a2fe7577..9dafe29905 100755 --- a/plugins/StopSpamMod/src/options.cpp +++ b/plugins/StopSpamMod/src/options.cpp @@ -60,12 +60,12 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) case PSN_APPLY: { db_set_dw(NULL, pluginName, "maxQuestCount", gbMaxQuestCount = GetDlgItemInt(hwnd, ID_MAXQUESTCOUNT, NULL, FALSE)); - db_set_b(NULL, pluginName, "infTalkProtection", gbInfTalkProtection = BST_CHECKED == SendDlgItemMessage(hwnd, ID_INFTALKPROT, BM_GETCHECK, 0, 0)); - db_set_b(NULL, pluginName, "addPermanent", gbAddPermanent = BST_CHECKED == SendDlgItemMessage(hwnd, ID_ADDPERMANENT, BM_GETCHECK, 0, 0)); - db_set_b(NULL, pluginName, "handleAuthReq", gbHandleAuthReq = BST_CHECKED == SendDlgItemMessage(hwnd, ID_HANDLEAUTHREQ, BM_GETCHECK, 0, 0)); - db_set_b(NULL, pluginName, "HideContacts", gbHideContacts = BST_CHECKED == SendDlgItemMessage(hwnd, ID_HIDECONTACTS, BM_GETCHECK, 0, 0)); - db_set_b(NULL, pluginName, "IgnoreContacts", gbIgnoreContacts = BST_CHECKED == SendDlgItemMessage(hwnd, ID_IGNORESPAMMERS, BM_GETCHECK, 0, 0)); - db_set_b(NULL, pluginName, "LogSpamToFile", gbLogToFile = BST_CHECKED == SendDlgItemMessage(hwnd, ID_LOGSPAMTOFILE, BM_GETCHECK, 0, 0)); + db_set_b(NULL, pluginName, "infTalkProtection", gbInfTalkProtection = BST_CHECKED == IsDlgButtonChecked(hwnd, ID_INFTALKPROT)); + db_set_b(NULL, pluginName, "addPermanent", gbAddPermanent = BST_CHECKED == IsDlgButtonChecked(hwnd, ID_ADDPERMANENT)); + db_set_b(NULL, pluginName, "handleAuthReq", gbHandleAuthReq = BST_CHECKED == IsDlgButtonChecked(hwnd, ID_HANDLEAUTHREQ)); + db_set_b(NULL, pluginName, "HideContacts", gbHideContacts = BST_CHECKED == IsDlgButtonChecked(hwnd, ID_HIDECONTACTS)); + db_set_b(NULL, pluginName, "IgnoreContacts", gbIgnoreContacts = BST_CHECKED == IsDlgButtonChecked(hwnd, ID_IGNORESPAMMERS)); + db_set_b(NULL, pluginName, "LogSpamToFile", gbLogToFile = BST_CHECKED == IsDlgButtonChecked(hwnd, ID_LOGSPAMTOFILE)); } return TRUE; } @@ -299,9 +299,9 @@ INT_PTR CALLBACK AdvancedDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar NMHDR* nmhdr = (NMHDR*)lParam; switch (nmhdr->code) { case PSN_APPLY: - db_set_b(NULL, pluginName, "CaseInsensitive", gbCaseInsensitive = BST_CHECKED == SendDlgItemMessage(hwnd, IDC_CASE_INSENSITIVE, BM_GETCHECK, 0, 0)); - db_set_b(NULL, pluginName, "DisableInInvis", gbInvisDisable = BST_CHECKED == SendDlgItemMessage(hwnd, IDC_INVIS_DISABLE, BM_GETCHECK, 0, 0)); - db_set_b(NULL, pluginName, "DOSIntegration", gbDosServiceIntegration = BST_CHECKED == SendDlgItemMessage(hwnd, ID_DOS_INTEGRATION, BM_GETCHECK, 0, 0)); + db_set_b(NULL, pluginName, "CaseInsensitive", gbCaseInsensitive = BST_CHECKED == IsDlgButtonChecked(hwnd, IDC_CASE_INSENSITIVE)); + db_set_b(NULL, pluginName, "DisableInInvis", gbInvisDisable = BST_CHECKED == IsDlgButtonChecked(hwnd, IDC_INVIS_DISABLE)); + db_set_b(NULL, pluginName, "DOSIntegration", gbDosServiceIntegration = BST_CHECKED == IsDlgButtonChecked(hwnd, ID_DOS_INTEGRATION)); { static tstring NewGroupName, CurrentGroupName; NewGroupName = GetDlgItemString(hwnd, ID_SPECIALGROUPNAME); @@ -314,18 +314,18 @@ INT_PTR CALLBACK AdvancedDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar CreateCListGroup((TCHAR*)gbSpammersGroup.c_str()); } } - db_set_b(NULL, pluginName, "SpecialGroup", gbSpecialGroup = BST_CHECKED == SendDlgItemMessage(hwnd, ID_SPECIALGROUP, BM_GETCHECK, 0, 0)); - db_set_b(NULL, pluginName, "ExcludeContacts", gbExclude = BST_CHECKED == SendDlgItemMessage(hwnd, ID_EXCLUDE, BM_GETCHECK, 0, 0)); - db_set_b(NULL, pluginName, "DelExcluded", gbDelExcluded = BST_CHECKED == SendDlgItemMessage(hwnd, ID_REMOVE_TMP, BM_GETCHECK, 0, 0)); - db_set_b(NULL, pluginName, "DelAllTempory", gbDelAllTempory = BST_CHECKED == SendDlgItemMessage(hwnd, ID_REMOVE_TMP_ALL, BM_GETCHECK, 0, 0)); - db_set_b(NULL, pluginName, "IgnoreURL", gbIgnoreURL = BST_CHECKED == SendDlgItemMessage(hwnd, ID_IGNOREURL, BM_GETCHECK, 0, 0)); + db_set_b(NULL, pluginName, "SpecialGroup", gbSpecialGroup = BST_CHECKED == IsDlgButtonChecked(hwnd, ID_SPECIALGROUP)); + db_set_b(NULL, pluginName, "ExcludeContacts", gbExclude = BST_CHECKED == IsDlgButtonChecked(hwnd, ID_EXCLUDE)); + db_set_b(NULL, pluginName, "DelExcluded", gbDelExcluded = BST_CHECKED == IsDlgButtonChecked(hwnd, ID_REMOVE_TMP)); + db_set_b(NULL, pluginName, "DelAllTempory", gbDelAllTempory = BST_CHECKED == IsDlgButtonChecked(hwnd, ID_REMOVE_TMP_ALL)); + db_set_b(NULL, pluginName, "IgnoreURL", gbIgnoreURL = BST_CHECKED == IsDlgButtonChecked(hwnd, ID_IGNOREURL)); - db_set_b(NULL, pluginName, "AutoAuth", gbAutoAuth = BST_CHECKED == SendDlgItemMessage(hwnd, IDC_AUTOAUTH, BM_GETCHECK, 0, 0)); - db_set_b(NULL, pluginName, "AutoAddToServerList", gbAutoAddToServerList = BST_CHECKED == SendDlgItemMessage(hwnd, IDC_ADDTOSRVLST, BM_GETCHECK, 0, 0)); - db_set_b(NULL, pluginName, "AutoReqAuth", gbAutoReqAuth = BST_CHECKED == SendDlgItemMessage(hwnd, IDC_REQAUTH, BM_GETCHECK, 0, 0)); - db_set_b(NULL, pluginName, "RegexMatch", gbRegexMatch = BST_CHECKED == SendDlgItemMessage(hwnd, IDC_REGEX, BM_GETCHECK, 0, 0)); - db_set_b(NULL, pluginName, "HistoryLog", gbHistoryLog = BST_CHECKED == SendDlgItemMessage(hwnd, IDC_HISTORY_LOG, BM_GETCHECK, 0, 0)); - db_set_b(NULL, pluginName, "MathExpression", gbMathExpression = BST_CHECKED == SendDlgItemMessage(hwnd, IDC_MATH_QUESTION, BM_GETCHECK, 0, 0)); + db_set_b(NULL, pluginName, "AutoAuth", gbAutoAuth = BST_CHECKED == IsDlgButtonChecked(hwnd, IDC_AUTOAUTH)); + db_set_b(NULL, pluginName, "AutoAddToServerList", gbAutoAddToServerList = BST_CHECKED == IsDlgButtonChecked(hwnd, IDC_ADDTOSRVLST)); + db_set_b(NULL, pluginName, "AutoReqAuth", gbAutoReqAuth = BST_CHECKED == IsDlgButtonChecked(hwnd, IDC_REQAUTH)); + db_set_b(NULL, pluginName, "RegexMatch", gbRegexMatch = BST_CHECKED == IsDlgButtonChecked(hwnd, IDC_REGEX)); + db_set_b(NULL, pluginName, "HistoryLog", gbHistoryLog = BST_CHECKED == IsDlgButtonChecked(hwnd, IDC_HISTORY_LOG)); + db_set_b(NULL, pluginName, "MathExpression", gbMathExpression = BST_CHECKED == IsDlgButtonChecked(hwnd, IDC_MATH_QUESTION)); { static tstring NewAGroupName, CurrentAGroupName; diff --git a/plugins/StopSpamPlus/src/options.cpp b/plugins/StopSpamPlus/src/options.cpp index 75c7dfae38..cf0b83632b 100644 --- a/plugins/StopSpamPlus/src/options.cpp +++ b/plugins/StopSpamPlus/src/options.cpp @@ -48,12 +48,12 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) case PSN_APPLY: { plSets->MaxQuestCount=GetDlgItemInt(hwnd, ID_MAXQUESTCOUNT, NULL, FALSE); - plSets->InfTalkProtection=(BST_CHECKED == SendDlgItemMessage(hwnd, ID_INFTALKPROT, BM_GETCHECK, 0, 0)); - plSets->AddPermanent=(BST_CHECKED == SendDlgItemMessage(hwnd, ID_ADDPERMANENT, BM_GETCHECK, 0, 0)); - plSets->HandleAuthReq=(BST_CHECKED == SendDlgItemMessage(hwnd, ID_HANDLEAUTHREQ, BM_GETCHECK, 0, 0)); - plSets->AnswNotCaseSens=(BST_CHECKED == SendDlgItemMessage(hwnd, ID_NOTCASESENS, BM_GETCHECK, 0, 0)); - plSets->RemTmpAll=(BST_CHECKED == SendDlgItemMessage(hwnd, ID_REMOVE_TMP_ALL, BM_GETCHECK, 0, 0)); - plSets->HistLog=(BST_CHECKED == SendDlgItemMessage(hwnd, ID_HISTORY_LOG, BM_GETCHECK, 0, 0)); + plSets->InfTalkProtection=(BST_CHECKED == IsDlgButtonChecked(hwnd, ID_INFTALKPROT)); + plSets->AddPermanent=(BST_CHECKED == IsDlgButtonChecked(hwnd, ID_ADDPERMANENT)); + plSets->HandleAuthReq=(BST_CHECKED == IsDlgButtonChecked(hwnd, ID_HANDLEAUTHREQ)); + plSets->AnswNotCaseSens=(BST_CHECKED == IsDlgButtonChecked(hwnd, ID_NOTCASESENS)); + plSets->RemTmpAll=(BST_CHECKED == IsDlgButtonChecked(hwnd, ID_REMOVE_TMP_ALL)); + plSets->HistLog=(BST_CHECKED == IsDlgButtonChecked(hwnd, ID_HISTORY_LOG)); } return TRUE; } diff --git a/plugins/UserInfoEx/src/psp_general.cpp b/plugins/UserInfoEx/src/psp_general.cpp index e01e8cecee..cd8dc48184 100644 --- a/plugins/UserInfoEx/src/psp_general.cpp +++ b/plugins/UserInfoEx/src/psp_general.cpp @@ -110,9 +110,9 @@ INT_PTR CALLBACK PSPProcGeneral(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar // gender { BYTE gender - = SendDlgItemMessage(hDlg, RADIO_FEMALE, BM_GETCHECK, NULL, NULL) + = IsDlgButtonChecked(hDlg, RADIO_FEMALE) ? 'F' - : SendDlgItemMessage(hDlg, RADIO_MALE, BM_GETCHECK, NULL, NULL) + : IsDlgButtonChecked(hDlg, RADIO_MALE) ? 'M' : 0; diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp index f779891127..9cb6636499 100644 --- a/plugins/UserInfoEx/src/psp_options.cpp +++ b/plugins/UserInfoEx/src/psp_options.cpp @@ -858,9 +858,9 @@ static INT_PTR CALLBACK DlgProc_Popups(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR DBWriteColor(hDlg, CLR_BBACK, SET_POPUP_BIRTHDAY_COLOR_BACK); DBWriteColor(hDlg, CLR_BTEXT, SET_POPUP_BIRTHDAY_COLOR_TEXT); db_set_b(NULL, MODNAME, SET_POPUP_BIRTHDAY_COLORTYPE, - SendDlgItemMessage(hDlg, CHECK_OPT_POPUP_DEFCLR, BM_GETCHECK, NULL, NULL) + IsDlgButtonChecked(hDlg, CHECK_OPT_POPUP_DEFCLR) ? POPUP_COLOR_DEFAULT - : SendDlgItemMessage(hDlg, CHECK_OPT_POPUP_WINCLR, BM_GETCHECK, NULL, NULL) + : IsDlgButtonChecked(hDlg, CHECK_OPT_POPUP_WINCLR) ? POPUP_COLOR_WINDOWS : POPUP_COLOR_CUSTOM); @@ -868,16 +868,16 @@ static INT_PTR CALLBACK DlgProc_Popups(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR DBWriteColor(hDlg, CLR_ABACK, SET_POPUP_ANNIVERSARY_COLOR_BACK); DBWriteColor(hDlg, CLR_ATEXT, SET_POPUP_ANNIVERSARY_COLOR_TEXT); db_set_b(NULL, MODNAME, SET_POPUP_ANNIVERSARY_COLORTYPE, - SendDlgItemMessage(hDlg, CHECK_OPT_POPUP_ADEFCLR, BM_GETCHECK, NULL, NULL) + IsDlgButtonChecked(hDlg, CHECK_OPT_POPUP_ADEFCLR) ? POPUP_COLOR_DEFAULT - : SendDlgItemMessage(hDlg, CHECK_OPT_POPUP_AWINCLR, BM_GETCHECK, NULL, NULL) + : IsDlgButtonChecked(hDlg, CHECK_OPT_POPUP_AWINCLR) ? POPUP_COLOR_WINDOWS : POPUP_COLOR_CUSTOM); // save delay - if (SendDlgItemMessage(hDlg, RADIO_OPT_POPUP_PERMANENT, BM_GETCHECK, NULL, NULL)) + if (IsDlgButtonChecked(hDlg, RADIO_OPT_POPUP_PERMANENT)) db_set_b(NULL, MODNAME, SET_POPUP_DELAY, 255); - else if (SendDlgItemMessage(hDlg, RADIO_OPT_POPUP_CUSTOM, BM_GETCHECK, NULL, NULL)) { + else if (IsDlgButtonChecked(hDlg, RADIO_OPT_POPUP_CUSTOM)) { TCHAR szDelay[4]; GetDlgItemText(hDlg, EDIT_DELAY, szDelay, SIZEOF(szDelay)); db_set_b(NULL, MODNAME, SET_POPUP_DELAY, (BYTE)_tcstol(szDelay, NULL, 10)); @@ -957,8 +957,8 @@ static INT_PTR CALLBACK DlgProc_Popups(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR case CHECK_OPT_POPUP_DEFCLR: case CHECK_OPT_POPUP_WINCLR: if (HIWORD(wParam) == BN_CLICKED) { - int bDefClr = SendDlgItemMessage(hDlg, CHECK_OPT_POPUP_DEFCLR, BM_GETCHECK, NULL, NULL); - int bWinClr = SendDlgItemMessage(hDlg, CHECK_OPT_POPUP_WINCLR, BM_GETCHECK, NULL, NULL); + int bDefClr = IsDlgButtonChecked(hDlg, CHECK_OPT_POPUP_DEFCLR); + int bWinClr = IsDlgButtonChecked(hDlg, CHECK_OPT_POPUP_WINCLR); EnableDlgItem(hDlg, CHECK_OPT_POPUP_DEFCLR, !bWinClr); EnableDlgItem(hDlg, CHECK_OPT_POPUP_WINCLR, !bDefClr); @@ -974,8 +974,8 @@ static INT_PTR CALLBACK DlgProc_Popups(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR case CHECK_OPT_POPUP_ADEFCLR: case CHECK_OPT_POPUP_AWINCLR: if (HIWORD(wParam) == BN_CLICKED) { - int bDefClr = SendDlgItemMessage(hDlg, CHECK_OPT_POPUP_ADEFCLR, BM_GETCHECK, NULL, NULL); - int bWinClr = SendDlgItemMessage(hDlg, CHECK_OPT_POPUP_AWINCLR, BM_GETCHECK, NULL, NULL); + int bDefClr = IsDlgButtonChecked(hDlg, CHECK_OPT_POPUP_ADEFCLR); + int bWinClr = IsDlgButtonChecked(hDlg, CHECK_OPT_POPUP_AWINCLR); EnableDlgItem(hDlg, CHECK_OPT_POPUP_ADEFCLR, !bWinClr); EnableDlgItem(hDlg, CHECK_OPT_POPUP_AWINCLR, !bDefClr); diff --git a/plugins/YARelay/src/options.cpp b/plugins/YARelay/src/options.cpp index e7444393a6..ddb28dc58b 100644 --- a/plugins/YARelay/src/options.cpp +++ b/plugins/YARelay/src/options.cpp @@ -144,27 +144,27 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, case PSN_KILLACTIVE: // read all data from options frame - if (SendDlgItemMessage(hwndDlg, IDC_RADIO_ALL, BM_GETCHECK, 0, 0) == BST_CHECKED) + if (IsDlgButtonChecked(hwndDlg, IDC_RADIO_ALL) == BST_CHECKED) hForwardFrom = 0; else hForwardFrom = (MCONTACT)SendDlgItemMessage(hwndDlg, IDC_COMBO_FROM, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_COMBO_FROM, CB_GETCURSEL, 0, 0), 0); hForwardTo = (MCONTACT)SendDlgItemMessage(hwndDlg, IDC_COMBO_TO, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_COMBO_TO, CB_GETCURSEL, 0, 0), 0); iForwardOnStatus = 0; - if (SendDlgItemMessage(hwndDlg, IDC_CHECK1, BM_GETCHECK, 0, 0) == BST_CHECKED) iForwardOnStatus |= STATUS_OFFLINE; - if (SendDlgItemMessage(hwndDlg, IDC_CHECK2, BM_GETCHECK, 0, 0) == BST_CHECKED) iForwardOnStatus |= STATUS_ONLINE; - if (SendDlgItemMessage(hwndDlg, IDC_CHECK3, BM_GETCHECK, 0, 0) == BST_CHECKED) iForwardOnStatus |= STATUS_AWAY; - if (SendDlgItemMessage(hwndDlg, IDC_CHECK4, BM_GETCHECK, 0, 0) == BST_CHECKED) iForwardOnStatus |= STATUS_NA; - if (SendDlgItemMessage(hwndDlg, IDC_CHECK5, BM_GETCHECK, 0, 0) == BST_CHECKED) iForwardOnStatus |= STATUS_OCCUPIED; - if (SendDlgItemMessage(hwndDlg, IDC_CHECK6, BM_GETCHECK, 0, 0) == BST_CHECKED) iForwardOnStatus |= STATUS_DND; - if (SendDlgItemMessage(hwndDlg, IDC_CHECK7, BM_GETCHECK, 0, 0) == BST_CHECKED) iForwardOnStatus |= STATUS_FREECHAT; - if (SendDlgItemMessage(hwndDlg, IDC_CHECK8, BM_GETCHECK, 0, 0) == BST_CHECKED) iForwardOnStatus |= STATUS_INVISIBLE; + if (IsDlgButtonChecked(hwndDlg, IDC_CHECK1) == BST_CHECKED) iForwardOnStatus |= STATUS_OFFLINE; + if (IsDlgButtonChecked(hwndDlg, IDC_CHECK2) == BST_CHECKED) iForwardOnStatus |= STATUS_ONLINE; + if (IsDlgButtonChecked(hwndDlg, IDC_CHECK3) == BST_CHECKED) iForwardOnStatus |= STATUS_AWAY; + if (IsDlgButtonChecked(hwndDlg, IDC_CHECK4) == BST_CHECKED) iForwardOnStatus |= STATUS_NA; + if (IsDlgButtonChecked(hwndDlg, IDC_CHECK5) == BST_CHECKED) iForwardOnStatus |= STATUS_OCCUPIED; + if (IsDlgButtonChecked(hwndDlg, IDC_CHECK6) == BST_CHECKED) iForwardOnStatus |= STATUS_DND; + if (IsDlgButtonChecked(hwndDlg, IDC_CHECK7) == BST_CHECKED) iForwardOnStatus |= STATUS_FREECHAT; + if (IsDlgButtonChecked(hwndDlg, IDC_CHECK8) == BST_CHECKED) iForwardOnStatus |= STATUS_INVISIBLE; GetDlgItemText(hwndDlg, IDC_EDIT_TEMPLATE, tszForwardTemplate, SIZEOF(tszForwardTemplate)); - if (SendDlgItemMessage(hwndDlg, IDC_CHECK_SPLIT, BM_GETCHECK, 0, 0) == BST_CHECKED) iSplit = 1; else iSplit = 0; + if (IsDlgButtonChecked(hwndDlg, IDC_CHECK_SPLIT) == BST_CHECKED) iSplit = 1; else iSplit = 0; iSplitMaxSize = GetDlgItemInt(hwndDlg, IDC_EDIT_MAXSIZE, NULL, FALSE); iSendParts = GetDlgItemInt(hwndDlg, IDC_EDIT_SENDPARTS, NULL, FALSE); - if (SendDlgItemMessage(hwndDlg, IDC_CHECK_MARKREAD, BM_GETCHECK, 0, 0) == BST_CHECKED) iMarkRead = 1; else iMarkRead = 0; - if (SendDlgItemMessage(hwndDlg, IDC_CHECK_SAVEHISTORY, BM_GETCHECK, 0, 0) == BST_CHECKED) iSendAndHistory = 1; else iSendAndHistory = 0; + if (IsDlgButtonChecked(hwndDlg, IDC_CHECK_MARKREAD) == BST_CHECKED) iMarkRead = 1; else iMarkRead = 0; + if (IsDlgButtonChecked(hwndDlg, IDC_CHECK_SAVEHISTORY) == BST_CHECKED) iSendAndHistory = 1; else iSendAndHistory = 0; if (iSplitMaxSize <= 0) iSplitMaxSize = 1; diff --git a/protocols/JabberG/src/jabber_bookmarks.cpp b/protocols/JabberG/src/jabber_bookmarks.cpp index 3cf333e04a..096829ecfb 100644 --- a/protocols/JabberG/src/jabber_bookmarks.cpp +++ b/protocols/JabberG/src/jabber_bookmarks.cpp @@ -73,7 +73,7 @@ static INT_PTR CALLBACK JabberAddBookmarkDlgProc(HWND hwndDlg, UINT msg, WPARAM if (item->nick) SetDlgItemText(hwndDlg, IDC_NICK, item->nick); if (item->password) SetDlgItemText(hwndDlg, IDC_PASSWORD, item->password); if (item->bAutoJoin) SendDlgItemMessage(hwndDlg, IDC_CHECK_BM_AUTOJOIN, BM_SETCHECK, BST_CHECKED, 0); - if (SendDlgItemMessage(hwndDlg, IDC_ROOM_RADIO, BM_GETCHECK,0, 0) == BST_CHECKED) + if (IsDlgButtonChecked(hwndDlg, IDC_ROOM_RADIO) == BST_CHECKED) EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_BM_AUTOJOIN), TRUE); } else { @@ -117,7 +117,7 @@ static INT_PTR CALLBACK JabberAddBookmarkDlgProc(HWND hwndDlg, UINT msg, WPARAM item = param->ppro->ListAdd(LIST_BOOKMARK, roomJID); - if (SendDlgItemMessage(hwndDlg, IDC_URL_RADIO, BM_GETCHECK,0, 0) == BST_CHECKED) + if (IsDlgButtonChecked(hwndDlg, IDC_URL_RADIO) == BST_CHECKED) replaceStrT(item->type, _T("url")); else replaceStrT(item->type, _T("conference")); @@ -131,7 +131,7 @@ static INT_PTR CALLBACK JabberAddBookmarkDlgProc(HWND hwndDlg, UINT msg, WPARAM GetDlgItemText(hwndDlg, IDC_NAME, text, SIZEOF(text)); replaceStrT(item->name, (text[0] == 0) ? roomJID : text); - item->bAutoJoin = (SendDlgItemMessage(hwndDlg, IDC_CHECK_BM_AUTOJOIN, BM_GETCHECK,0, 0) == BST_CHECKED); + item->bAutoJoin = (IsDlgButtonChecked(hwndDlg, IDC_CHECK_BM_AUTOJOIN) == BST_CHECKED); XmlNodeIq iq( param->ppro->AddIQ(&CJabberProto::OnIqResultSetBookmarks, JABBER_IQ_TYPE_SET)); param->ppro->SetBookmarkRequest(iq); diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index a827272696..84965993ad 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -518,13 +518,13 @@ public: m_pRule->SetAction(nCurSel ? TRUE : FALSE); DWORD dwPackets = 0; - if (BST_CHECKED == SendDlgItemMessage(m_hwnd, IDC_CHECK_MESSAGES, BM_GETCHECK, 0, 0)) + if (BST_CHECKED == IsDlgButtonChecked(m_hwnd, IDC_CHECK_MESSAGES)) dwPackets |= JABBER_PL_RULE_TYPE_MESSAGE; - if (BST_CHECKED == SendDlgItemMessage(m_hwnd, IDC_CHECK_PRESENCE_IN, BM_GETCHECK, 0, 0)) + if (BST_CHECKED == IsDlgButtonChecked(m_hwnd, IDC_CHECK_PRESENCE_IN)) dwPackets |= JABBER_PL_RULE_TYPE_PRESENCE_IN; - if (BST_CHECKED == SendDlgItemMessage(m_hwnd, IDC_CHECK_PRESENCE_OUT, BM_GETCHECK, 0, 0)) + if (BST_CHECKED == IsDlgButtonChecked(m_hwnd, IDC_CHECK_PRESENCE_OUT)) dwPackets |= JABBER_PL_RULE_TYPE_PRESENCE_OUT; - if (BST_CHECKED == SendDlgItemMessage(m_hwnd, IDC_CHECK_QUERIES, BM_GETCHECK, 0, 0)) + if (BST_CHECKED == IsDlgButtonChecked(m_hwnd, IDC_CHECK_QUERIES)) dwPackets |= JABBER_PL_RULE_TYPE_IQ; if (!dwPackets) dwPackets = JABBER_PL_RULE_TYPE_ALL; diff --git a/protocols/SkypeClassic/src/skypeopt.cpp b/protocols/SkypeClassic/src/skypeopt.cpp index 48c54273dd..bd77136954 100644 --- a/protocols/SkypeClassic/src/skypeopt.cpp +++ b/protocols/SkypeClassic/src/skypeopt.cpp @@ -399,8 +399,8 @@ INT_PTR CALLBACK OptionsProxyDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPA GetDlgItemTextA(hwndDlg, IDC_HOST, buf, SIZEOF(buf)); db_set_s(NULL, SKYPE_PROTONAME, "Host", buf); db_set_w(NULL, SKYPE_PROTONAME, "Port", (unsigned short)GetDlgItemInt(hwndDlg, IDC_PORT, NULL, FALSE)); - db_set_b(NULL, SKYPE_PROTONAME, "RequiresPassword", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_REQPASS, BM_GETCHECK, 0, 0))); - db_set_b (NULL, SKYPE_PROTONAME, "UseSkype2Socket", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_USES2S, BM_GETCHECK, 0, 0))); + db_set_b(NULL, SKYPE_PROTONAME, "RequiresPassword", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_REQPASS))); + db_set_b (NULL, SKYPE_PROTONAME, "UseSkype2Socket", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_USES2S))); memset(buf, 0, sizeof(buf)); GetDlgItemTextA(hwndDlg, IDC_PASSWORD, buf, SIZEOF(buf)); db_set_s(NULL, SKYPE_PROTONAME, "Password", buf); @@ -413,12 +413,12 @@ INT_PTR CALLBACK OptionsProxyDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPA switch (LOWORD(wParam)) { case IDC_USES2S: for (i=0; i < SIZEOF(Skype2SocketControls); i++) - EnableWindow(GetDlgItem(hwndDlg, Skype2SocketControls[i]), SendDlgItemMessage(hwndDlg, LOWORD(wParam), BM_GETCHECK, 0, 0)); - if (SendDlgItemMessage(hwndDlg, LOWORD(wParam), BM_GETCHECK, 0, 0)) + EnableWindow(GetDlgItem(hwndDlg, Skype2SocketControls[i]), IsDlgButtonChecked(hwndDlg, LOWORD(wParam))); + if (IsDlgButtonChecked(hwndDlg, LOWORD(wParam))) SendMessage(hwndDlg, WM_COMMAND, IDC_REQPASS, 0); break; case IDC_REQPASS: - EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), SendDlgItemMessage(hwndDlg, LOWORD(wParam), BM_GETCHECK, 0, 0)); + EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), IsDlgButtonChecked(hwndDlg, LOWORD(wParam))); break; } @@ -480,19 +480,19 @@ INT_PTR CALLBACK OptionsAdvancedDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, switch (nmhdr->code){ case PSN_APPLY: case PSN_KILLACTIVE: - db_set_b (NULL, SKYPE_PROTONAME, "EnableMenu", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_ENABLEMENU, BM_GETCHECK, 0, 0))); - db_set_b (NULL, SKYPE_PROTONAME, "UsePopup", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_USEPOPUP, BM_GETCHECK, 0, 0))); - db_set_b (NULL, SKYPE_PROTONAME, "UseGroupchat", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_GROUPCHAT, BM_GETCHECK, 0, 0))); - db_set_b (NULL, SKYPE_PROTONAME, "MarkGroupchatRead", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_GROUPCHATREAD, BM_GETCHECK, 0, 0))); - db_set_b (NULL, SKYPE_PROTONAME, "SuppressErrors", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_NOERRORS, BM_GETCHECK, 0, 0))); - db_set_b (NULL, SKYPE_PROTONAME, "KeepState", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_KEEPSTATE, BM_GETCHECK, 0, 0))); + db_set_b (NULL, SKYPE_PROTONAME, "EnableMenu", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_ENABLEMENU))); + db_set_b (NULL, SKYPE_PROTONAME, "UsePopup", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_USEPOPUP))); + db_set_b (NULL, SKYPE_PROTONAME, "UseGroupchat", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_GROUPCHAT))); + db_set_b (NULL, SKYPE_PROTONAME, "MarkGroupchatRead", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_GROUPCHATREAD))); + db_set_b (NULL, SKYPE_PROTONAME, "SuppressErrors", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_NOERRORS))); + db_set_b (NULL, SKYPE_PROTONAME, "KeepState", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_KEEPSTATE))); db_set_dw(NULL, SKYPE_PROTONAME, "SkypeOutStatusMode", SendDlgItemMessage(hwndDlg, IDC_SKYPEOUTSTAT, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_SKYPEOUTSTAT, CB_GETCURSEL, 0, 0), 0)); - db_set_b (NULL, SKYPE_PROTONAME, "UseTimeZonePatch", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_TIMEZONE, BM_GETCHECK, 0, 0))); - db_set_b (NULL, SKYPE_PROTONAME, "IgnoreTimeZones", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_IGNTZ, BM_GETCHECK, 0, 0))); - db_set_b (NULL, SKYPE_PROTONAME, "ShowDefaultSkypeAvatar", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_SHOWDEFAULTAVATAR, BM_GETCHECK, 0, 0))); - db_set_b (NULL, SKYPE_PROTONAME, "SuppressCallSummaryMessage", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_SUPPRESSCALLSUMMARYMESSAGE, BM_GETCHECK, 0, 0))); - db_set_b (NULL, SKYPE_PROTONAME, "NoSkype3Stats", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_NOSKYPE3STATS, BM_GETCHECK, 0, 0))); - db_set_b (NULL, SKYPE_PROTONAME, "ShowFullname", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_SHOWFULLNAME, BM_GETCHECK, 0, 0))); + db_set_b (NULL, SKYPE_PROTONAME, "UseTimeZonePatch", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_TIMEZONE))); + db_set_b (NULL, SKYPE_PROTONAME, "IgnoreTimeZones", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_IGNTZ))); + db_set_b (NULL, SKYPE_PROTONAME, "ShowDefaultSkypeAvatar", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_SHOWDEFAULTAVATAR))); + db_set_b (NULL, SKYPE_PROTONAME, "SuppressCallSummaryMessage", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_SUPPRESSCALLSUMMARYMESSAGE))); + db_set_b (NULL, SKYPE_PROTONAME, "NoSkype3Stats", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_NOSKYPE3STATS))); + db_set_b (NULL, SKYPE_PROTONAME, "ShowFullname", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_SHOWFULLNAME))); return TRUE; } break; @@ -573,11 +573,11 @@ INT_PTR CALLBACK OptionsDefaultDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L for(i=0; i < sizeof(skypeLaunchControls)/sizeof(skypeLaunchControls[0]); i++) EnableWindow(GetDlgItem(hwndDlg, skypeLaunchControls[i]), startSkype); - EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSECMDL), startSkype && SendDlgItemMessage(hwndDlg, IDC_CUSTOMCOMMAND, BM_GETCHECK, 0, 0)); - EnableWindow(GetDlgItem(hwndDlg, IDC_COMMANDLINE), startSkype && SendDlgItemMessage(hwndDlg, IDC_CUSTOMCOMMAND, BM_GETCHECK, 0, 0)); + EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSECMDL), startSkype && IsDlgButtonChecked(hwndDlg, IDC_CUSTOMCOMMAND)); + EnableWindow(GetDlgItem(hwndDlg, IDC_COMMANDLINE), startSkype && IsDlgButtonChecked(hwndDlg, IDC_CUSTOMCOMMAND)); - EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSEDP), startSkype && SendDlgItemMessage(hwndDlg, IDC_DATAPATHO, BM_GETCHECK, 0, 0)); - EnableWindow(GetDlgItem(hwndDlg, IDC_DATAPATH), startSkype && SendDlgItemMessage(hwndDlg, IDC_DATAPATHO, BM_GETCHECK, 0, 0)); + EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSEDP), startSkype && IsDlgButtonChecked(hwndDlg, IDC_DATAPATHO)); + EnableWindow(GetDlgItem(hwndDlg, IDC_DATAPATH), startSkype && IsDlgButtonChecked(hwndDlg, IDC_DATAPATHO)); // LoginUserName if(!db_get_ts(NULL,SKYPE_PROTONAME,"LoginUserName",&dbv)) @@ -610,17 +610,17 @@ INT_PTR CALLBACK OptionsDefaultDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L TCHAR wtext[500]; char szRelativePath[MAX_PATH]; - db_set_b (NULL, SKYPE_PROTONAME, "StartSkype", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_STARTSKYPE, BM_GETCHECK,0,0))); - db_set_b (NULL, SKYPE_PROTONAME, "nosplash", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_NOSPLASH, BM_GETCHECK,0,0))); - db_set_b (NULL, SKYPE_PROTONAME, "minimized", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_MINIMIZED, BM_GETCHECK,0,0))); - db_set_b (NULL, SKYPE_PROTONAME, "notray", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_NOTRAY, BM_GETCHECK,0,0))); - db_set_b (NULL, SKYPE_PROTONAME, "Shutdown", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_SHUTDOWN, BM_GETCHECK,0,0))); - db_set_b (NULL, SKYPE_PROTONAME, "UnloadOnOffline", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_UNLOADOFFLINE, BM_GETCHECK,0,0))); + db_set_b (NULL, SKYPE_PROTONAME, "StartSkype", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_STARTSKYPE))); + db_set_b (NULL, SKYPE_PROTONAME, "nosplash", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_NOSPLASH))); + db_set_b (NULL, SKYPE_PROTONAME, "minimized", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_MINIMIZED))); + db_set_b (NULL, SKYPE_PROTONAME, "notray", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_NOTRAY))); + db_set_b (NULL, SKYPE_PROTONAME, "Shutdown", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_SHUTDOWN))); + db_set_b (NULL, SKYPE_PROTONAME, "UnloadOnOffline", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_UNLOADOFFLINE))); db_set_w (NULL, SKYPE_PROTONAME, "ConnectionAttempts", (unsigned short)GetDlgItemInt(hwndDlg, IDC_CONNATTEMPTS, NULL, FALSE)); - db_set_b (NULL, SKYPE_PROTONAME, "UseCustomCommand", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CUSTOMCOMMAND, BM_GETCHECK,0,0))); - db_set_b (NULL, SKYPE_PROTONAME, "datapath:", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_DATAPATHO, BM_GETCHECK,0,0))); - db_set_b (NULL, SKYPE_PROTONAME, "removable", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_REMOVEABLE, BM_GETCHECK,0,0))); - db_set_b (NULL, SKYPE_PROTONAME, "secondary", (BYTE)(SendDlgItemMessage(hwndDlg, IDC_SECONDARY, BM_GETCHECK,0,0))); + db_set_b (NULL, SKYPE_PROTONAME, "UseCustomCommand", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_CUSTOMCOMMAND))); + db_set_b (NULL, SKYPE_PROTONAME, "datapath:", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_DATAPATHO))); + db_set_b (NULL, SKYPE_PROTONAME, "removable", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_REMOVEABLE))); + db_set_b (NULL, SKYPE_PROTONAME, "secondary", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_SECONDARY))); GetDlgItemTextA(hwndDlg,IDC_COMMANDLINE,text,SIZEOF(text)); strncpy(szRelativePath, text, sizeof(szRelativePath)-1); @@ -650,27 +650,27 @@ INT_PTR CALLBACK OptionsDefaultDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L BOOL startSkype; int i; case IDC_STARTSKYPE: - startSkype = SendDlgItemMessage(hwndDlg, IDC_STARTSKYPE, BM_GETCHECK,0,0); + startSkype = IsDlgButtonChecked(hwndDlg, IDC_STARTSKYPE); for (i = 0; i < SIZEOF(skypeLaunchControls); i ++) EnableWindow(GetDlgItem(hwndDlg, skypeLaunchControls[i]), startSkype); - EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSECMDL), startSkype && SendDlgItemMessage(hwndDlg, IDC_CUSTOMCOMMAND, BM_GETCHECK,0,0)); - EnableWindow(GetDlgItem(hwndDlg, IDC_COMMANDLINE), startSkype && SendDlgItemMessage(hwndDlg, IDC_CUSTOMCOMMAND, BM_GETCHECK,0,0)); + EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSECMDL), startSkype && IsDlgButtonChecked(hwndDlg, IDC_CUSTOMCOMMAND)); + EnableWindow(GetDlgItem(hwndDlg, IDC_COMMANDLINE), startSkype && IsDlgButtonChecked(hwndDlg, IDC_CUSTOMCOMMAND)); - EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSEDP), startSkype && SendDlgItemMessage(hwndDlg, IDC_DATAPATHO, BM_GETCHECK,0,0)); - EnableWindow(GetDlgItem(hwndDlg, IDC_DATAPATH), startSkype && SendDlgItemMessage(hwndDlg, IDC_DATAPATHO, BM_GETCHECK,0,0)); + EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSEDP), startSkype && IsDlgButtonChecked(hwndDlg, IDC_DATAPATHO)); + EnableWindow(GetDlgItem(hwndDlg, IDC_DATAPATH), startSkype && IsDlgButtonChecked(hwndDlg, IDC_DATAPATHO)); break; case IDC_CLEANUP: pthread_create(( pThreadFunc )CleanupNicknames, NULL); break; case IDC_DATAPATHO: - EnableWindow(GetDlgItem(hwndDlg, IDC_DATAPATH), SendDlgItemMessage(hwndDlg, IDC_DATAPATHO, BM_GETCHECK,0,0)); - EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSEDP), SendDlgItemMessage(hwndDlg, IDC_DATAPATHO, BM_GETCHECK,0,0)); + EnableWindow(GetDlgItem(hwndDlg, IDC_DATAPATH), IsDlgButtonChecked(hwndDlg, IDC_DATAPATHO)); + EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSEDP), IsDlgButtonChecked(hwndDlg, IDC_DATAPATHO)); break; case IDC_CUSTOMCOMMAND: - EnableWindow(GetDlgItem(hwndDlg, IDC_COMMANDLINE), SendDlgItemMessage(hwndDlg, IDC_CUSTOMCOMMAND, BM_GETCHECK,0,0)); - EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSECMDL), SendDlgItemMessage(hwndDlg, IDC_CUSTOMCOMMAND, BM_GETCHECK,0,0)); + EnableWindow(GetDlgItem(hwndDlg, IDC_COMMANDLINE), IsDlgButtonChecked(hwndDlg, IDC_CUSTOMCOMMAND)); + EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSECMDL), IsDlgButtonChecked(hwndDlg, IDC_CUSTOMCOMMAND)); break; case IDC_BROWSECMDL: { -- cgit v1.2.3