60 |
|
|
61 |
void UserEditDialog::OnBnClickedAdmin() |
void UserEditDialog::OnBnClickedAdmin() |
62 |
{ |
{ |
63 |
if (((CButton*)GetDlgItem(IDC_ADMIN))->GetCheck() == true) { |
if (((CButton*)GetDlgItem(IDC_ADMIN))->GetCheck() == BST_CHECKED) { |
64 |
GetDlgItem(IDC_PASSWORD1)->EnableWindow(true); |
GetDlgItem(IDC_PASSWORD1)->EnableWindow(true); |
65 |
GetDlgItem(IDC_PASSWORD2)->EnableWindow(true); |
GetDlgItem(IDC_PASSWORD2)->EnableWindow(true); |
66 |
} else { //not checked |
} else { //not checked |
78 |
GetDlgItem(IDC_PASSWORD1)->GetWindowText(password1); |
GetDlgItem(IDC_PASSWORD1)->GetWindowText(password1); |
79 |
GetDlgItem(IDC_PASSWORD2)->GetWindowText(password2); |
GetDlgItem(IDC_PASSWORD2)->GetWindowText(password2); |
80 |
|
|
81 |
isAdmin = ((CButton*)GetDlgItem(IDC_ADMIN))->GetCheck(); |
isAdmin = ( ((CButton*)GetDlgItem(IDC_ADMIN))->GetCheck() == BST_CHECKED); |
82 |
|
|
83 |
if (inits == "" || name == "") { |
if (inits == "" || name == "") { |
84 |
MessageBox("You must enter initials and name", "Edit User"); |
MessageBox("You must enter initials and name", "Edit User"); |