void CContentsView::ReloadSettings() { CFmSettings st; st.Load(); theApp.ShowSystemMenu = st.ShowSystemMenu; _mySelectMode = st.AlternativeSelection; _showDots = st.ShowDots; _showRealFileIcons = st.ShowRealFileIcons; // bool mySelectionMode = st.AlternativeSelection; // DWORD style = (DWORD)this->GetStyle(); // if (st.AlternativeSelection) // style |= LVS_SINGLESEL; // else // style &= ~LVS_SINGLESEL; // this->ModifyStyle(mySelectionMode ? 0 : LVS_SINGLESEL, // mySelectionMode ? LVS_SINGLESEL : 1); DWORD extendedStyle = LVS_EX_HEADERDRAGDROP; if (st.FullRow) extendedStyle |= LVS_EX_FULLROWSELECT; if (st.ShowGrid) extendedStyle |= LVS_EX_GRIDLINES; if (st.SingleClick) { extendedStyle |= LVS_EX_ONECLICKACTIVATE | LVS_EX_TRACKSELECT; /* if (ReadUnderline()) extendedStyle |= LVS_EX_UNDERLINEHOT; */ } this->SetExtendedStyle(extendedStyle); }
bool CSettingsPage::OnInit() { _wasChanged = false; _largePages_wasChanged = false; LangSetDlgItems(*this, kLangIDs, ARRAY_SIZE(kLangIDs)); CFmSettings st; st.Load(); CheckButton(IDX_SETTINGS_SHOW_DOTS, st.ShowDots); CheckButton(IDX_SETTINGS_SHOW_REAL_FILE_ICONS, st.ShowRealFileIcons); CheckButton(IDX_SETTINGS_FULL_ROW, st.FullRow); CheckButton(IDX_SETTINGS_SHOW_GRID, st.ShowGrid); CheckButton(IDX_SETTINGS_SINGLE_CLICK, st.SingleClick); CheckButton(IDX_SETTINGS_ALTERNATIVE_SELECTION, st.AlternativeSelection); // CheckButton(IDX_SETTINGS_UNDERLINE, st.Underline); CheckButton(IDX_SETTINGS_SHOW_SYSTEM_MENU, st.ShowSystemMenu); if (IsLargePageSupported()) CheckButton(IDX_SETTINGS_LARGE_PAGES, ReadLockMemoryEnable()); else EnableItem(IDX_SETTINGS_LARGE_PAGES, false); // EnableSubItems(); return CPropertyPage::OnInit(); }
void CEcoZipFMApp::PreLoadState() { BOOL bNameValid; CString strName; bNameValid = strName.LoadString(IDR_MAINFRAME); ASSERT(bNameValid); GetContextMenuManager()->AddMenu(strName, IDR_MAINFRAME); GetContextMenuManager()->AddMenu(strName, IDR_MENU_POPUP); GetContextMenuManager()->AddMenu(strName, IDR_MENU_FOLDER); CFmSettings st; st.Load(); ShowSystemMenu = st.ShowSystemMenu; return CWinAppEx::PreLoadState(); }
void CApp::SetListSettings() { CFmSettings st; st.Load(); ShowSystemMenu = st.ShowSystemMenu; DWORD extendedStyle = LVS_EX_HEADERDRAGDROP; if (st.FullRow) extendedStyle |= LVS_EX_FULLROWSELECT; if (st.ShowGrid) extendedStyle |= LVS_EX_GRIDLINES; if (st.SingleClick) { extendedStyle |= LVS_EX_ONECLICKACTIVATE | LVS_EX_TRACKSELECT; /* if (ReadUnderline()) extendedStyle |= LVS_EX_UNDERLINEHOT; */ } for (unsigned i = 0; i < kNumPanelsMax; i++) { CPanel &panel = Panels[i]; panel._mySelectMode = st.AlternativeSelection; panel._showDots = st.ShowDots; panel._showRealFileIcons = st.ShowRealFileIcons; panel._exStyle = extendedStyle; DWORD style = (DWORD)panel._listView.GetStyle(); if (st.AlternativeSelection) style |= LVS_SINGLESEL; else style &= ~LVS_SINGLESEL; panel._listView.SetStyle(style); panel.SetExtendedStyle(); } }