71067401ae
git-svn-id: svn://10.65.10.50/trunk@5000 c028cbd2-c16b-5b4b-a496-9718f37d4682
72 lines
1.4 KiB
C++
Executable File
72 lines
1.4 KiB
C++
Executable File
// mainfrm.cpp : implementation of the CMainFrame class
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "sesadump.h"
|
|
|
|
#include "mainfrm.h"
|
|
|
|
#include "sesadlg.h"
|
|
#include "sesa.h"
|
|
|
|
#ifdef _DEBUG
|
|
#undef THIS_FILE
|
|
static char BASED_CODE THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CMainFrame
|
|
|
|
IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
|
|
|
|
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
|
|
//{{AFX_MSG_MAP(CMainFrame)
|
|
ON_COMMAND(ID_FILE_OPEN, OnFileOpen)
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CMainFrame construction/destruction
|
|
|
|
CMainFrame::CMainFrame()
|
|
{
|
|
// TODO: add member initialization code here
|
|
}
|
|
|
|
CMainFrame::~CMainFrame()
|
|
{
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CMainFrame diagnostics
|
|
|
|
#ifdef _DEBUG
|
|
void CMainFrame::AssertValid() const
|
|
{
|
|
CFrameWnd::AssertValid();
|
|
}
|
|
|
|
void CMainFrame::Dump(CDumpContext& dc) const
|
|
{
|
|
CFrameWnd::Dump(dc);
|
|
}
|
|
|
|
#endif //_DEBUG
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CMainFrame message handlers
|
|
|
|
void CMainFrame::OnFileOpen()
|
|
{
|
|
CSesaDlg dlg;
|
|
if (dlg.DoModal() == IDOK)
|
|
{
|
|
BOOL ok = SESA_OpenDatabase(dlg.m_strDSN, dlg.m_strConnect);
|
|
if (ok)
|
|
{
|
|
SESA_DumpTable(dlg.m_strTable);
|
|
SESA_CloseDatabase();
|
|
}
|
|
}
|
|
}
|