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); }
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); }