| 81 | |
| 82 | |
| 83 | BOOL CMoreSettingsPropertyPage::OnInitDialog() |
| 84 | { |
| 85 | CCryptPropertyPage::OnInitDialog(); |
| 86 | |
| 87 | if (::IsWindow(m_ctrlComboBox.GetSafeHwnd())) { |
| 88 | m_ctrlComboBox.ResetContent(); |
| 89 | |
| 90 | // Fill in from a pre-prepared vector in theApp |
| 91 | for (const auto& lang : theApp.m_vAvailableLangs) { |
| 92 | int nIdx = m_ctrlComboBox.AddString(lang.name); |
| 93 | m_ctrlComboBox.SetItemData(nIdx, (DWORD_PTR)lang.langID); |
| 94 | |
| 95 | // Select the language in which the interface is currently running |
| 96 | if (lang.langID == GetThreadUILanguage()) { |
| 97 | m_ctrlComboBox.SetCurSel(nIdx); |
| 98 | } |
| 99 | } |
| 100 | // Make the "Apply" button grayed out on startup |
| 101 | GetDlgItem(IDC_APPLY)->EnableWindow(FALSE); |
| 102 | } |
| 103 | |
| 104 | #define DO_CHECKBOX(tok) \ |
| 105 | m_controls.emplace(IDC_##tok, make_unique<CryptCheckBoxSetting>(*this, IDC_##tok, tok)); |
| 106 | |
| 107 | DO_CHECKBOX(FLUSH_AFTER_WRITE_EXFAT); |
| 108 | |
| 109 | DO_CHECKBOX(FLUSH_AFTER_WRITE_FAT32); |
| 110 | |
| 111 | DO_CHECKBOX(FLUSH_AFTER_WRITE_NTFS); |
| 112 | |
| 113 | DO_CHECKBOX(FLUSH_AFTER_WRITE_NOT_NTFS); |
| 114 | |
| 115 | DO_CHECKBOX(FLUSH_AFTER_WRITE_NO_SPARSE_FILES); |
| 116 | |
| 117 | SetControls(CryptSetting::SetType::Current); |
| 118 | |
| 119 | // return TRUE unless you set the focus to a control |
| 120 | // EXCEPTION: OCX Property Pages should return FALSE |
| 121 | |
| 122 | return TRUE; |
| 123 | } |
| 124 | |
| 125 | |
| 126 | void CMoreSettingsPropertyPage::SetControls(CryptSetting::SetType set_type) |
nothing calls this directly
no outgoing calls
no test coverage detected