void CSysDialog::SaveConf( bool bSave2File ) { UpdateData(); GlobalFunc::CreateGBoxRunInStartUp( m_bAutoRun ); bool bValue = m_minOrExit; AfxGetUserConfig()->SetConfigBoolValue( CONF_SETTING_MODULE_NAME,CONF_SETTING_CONFIG_EXITCHOICE,bValue); bValue = m_noAsk; AfxGetUserConfig()->SetConfigBoolValue( CONF_SETTING_MODULE_NAME,CONF_SETTING_CONFIG_IFASKEXIT,bValue); }
void CSysDialog::LoadConf() { //开机自启动 m_bAutoRun = GlobalFunc::IsAutoRun(); //最小化或关闭 AfxUserConfig* pUserConfig = AfxGetUserConfig(); bool bValue; pUserConfig->GetConfigBoolValue( CONF_SETTING_MODULE_NAME,CONF_SETTING_CONFIG_EXITCHOICE,bValue); m_minOrExit = bValue; pUserConfig->GetConfigBoolValue( CONF_SETTING_MODULE_NAME,CONF_SETTING_CONFIG_IFASKEXIT,bValue); m_bNoAsk = bValue; pUserConfig->GetConfigBoolValue( CONF_SETTING_MODULE_NAME, CONF_SETTING_ENABLE_BOSS_KEY, bValue); m_bUseBossKey = bValue; int iKeyValue = 0; AfxGetUserConfig()->GetConfigIntValue(CONF_SETTING_MODULE_NAME, CONF_SETTING_BOSS_KEY_VALUE, iKeyValue); m_BossKeyCtrl.SetHotKey(HIWORD( *((DWORD*)&iKeyValue) ), LOWORD( *((DWORD*)&iKeyValue) )); }
void CSysDialog::SaveConf( bool bSave2File ) { UpdateData(); GlobalFunc::CreateGBoxRunInStartUp( m_bAutoRun ); bool bValue = m_minOrExit; AfxGetUserConfig()->SetConfigBoolValue( CONF_SETTING_MODULE_NAME, CONF_SETTING_CONFIG_EXITCHOICE,bValue); bValue = m_bNoAsk; AfxGetUserConfig()->SetConfigBoolValue( CONF_SETTING_MODULE_NAME, CONF_SETTING_CONFIG_IFASKEXIT,bValue); bValue = m_bUseBossKey; AfxGetUserConfig()->SetConfigBoolValue( CONF_SETTING_MODULE_NAME, CONF_SETTING_ENABLE_BOSS_KEY, bValue ); WORD wMod, wVK; m_BossKeyCtrl.GetHotKey(wVK, wMod); int iKeyValue = wVK; iKeyValue = (iKeyValue<<16) | wMod; AfxGetUserConfig()->SetConfigIntValue(CONF_SETTING_MODULE_NAME, CONF_SETTING_BOSS_KEY_VALUE, iKeyValue); }
void CSysDialog::LoadConf() { //开机自启动 m_bAutoRun = GlobalFunc::IsAutoRun(); //最小化或关闭 AfxUserConfig* pUserConfig = AfxGetUserConfig(); bool bValue; pUserConfig->GetConfigBoolValue( CONF_SETTING_MODULE_NAME,CONF_SETTING_CONFIG_EXITCHOICE,bValue); m_minOrExit = bValue; pUserConfig->GetConfigBoolValue( CONF_SETTING_MODULE_NAME,CONF_SETTING_CONFIG_IFASKEXIT,bValue); m_noAsk = bValue; }
int PlayedGameWnd::OnCreate(LPCREATESTRUCT lpCreateStruct) { if(__super::OnCreate(lpCreateStruct) == -1) return -1; CRect rectNULL(0,0,0,0); m_pBtnTimeOrder->Create(NULL,NULL,rectNULL,this,ID_BTN_PLAYED_GAME_TIME_ORDER); m_pBtnToWebGame->Create(NULL,NULL,rectNULL,this,ID_BTN_PLAYED_GAME_TO_WEB_GAME); m_pBtnToFlashGame->Create(NULL,NULL,rectNULL,this,ID_BTN_PLAYED_GAME_TO_FLASH_GAME); m_pBtnToCollectedGame->Create(NULL,NULL,rectNULL,this,ID_BTN_PLAYED_GAME_TO_COLLECTED_GAME); m_pWndGameList->Create(NULL,NULL,WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS,rectNULL,this,ID_WND_PLAYED_GAME_LIST); m_pWndWelcome->Create(NULL,NULL,WS_CHILD|WS_VISIBLE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS,rectNULL,this,ID_WND_PLAYED_GAME_WELCOME); m_pWndRecommand->Create(NULL,NULL,WS_CHILD|WS_CLIPCHILDREN,rectNULL,this,ID_WND_PLAYED_GAME_RECOMMAND); m_pWndLogedIn->Create(NULL,NULL,WS_CHILD|WS_CLIPCHILDREN,rectNULL,this,ID_WND_USER_LOGED_IN); m_pWndLogedOut->Create(NULL,NULL,WS_CHILD|WS_CLIPCHILDREN,rectNULL,this,ID_WND_USER_LOGED_OUT); ILayoutMgr* pLayoutMgr = AfxGetUIManager()->UIGetLayoutMgr(); pLayoutMgr->RegisterCtrl(this,"PlayedGameTimeOrder",m_pBtnTimeOrder); pLayoutMgr->RegisterCtrl(this,"PlayedGameToWebGame",m_pBtnToWebGame); pLayoutMgr->RegisterCtrl(this,"PlayedGameToFlashGame",m_pBtnToFlashGame); pLayoutMgr->RegisterCtrl(this,"PlayedGameToCollectedGame",m_pBtnToCollectedGame); pLayoutMgr->RegisterCtrl(this,"PlayedGameGameListPanel",m_pWndGameList); pLayoutMgr->RegisterCtrl(this,"PlayedGameWelcome",m_pWndWelcome); pLayoutMgr->RegisterCtrl(this,"PlayedGameRecommandWebPanel",m_pWndRecommand); pLayoutMgr->RegisterCtrl(this,"UserMan_LogedIn",m_pWndLogedIn); pLayoutMgr->RegisterCtrl(this,"UserMan_LogedOut",m_pWndLogedOut); pLayoutMgr->CreateControlPane( this,"playedgamepanel","normal"); pLayoutMgr->CreateBmpPane( this,"playedgamepanel","normal" ); AfxGetUIManager()->UIGetLayoutMgr()->ShowLayer(s_USER_MAN_LOGED_IN_OUT, s_USER_MAN_LOGED_OUT); SetOnlyOneBtnCheckedAndValidate(m_pBtnTimeOrder); std::string strPlayedGameRightUrl; AfxGetUserConfig()->GetConfigStringValue(CONF_SETTING_MODULE_NAME, CONF_SETTING_CONFIG_PLAYED_GAME_RIGHT_URL,strPlayedGameRightUrl); m_pWndRecommand->Navigate(strPlayedGameRightUrl.empty() ? "about:blank" : strPlayedGameRightUrl); return 0; }