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/DbChecker/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/DbChecker/src')
-rw-r--r-- | plugins/DbChecker/src/cleaning.cpp | 6 | ||||
-rw-r--r-- | plugins/DbChecker/src/fileaccess.cpp | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/plugins/DbChecker/src/cleaning.cpp b/plugins/DbChecker/src/cleaning.cpp index cf8d4947bc..d96c960b24 100644 --- a/plugins/DbChecker/src/cleaning.cpp +++ b/plugins/DbChecker/src/cleaning.cpp @@ -27,10 +27,10 @@ INT_PTR CALLBACK CleaningDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM switch (message) {
case WM_INITDIALOG:
- CheckDlgButton(hdlg, IDC_ERASEHISTORY, opts.bEraseHistory);
+ CheckDlgButton(hdlg, IDC_ERASEHISTORY, opts.bEraseHistory ? BST_CHECKED : BST_UNCHECKED);
EnableWindow(GetDlgItem(hdlg, IDC_ERASEHISTORY), !opts.bAggressive);
- CheckDlgButton(hdlg, IDC_MARKREAD, opts.bMarkRead);
- CheckDlgButton(hdlg, IDC_CONVERTUTF, opts.bConvertUtf);
+ CheckDlgButton(hdlg, IDC_MARKREAD, opts.bMarkRead ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hdlg, IDC_CONVERTUTF, opts.bConvertUtf ? BST_CHECKED : BST_UNCHECKED);
TranslateDialogDefault(hdlg);
return TRUE;
diff --git a/plugins/DbChecker/src/fileaccess.cpp b/plugins/DbChecker/src/fileaccess.cpp index 19973fed07..8e4b650473 100644 --- a/plugins/DbChecker/src/fileaccess.cpp +++ b/plugins/DbChecker/src/fileaccess.cpp @@ -29,9 +29,9 @@ INT_PTR CALLBACK FileAccessDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARA case WM_INITDIALOG:
if (bShortMode)
EnableWindow(GetDlgItem(GetParent(hdlg), IDC_BACK), FALSE);
- CheckDlgButton(hdlg, IDC_CHECKONLY, opts.bCheckOnly);
- CheckDlgButton(hdlg, IDC_BACKUP, opts.bBackup);
- CheckDlgButton(hdlg, IDC_AGGRESSIVE, opts.bAggressive);
+ CheckDlgButton(hdlg, IDC_CHECKONLY, opts.bCheckOnly ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hdlg, IDC_BACKUP, opts.bBackup ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hdlg, IDC_AGGRESSIVE, opts.bAggressive ? BST_CHECKED : BST_UNCHECKED);
SendMessage(hdlg, WM_COMMAND, MAKEWPARAM(IDC_CHECKONLY, BN_CLICKED), 0);
TranslateDialogDefault(hdlg);
return TRUE;
@@ -57,8 +57,8 @@ INT_PTR CALLBACK FileAccessDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARA break;
case IDC_CHECKONLY:
- EnableWindow(GetDlgItem(hdlg, IDC_BACKUP), !IsDlgButtonChecked(hdlg, IDC_CHECKONLY));
- EnableWindow(GetDlgItem(hdlg, IDC_STBACKUP), !IsDlgButtonChecked(hdlg, IDC_CHECKONLY));
+ EnableWindow(GetDlgItem(hdlg, IDC_BACKUP), BST_UNCHECKED == IsDlgButtonChecked(hdlg, IDC_CHECKONLY));
+ EnableWindow(GetDlgItem(hdlg, IDC_STBACKUP), BST_UNCHECKED == IsDlgButtonChecked(hdlg, IDC_CHECKONLY));
break;
}
break;
|