本文整理汇总了C++中PWSprefs::GetPrefDefVal方法的典型用法代码示例。如果您正苦于以下问题:C++ PWSprefs::GetPrefDefVal方法的具体用法?C++ PWSprefs::GetPrefDefVal怎么用?C++ PWSprefs::GetPrefDefVal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PWSprefs
的用法示例。
在下文中一共展示了PWSprefs::GetPrefDefVal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetupInitialValues
//.........这里部分代码省略.........
m_OPTMD.TreeDisplayStatusAtOpen =
prefs->GetPref(PWSprefs::TreeDisplayStatusAtOpen);
m_OPTMD.TrayIconColour =
prefs->GetPref(PWSprefs::ClosedTrayIconColour);
m_OPTMD.HighlightChanges = m_save_bHighlightChanges =
prefs->GetPref(PWSprefs::HighlightChanges);
// Misc Data
m_OPTMD.ConfirmDelete =
prefs->GetPref(PWSprefs::DeleteQuestion) ? FALSE : TRUE;
m_OPTMD.MaintainDatetimeStamps =
prefs->GetPref(PWSprefs::MaintainDateTimeStamps) ? TRUE : FALSE;
m_OPTMD.EscExits =
prefs->GetPref(PWSprefs::EscExits) ? TRUE : FALSE;
m_OPTMD.DoubleClickAction =
prefs->GetPref(PWSprefs::DoubleClickAction);
m_OPTMD.ShiftDoubleClickAction =
prefs->GetPref(PWSprefs::ShiftDoubleClickAction);
m_OPTMD.UseDefuser =
prefs->GetPref(PWSprefs::UseDefaultUser) ? TRUE : FALSE;
m_OPTMD.DefUsername =
prefs->GetPref(PWSprefs::DefaultUsername).c_str();
m_OPTMD.QuerySetDef =
prefs->GetPref(PWSprefs::QuerySetDef) ? TRUE : FALSE;
m_OPTMD.OtherBrowserLocation =
prefs->GetPref(PWSprefs::AltBrowser).c_str();
m_OPTMD.BrowserCmdLineParms =
prefs->GetPref(PWSprefs::AltBrowserCmdLineParms).c_str();
m_OPTMD.OtherEditorLocation =
prefs->GetPref(PWSprefs::AltNotesEditor).c_str();
CString cs_dats =
prefs->GetPref(PWSprefs::DefaultAutotypeString).c_str();
if (cs_dats.IsEmpty())
cs_dats = DEFAULT_AUTOTYPE;
m_OPTMD.AutotypeText = (LPCWSTR)cs_dats;
m_OPTMD.AutotypeDelay =
prefs->GetPref(PWSprefs::DefaultAutotypeDelay);
m_OPTMD.MinAuto =
prefs->GetPref(PWSprefs::MinimizeOnAutotype) ? TRUE : FALSE;
// Password History Data
m_OPTMD.SavePWHistory =
prefs->GetPref(PWSprefs::SavePasswordHistory) ? TRUE : FALSE;
m_OPTMD.PWHistoryNumDefault =
prefs->GetPref(PWSprefs::NumPWHistoryDefault);
m_OPTMD.PWHAction = 0;
// Security Data
m_OPTMD.ClearClipboardOnMinimize =
prefs->GetPref(PWSprefs::ClearClipboardOnMinimize) ? TRUE : FALSE;
m_OPTMD.ClearClipboardOnExit =
prefs->GetPref(PWSprefs::ClearClipboardOnExit) ? TRUE : FALSE;
m_OPTMD.LockOnMinimize =
prefs->GetPref(PWSprefs::DatabaseClear) ? TRUE : FALSE;
m_OPTMD.ConfirmCopy =
prefs->GetPref(PWSprefs::DontAskQuestion) ? FALSE : TRUE;
m_OPTMD.LockOnWindowLock = m_save_bLockOnWindowLock =
prefs->GetPref(PWSprefs::LockOnWindowLock) ? TRUE : FALSE;
m_OPTMD.LockOnIdleTimeout =
prefs->GetPref(PWSprefs::LockDBOnIdleTimeout) ? TRUE : FALSE;
m_OPTMD.IdleTimeOut =
prefs->GetPref(PWSprefs::IdleTimeout);
m_OPTMD.HashIters = GetMainDlg()->GetHashIters();
m_OPTMD.CopyPswdBrowseURL =
prefs->GetPref(PWSprefs::CopyPasswordWhenBrowseToURL) ? TRUE : FALSE;
// Shortcut Data
m_OPTMD.AppHotKeyValue = int32(prefs->GetPref(PWSprefs::HotKey));
// Can't be enabled if not set!
if (m_OPTMD.AppHotKeyValue == 0)
m_OPTMD.AppHotKeyEnabled = FALSE;
else
m_OPTMD.AppHotKeyEnabled =
prefs->GetPref(PWSprefs::HotKeyEnabled) ? TRUE : FALSE;
m_OPTMD.ColWidth =
prefs->GetPref(PWSprefs::OptShortcutColumnWidth);
m_OPTMD.DefColWidth =
prefs->GetPrefDefVal(PWSprefs::OptShortcutColumnWidth);
// System Data
CShortcut pws_shortcut;
m_OPTMD.MaxREItems =
prefs->GetPref(PWSprefs::MaxREItems);
m_OPTMD.UseSystemTray =
prefs->GetPref(PWSprefs::UseSystemTray) ? TRUE : FALSE;
m_OPTMD.HideSystemTray =
prefs->GetPref(PWSprefs::HideSystemTray) ? TRUE : FALSE;
m_OPTMD.MaxMRUItems =
prefs->GetPref(PWSprefs::MaxMRUItems);
m_OPTMD.MRUOnFileMenu =
prefs->GetPref(PWSprefs::MRUOnFileMenu);
const CString PWSLnkName(L"Password Safe"); // for startup shortcut
m_OPTMD.Startup = m_bStartupShortcutExists =
pws_shortcut.isLinkExist(PWSLnkName, CSIDL_STARTUP);
m_OPTMD.DefaultOpenRO = prefs->GetPref(PWSprefs::DefaultOpenRO) ? TRUE : FALSE;
m_OPTMD.MultipleInstances =
prefs->GetPref(PWSprefs::MultipleInstances) ? TRUE : FALSE;
}