diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-14 03:42:51 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-14 03:42:51 +0000 |
commit | fe0465b11a317db5408d897484caedc3a5f10c47 (patch) | |
tree | 317165e824a64dd16a36d9e5b9e3ad366bd57e6d /plugins/DbEditorPP/src | |
parent | 3e283b33c4f85f4cf75486febf95b7a39eb06837 (diff) |
SendDlgItemMessage(...BM_SETCHECK ...) -> CheckDlgButton(...)
SendDlgItemMessage(...BM_GETCHECK ...) -> IsDlgButtonChecked(...)
constants fix for CheckDlgButton()
git-svn-id: http://svn.miranda-ng.org/main/trunk@11387 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/DbEditorPP/src')
-rw-r--r-- | plugins/DbEditorPP/src/copymodule.cpp | 4 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/deletemodule.cpp | 2 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/findwindow.cpp | 16 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/options.cpp | 8 |
4 files changed, 15 insertions, 15 deletions
diff --git a/plugins/DbEditorPP/src/copymodule.cpp b/plugins/DbEditorPP/src/copymodule.cpp index 19eabd07a7..87d6b23c91 100644 --- a/plugins/DbEditorPP/src/copymodule.cpp +++ b/plugins/DbEditorPP/src/copymodule.cpp @@ -95,11 +95,11 @@ INT_PTR CALLBACK copyModDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara {
switch(LOWORD(wParam)) {
case CHK_COPY2ALL:
- EnableWindow(GetDlgItem(hwnd, IDC_CONTACTS),!IsDlgButtonChecked(hwnd,CHK_COPY2ALL));
+ EnableWindow(GetDlgItem(hwnd, IDC_CONTACTS),BST_UNCHECKED == IsDlgButtonChecked(hwnd,CHK_COPY2ALL));
break;
case IDOK:
- if (!IsDlgButtonChecked(hwnd,CHK_COPY2ALL)) {
+ if (BST_UNCHECKED == IsDlgButtonChecked(hwnd,CHK_COPY2ALL)) {
MCONTACT hContact = (MCONTACT)SendDlgItemMessage(hwnd, IDC_CONTACTS, CB_GETITEMDATA, SendDlgItemMessage(hwnd, IDC_CONTACTS, CB_GETCURSEL, 0, 0), 0);
copyModule(mac->module, mac->hContact, hContact);
}
diff --git a/plugins/DbEditorPP/src/deletemodule.cpp b/plugins/DbEditorPP/src/deletemodule.cpp index 4a110628e3..f933bb758d 100644 --- a/plugins/DbEditorPP/src/deletemodule.cpp +++ b/plugins/DbEditorPP/src/deletemodule.cpp @@ -80,7 +80,7 @@ INT_PTR CALLBACK DeleteModuleDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM SetDlgItemText(hwnd,IDC_INFOTEXT, Translate("Delete module from database"));
SetDlgItemText(hwnd,CHK_COPY2ALL, Translate("Delete module from all contacts (including Setting)"));
EnableWindow(GetDlgItem(hwnd,CHK_COPY2ALL),0);
- CheckDlgButton(hwnd,CHK_COPY2ALL,1);
+ CheckDlgButton(hwnd, CHK_COPY2ALL, BST_CHECKED);
TranslateDialogDefault(hwnd);
working = 1;
forkthread(PopulateModuleDropListThreadFunc,0,hwnd);
diff --git a/plugins/DbEditorPP/src/findwindow.cpp b/plugins/DbEditorPP/src/findwindow.cpp index 1c4c46fbed..5866528233 100644 --- a/plugins/DbEditorPP/src/findwindow.cpp +++ b/plugins/DbEditorPP/src/findwindow.cpp @@ -58,10 +58,10 @@ INT_PTR CALLBACK FindWindowDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP case WM_INITDIALOG:
TranslateDialogDefault(hwnd);
SendDlgItemMessage(hwnd, IDC_SBAR, SB_SETTEXT, 0, (LPARAM)Translate("Enter a string to search the database for"));
- CheckDlgButton(hwnd, IDC_MODNAME, 1);
- CheckDlgButton(hwnd, IDC_SETTINGNAME, 1);
- CheckDlgButton(hwnd, IDC_SETTINGVALUE, 1);
- CheckDlgButton(hwnd, IDC_FOUND, 1);
+ CheckDlgButton(hwnd, IDC_MODNAME, BST_CHECKED);
+ CheckDlgButton(hwnd, IDC_SETTINGNAME, BST_CHECKED);
+ CheckDlgButton(hwnd, IDC_SETTINGVALUE, BST_CHECKED);
+ CheckDlgButton(hwnd, IDC_FOUND, BST_CHECKED);
SendMessage(hwnd, WM_SETICON, ICON_BIG, (LPARAM)LoadIcon(hInst, MAKEINTRESOURCE(ICO_REGEDIT)));
SetWindowLongPtr(GetDlgItem(hwnd, IDC_REPLACE), GWLP_USERDATA, 0);
SetWindowLongPtr(GetDlgItem(hwnd, IDC_SEARCH), GWLP_USERDATA, 0);
@@ -83,12 +83,12 @@ INT_PTR CALLBACK FindWindowDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP if (GetWindowLongPtr(GetDlgItem(hwnd, IDC_REPLACE), GWLP_USERDATA) &&
!GetDlgItemText(hwnd, IDC_REPLACE, replace, SIZEOF(replace)) &&
- !IsDlgButtonChecked(hwnd, IDC_ENTIRELY))
+ BST_UNCHECKED == IsDlgButtonChecked(hwnd, IDC_ENTIRELY))
break;
- if (!IsDlgButtonChecked(hwnd, IDC_MODNAME) &&
- !IsDlgButtonChecked(hwnd, IDC_SETTINGNAME) &&
- !IsDlgButtonChecked(hwnd, IDC_SETTINGVALUE))
+ if (BST_UNCHECKED == IsDlgButtonChecked(hwnd, IDC_MODNAME) &&
+ BST_UNCHECKED == IsDlgButtonChecked(hwnd, IDC_SETTINGNAME) &&
+ BST_UNCHECKED == IsDlgButtonChecked(hwnd, IDC_SETTINGVALUE))
break;
FindInfo *fi = (FindInfo*)mir_calloc(sizeof(FindInfo));
diff --git a/plugins/DbEditorPP/src/options.cpp b/plugins/DbEditorPP/src/options.cpp index 7247405b9e..c6aa2b3cdc 100644 --- a/plugins/DbEditorPP/src/options.cpp +++ b/plugins/DbEditorPP/src/options.cpp @@ -8,10 +8,10 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) case WM_INITDIALOG:
{
bInitDone = false;
- CheckDlgButton(hwnd,IDC_EXPANDSETTINGS,db_get_b(NULL,modname,"ExpandSettingsOnOpen",0));
- CheckDlgButton(hwnd,IDC_RESTORESETTINGS,db_get_b(NULL,modname,"RestoreOnOpen",1));
- CheckDlgButton(hwnd,IDC_WARNONDEL,db_get_b(NULL,modname,"WarnOnDelete",1));
- CheckDlgButton(hwnd,IDC_POPUPS,usePopups);
+ CheckDlgButton(hwnd, IDC_EXPANDSETTINGS, db_get_b(NULL, modname, "ExpandSettingsOnOpen", 0) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwnd, IDC_RESTORESETTINGS, db_get_b(NULL, modname, "RestoreOnOpen", 1) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwnd, IDC_WARNONDEL, db_get_b(NULL, modname, "WarnOnDelete", 1) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwnd, IDC_POPUPS, usePopups ? BST_CHECKED : BST_UNCHECKED);
SetDlgItemInt(hwnd,IDC_POPUPTIMEOUT,db_get_w(NULL,modname,"PopupDelay",4),0);
SendDlgItemMessage(hwnd, IDC_COLOUR, CPM_SETCOLOUR, 0, (LPARAM)db_get_dw(NULL,modname,"PopupColour",RGB(255,0,0)));
TranslateDialogDefault(hwnd);
|