?? seek.cpp
字號:
// seek.cpp : implementation file
//
#include "stdafx.h"
#include "課程設計.h"
#include "seek.h"
#include "film.h"
#include "rage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// Cseek dialog
Cseek::Cseek(CWnd* pParent /*=NULL*/)
: CDialog(Cseek::IDD, pParent)
{
//{{AFX_DATA_INIT(Cseek)
m_id = _T("");
//}}AFX_DATA_INIT
}
void Cseek::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(Cseek)
DDX_Control(pDX, IDC_LIST1, m_list);
DDX_Text(pDX, IDC_EDIT1, m_id);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(Cseek, CDialog)
//{{AFX_MSG_MAP(Cseek)
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Cseek message handlers
void Cseek::OnOK()
{
// TODO: Add extra validation here
Cfilm film;
UpdateData(true);
CString str,msg="未借出";
str=m_id;
if(str=="")
AfxMessageBox("請輸入要查詢的影碟的編號");
else
{
film.sql_seek(str);
if(film.lend==true)
msg="借出";
if(film.id!=0)
{
str.Format("%d",film.id);
m_list.AddString(str + " " + film.name + " " + film.author + " " + msg);
}
}
//CDialog::OnOK();
}
void Cseek::OnButton1()
{
// TODO: Add your control notification handler code here
m_id="";
UpdateData(false);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -