BOOL COption_ToolbarDlg::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here ReadOption(); m_bModifyFlag = false; return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
/** * \brief */ bool DbConfig::LoadFromFolder(const CPath& cfgFileFolder) { SetDefaults(); CPath cfgFile(cfgFileFolder); cfgFile += cPluginCfgFileName; if (!cfgFile.FileExists()) return false; FILE* fp; _tfopen_s(&fp, cfgFile.C_str(), _T("rt")); if (fp == NULL) return false; bool success = true; TCHAR line[8192]; while (_fgetts(line, _countof(line), fp)) { // Comment or empty line if (line[0] == _T('#') || line[0] == _T('\n')) continue; // Strip newline from the end of the line line[_tcslen(line) - 1] = 0; if (!ReadOption(line)) { success = false; SetDefaults(); break; } } fclose(fp); return success; }
BOOL COption_RECDlg::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here m_bReg = CAppSettings::IsRegistration(); if(!m_bReg) m_ToolRecChkBtn.EnableWindow(FALSE); else { if(!CAppSettings::IsLayeredWndEnable()) { m_ToolRecChkBtn.EnableWindow(FALSE); m_ToolRecChkBtn.SetCheck(1); } } ReadOption(); m_bModifyFlag = false; int nLevel = GetAccelerationLevel(); if(nLevel == 5) { CButton* pButton = (CButton*)GetDlgItem(IDC_EXCLUSIVE_RECMODE); pButton->SetCheck(1); } else { CButton* pButton = (CButton*)GetDlgItem(IDC_NORMAL_RECMODE); pButton->SetCheck(1); } return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }