home *** CD-ROM | disk | FTP | other *** search
- // Settings.cpp : implementation file
- //
-
- #include <afxwin.h>
- #undef IDC_STATIC
- #include "resource.h"
- #include "Settings.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CMfcdllApp
-
- class CMfcdllApp : public CWinApp
- {
- public:
- CMfcdllApp();
-
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CMfcdllApp)
- //}}AFX_VIRTUAL
-
- //{{AFX_MSG(CMfcdllApp)
- // NOTE - the ClassWizard will add and remove member functions here.
- // DO NOT EDIT what you see in these blocks of generated code !
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
-
- BEGIN_MESSAGE_MAP(CMfcdllApp, CWinApp)
- //{{AFX_MSG_MAP(CMfcdllApp)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- // DO NOT EDIT what you see in these blocks of generated code!
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CMfcdllApp construction
-
- CMfcdllApp::CMfcdllApp()
- {
- // TODO: add construction code here,
- // Place all significant initialization in InitInstance
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // The one and only CMfcdllApp object
-
- CMfcdllApp theApp;
-
- /////////////////////////////////////////////////////////////////////////////
- // CSettings dialog
-
-
- CSettings::CSettings(CWnd* pParent /*=NULL*/)
- : CDialog(CSettings::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CSettings)
- m_arg_sections = _T("");
- m_other_sections = _T("");
- m_input_arg_sections = _T("");
- m_output_arg_sections = _T("");
- //}}AFX_DATA_INIT
- }
-
-
- void CSettings::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CSettings)
- DDX_Text(pDX, IDC_ARGS, m_arg_sections);
- DDX_Text(pDX, IDC_OTHERS, m_other_sections);
- DDX_Text(pDX, IDC_INPUT_ARGS, m_input_arg_sections);
- DDX_Text(pDX, IDC_OUTPUT_ARGS, m_output_arg_sections);
- //}}AFX_DATA_MAP
- }
-
-
- BEGIN_MESSAGE_MAP(CSettings, CDialog)
- //{{AFX_MSG_MAP(CSettings)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CSettings message handlers
-
- void CSettings::OnOK()
- {
- UpdateData();
-
- if ( strspn( m_other_sections, "\r\n ," ) == (unsigned)m_other_sections.GetLength() ) {
- MessageBox( "You must enter at least one non-argument section header",
- "Error", MB_ICONERROR | MB_OK );
- return;
- }
-
- // TODO: Verify that a section isn't listed in more than one section.
-
- CDialog::OnOK();
- }
-
- BOOL CSettings::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- UpdateData( FALSE );
-
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
-