本文整理汇总了C++中AppSettings::Read方法的典型用法代码示例。如果您正苦于以下问题:C++ AppSettings::Read方法的具体用法?C++ AppSettings::Read怎么用?C++ AppSettings::Read使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppSettings
的用法示例。
在下文中一共展示了AppSettings::Read方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadSettings
void CTeenSpiritDlg::LoadSettings()
{
AppSettings* params = PRGAPI()->GetAppSettings();
WINDOWPLACEMENT pl;
GetWindowPlacement(&pl);
int showCmd;
params->Read(SettingsCategory, _T("CMDSHOW"), showCmd, SW_SHOWNORMAL);
params->Read(SettingsCategory, _T("LEFT"), (int&) pl.rcNormalPosition.left, 40);
params->Read(SettingsCategory, _T("TOP"), (int&) pl.rcNormalPosition.top, 25);
params->Read(SettingsCategory, _T("RIGHT"), (int&) pl.rcNormalPosition.right, 900);
params->Read(SettingsCategory, _T("BOTTOM"), (int&) pl.rcNormalPosition.bottom, 650);
//pl.showCmd = SW_SHOWMINIMIZED;
pl.showCmd = showCmd;
ModifyStyle(WS_VISIBLE, 0);
if (showCmd == SW_SHOWMINIMIZED)
{
ModifyStyle(WS_VISIBLE, 0);
SetWindowPlacement(&pl);
PostMessage(WM_SYSCOMMAND, SC_MINIMIZE);
}
else if (showCmd == SW_SHOWMAXIMIZED)
{
SetWindowPlacement(&pl);
ModifyStyle(WS_CAPTION | WS_THICKFRAME, 0);
MaximizeWindow(pl.rcNormalPosition);
}
else
SetWindowPlacement(&pl);
}
示例2: Init
void HotKeyManager::Init()//HWND hWndTarget)
{
PrgAPI* pAPI = PRGAPI();
AppSettings* appSettings = pAPI->GetAppSettings();
INT value = 0;
m_hWnd = NULL;//hWndTarget;
appSettings->Read(HotKeyManagerSettingsCategory, cHotkeyPlay, value, 0);
SetHotKey(HK_Play, HIWORD(value), LOWORD(value));
appSettings->Read(HotKeyManagerSettingsCategory, cHotkeyStop, value, 0);
SetHotKey(HK_Stop, HIWORD(value), LOWORD(value));
appSettings->Read(HotKeyManagerSettingsCategory, cHotkeyPrev, value, 0);
SetHotKey(HK_Prev, HIWORD(value), LOWORD(value));
appSettings->Read(HotKeyManagerSettingsCategory, cHotkeyNext, value, 0);
SetHotKey(HK_Next, HIWORD(value), LOWORD(value));
appSettings->Read(HotKeyManagerSettingsCategory, cHotkeyMiniPlayer, value, 0);
SetHotKey(HK_ToggleMiniPlayer, HIWORD(value), LOWORD(value));
appSettings->Read(HotKeyManagerSettingsCategory, cHotkeyTooltip, value, 0);
SetHotKey(HK_Tooltip, HIWORD(value), LOWORD(value));
appSettings->Read(HotKeyManagerSettingsCategory, cHotkeyQuickSearch, value, 0);
SetHotKey(HK_QuickSearch, HIWORD(value), LOWORD(value));
EnableMultimediaHotKeys(pAPI->GetOption(OPT_GEN_MultimediaKeysActive) == 1);
}