降低退出时崩溃的概率
This commit is contained in:
@@ -44,12 +44,12 @@ BOOL CSettingDlg::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
int nPort = ((CMy2015RemoteApp*)AfxGetApp())->m_iniFile.GetInt("Settings", "ListenPort");
|
||||
int nPort = ((CMy2015RemoteApp*)AfxGetApp())->m_iniFile.GetInt("settings", "ghost");
|
||||
//<2F><>ȡini <20>ļ<EFBFBD><C4BC>еļ<D0B5><C4BC><EFBFBD><EFBFBD>˿<EFBFBD>
|
||||
int nMaxConnection = ((CMy2015RemoteApp*)AfxGetApp())->m_iniFile.GetInt("Settings", "MaxConnection");
|
||||
int nMaxConnection = ((CMy2015RemoteApp*)AfxGetApp())->m_iniFile.GetInt("settings", "MaxConnection");
|
||||
|
||||
m_nListenPort = nPort;
|
||||
m_nMax_Connect = nMaxConnection;
|
||||
m_nListenPort = (nPort<=0 || nPort>65535) ? 6543 : nPort;
|
||||
m_nMax_Connect = nMaxConnection<=0 ? 10000 : nMaxConnection;
|
||||
|
||||
UpdateData(FALSE);
|
||||
|
||||
@@ -60,9 +60,9 @@ BOOL CSettingDlg::OnInitDialog()
|
||||
void CSettingDlg::OnBnClickedButtonSettingapply()
|
||||
{
|
||||
UpdateData(TRUE);
|
||||
((CMy2015RemoteApp *)AfxGetApp())->m_iniFile.SetInt("Settings", "ListenPort", m_nListenPort);
|
||||
((CMy2015RemoteApp *)AfxGetApp())->m_iniFile.SetInt("settings", "ghost", m_nListenPort);
|
||||
//<2F><>ini<6E>ļ<EFBFBD><C4BC><EFBFBD>д<EFBFBD><D0B4>ֵ
|
||||
((CMy2015RemoteApp *)AfxGetApp())->m_iniFile.SetInt("Settings", "MaxConnection", m_nMax_Connect);
|
||||
((CMy2015RemoteApp *)AfxGetApp())->m_iniFile.SetInt("settings", "MaxConnection", m_nMax_Connect);
|
||||
|
||||
m_ApplyButton.EnableWindow(FALSE);
|
||||
m_ApplyButton.ShowWindow(SW_HIDE);
|
||||
|
||||
Reference in New Issue
Block a user