1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- // SetDlg.cpp : implementation file
- //
- #include "stdafx.h"
- #include "cphotoftpsend.h"
- #include "SetDlg.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // SetDlg dialog
- extern BOOL g_check1;
- extern int g_num;
- SetDlg::SetDlg(CWnd* pParent /*=NULL*/)
- : CDialog(SetDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(SetDlg)
- m_check1 = 1;
- m_num = 5;
- CString version = _T ("Version 1.0");
- m_check1=AfxGetApp()->GetProfileInt (version, "bcontinue", 1);
- m_num=min(10, AfxGetApp()->GetProfileInt (version, "nthreadcount", 5));
- //}}AFX_DATA_INIT
- }
- void SetDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(SetDlg)
- DDX_Control(pDX, IDC_SPIN1, m_spin1);
- DDX_Check(pDX, IDC_CHECK1, m_check1);
- DDX_Text(pDX, IDC_EDIT1, m_num);
- DDV_MinMaxUInt(pDX, m_num, 1, 10);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(SetDlg, CDialog)
- //{{AFX_MSG_MAP(SetDlg)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // SetDlg message handlers
- void SetDlg::OnOK()
- {
- // TODO: Add extra validation here
- UpdateData();
- CString version = _T ("Version 1.0");
- AfxGetApp()->WriteProfileInt (version, "bcontinue", m_check1);
- AfxGetApp()->WriteProfileInt (version, "nthreadcount", m_num);
- g_check1=m_check1;
- // g_num=min(10, m_num);
- CDialog::OnOK();
- }
- BOOL SetDlg::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- // TODO: Add extra initialization here
- m_spin1.SetRange (1, 10);
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
|