按键盘上方向键 ← 或 → 可快速上下翻页,按键盘上的 Enter 键可回到本书目录页,按键盘上方向键 ↑ 可回到本页顶部!
————未阅读完?加入书签已便下次继续阅读!
}
BOOL CTyssqlDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CTyssqlDoc diagnostics
#ifdef _DEBUG
void CTyssqlDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CTyssqlDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
518
…………………………………………………………Page 519……………………………………………………………
SQL 21 日自学通(V1。0) 翻译人 笨猪
/////////////////////////////////////////////////////////////////////////////
// CTyssqlDoc mands
// stdafx。cpp : source file that includes just the standard includes
// stdafx。pch will be the pre…piled header
// stdafx。obj will contain the pre…piled type information
#include 〃stdafx。h〃
// mainfrm。cpp : implementation of the CMainFrame class
//
#include 〃stdafx。h〃
#include 〃tyssql。h〃
#include 〃mainfrm。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)
// NOTE the ClassWizard will add and remove mapping macros here。
// DO NOT EDIT what you see in these blocks of generated code !
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// arrays of IDs used to initialize control bars
// toolbar buttons IDs are mand buttons
static UINT BASED_CODE buttons'' =
{
519
…………………………………………………………Page 520……………………………………………………………
SQL 21 日自学通(V1。0) 翻译人 笨猪
// same order as in the bitmap 'toolbar。bmp'
ID_EDIT_CUT;
ID_EDIT_COPY;
ID_EDIT_PASTE;
ID_SEPARATOR;
ID_FILE_PRINT;
ID_SEPARATOR;
ID_RECORD_FIRST;
ID_RECORD_PREV;
ID_RECORD_NEXT;
ID_RECORD_LAST;
ID_SEPARATOR;
ID_APP_ABOUT;
};
static UINT BASED_CODE indicators'' =
{
ID_SEPARATOR; // status line indicator
ID_INDICATOR_CAPS;
ID_INDICATOR_NUM;
ID_INDICATOR_SCRL;
};
/////////////////////////////////////////////////////////////////////////////
// CMainFrame construction/destruction
CMainFrame::CMainFrame()
{
// TODO: add member initialization code here
}
CMainFrame::~CMainFrame()
{
}
520
…………………………………………………………Page 521……………………………………………………………
SQL 21 日自学通(V1。0) 翻译人 笨猪
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == …1)
return …1;
if (!m_wndToolBar。Create(this) ||
!m_wndToolBar。LoadBitmap(IDR_MAINFRAME) ||
!m_wndToolBar。SetButtons(buttons;
sizeof(buttons)/sizeof(UINT)))
{
TRACE(〃Failed to create toolbarn〃);
return …1; // fail to create
}
if (!m_wndStatusBar。Create(this) ||
!m_wndStatusBar。SetIndicators(indicators;
sizeof(indicators)/sizeof(UINT)))
{
TRACE(〃Failed to create status barn〃);
return …1; // fail to create
}
return 0;
}
/////////////////////////////////////////////////////////////////////////////
// CMainFrame diagnostics
#ifdef _DEBUG
void CMainFrame::AssertValid() const
{
CFrameWnd::AssertValid();
}
void CMainFrame::Dump(CDumpContext& dc) const
{
521
…………………………………………………………Page 522……………………………………………………………
SQL 21 日自学通(V1。0) 翻译人 笨猪
CFrameWnd::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CMainFrame message handlers
522
…………………………………………………………Page 523……………………………………………………………
SQL 21 日自学通(V1。0) 翻译人 笨猪
附件 C 第 14 天中的 Delphi 源代码清单
program Tyssql;
uses
Forms;