MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / OnInitDialog

Method OnInitDialog

cppcryptfs/ui/MoreSettingsPropertyPage.cpp:83–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82
83BOOL 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
126void CMoreSettingsPropertyPage::SetControls(CryptSetting::SetType set_type)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected