資源簡介
C++ 電影公布器2.0-------網(wǎng)絡(luò)版MYSQL數(shù)據(jù)庫

代碼片段和文件信息
//?CDATA1.cpp?:?implementation?file
//
#include?“stdafx.h“
#include?“XXXSESE.h“
#include?“CDATA1.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CCDATA1?dialog
extern?CXXXSESEApp?theApp;
CCDATA1::CCDATA1(CWnd*?pParent?/*=NULL*/)
:?CDialog(CCDATA1::IDD?pParent)
{
//{{AFX_DATA_INIT(CCDATA1)
//m_abc?=?-1;
//}}AFX_DATA_INIT
}
void?CCDATA1::DoDataExchange(CDataExchange*?pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCDATA1)
DDX_Control(pDX?IDC_LIST3?m_LIST3);
DDX_Control(pDX?IDC_LIST1?m_LIST1);
DDX_Control(pDX?IDC_LIST2?m_LIST2);
DDX_Control(pDX?IDC_COMBO1?m_abc);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CCDATA1?CDialog)
//{{AFX_MSG_MAP(CCDATA1)
ON_NOTIFY(NM_CLICK?IDC_LIST2?onclickList2)
ON_BN_CLICKED(IDC_BUTTON1?OnButton1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CCDATA1?message?handlers
void?CCDATA1::RefreshList()????//刷新數(shù)據(jù)
{
m_LIST2.DeleteAllItems();??//從列表視圖控件中刪除所有的項(xiàng)
SetDlgItemText(IDC_STATIC1?“正在組織數(shù)據(jù)...“);
//////////////////////////////////////////////////////////////////////////
char?*ch_query;
ch_query=“select?*?from?data1“;
if(mysql_real_query(&theApp.mysqlch_query(UINT)strlen(ch_query))!=0)??//對數(shù)據(jù)庫的操作
{?
AfxMessageBox(“數(shù)據(jù)庫中表格出錯(cuò)“);?
}
CString?str;
MYSQL_RES?*result;
MYSQL_ROW?row;
if(!(result=mysql_use_result(&theApp.mysql)))??//啟動(dòng)查詢
{?
AfxMessageBox(“讀取數(shù)據(jù)集失敗“);?
}
int?i=0;
m_LIST2.LockWindowUpdate();??//窗口鎖定
while(row=mysql_fetch_row(result))???//返回總行數(shù)
{????
str.Format(“%s“row[0]);???//讀取當(dāng)前行內(nèi)容
m_LIST2.InsertItem(istr);??//添加數(shù)據(jù)
str.Format(“%s“row[1]);
m_LIST2.SetItemText(i1str);
str.Format(“%s“row[2]);
m_LIST2.SetItemText(i2str);
str.Format(“%s“row[3]);
m_LIST2.SetItemText(i3str);
str.Format(“%s“row[4]);
m_LIST2.SetItemText(i4str);
str.Format(“%s“row[5]);
m_LIST2.SetItemText(i5str);
str.Format(“%s“row[6]);
m_LIST2.SetItemText(i6str);
str.Format(“%s“row[7]);
m_LIST2.SetItemText(i7str);
str.Format(“%s“row[8]);
m_LIST2.SetItemText(i8str);
str.Format(“%s“row[9]);
m_LIST2.SetItemText(i9str);
str.Format(“%s“row[10]);
m_LIST2.SetItemText(i10str);
i++;
}
m_LIST2.UnlockWindowUpdate();??//窗口解除
mysql_free_result(result);???//釋放關(guān)聯(lián)內(nèi)存
CString?temp;
temp.Format(“%d?條信息“m_LIST2.GetItemCount());
SetDlgItemText(IDC_STATIC1?temp);
}
BOOL?CCDATA1::OnInitDialog()?
{
CDialog::OnInitDialog();
//?TODO:?Add?extra?initialization?here
//電影表初始化
int?nColIdx?=?0;
m_LIST2.SetExtendedstyle(LVS_EX_FULLROWSELECT?|?LVS_EX_GRIDLINES);
m_LIST2.InsertColumn(nColIdx++?“ID“?LVCFMT_CENTER?0);
m_LIST2.InsertColumn(nColIdx++?“電影名“?LVCFMT_CENTER?80);
????m_LIST2.
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????8903??2011-10-13?20:32??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\CDATA1.cpp
?????文件???????1361??2011-10-12?22:45??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\CDATA1.h
?????文件????????986??2011-10-08?17:47??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\CDATA2.cpp
?????文件???????1217??2011-10-08?17:47??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\CDATA2.h
?????文件????????986??2011-10-08?17:47??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\CDATA3.cpp
?????文件???????1217??2011-10-08?17:47??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\CDATA3.h
?????文件????????986??2011-10-08?17:47??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\CDATA4.cpp
?????文件???????1217??2011-10-08?17:47??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\CDATA4.h
?????文件????????986??2011-10-08?17:48??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\CDATA5.cpp
?????文件???????1217??2011-10-08?17:48??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\CDATA5.h
?????文件???????3597??2011-10-07?23:37??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\ReadMe.txt
?????文件???????8502??2011-10-08?17:42??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\res\0.ico
?????文件???????8502??2011-10-08?17:42??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\res\1.ico
?????文件???????8502??2011-10-08?17:42??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\res\2.ico
?????文件???????8502??2011-10-08?17:42??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\res\3.ico
?????文件???????8502??2011-10-08?17:42??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\res\4.ico
?????文件???????4150??2011-10-08?23:02??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\res\XXXSESE.ico
?????文件????????399??2011-10-07?23:37??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\res\XXXSESE.rc2
?????文件???????1078??2011-10-07?23:37??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\res\XXXSESE1111.ico
?????文件???????1871??2011-10-11?06:12??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\resource.h
?????文件???????3374??2009-10-23?15:19??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\SoftTab.cpp
?????文件???????1586??2009-05-21?22:41??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\SoftTab.h
?????文件????????209??2011-10-07?23:37??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\StdAfx.cpp
?????文件???????1212??2011-10-12?20:27??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\StdAfx.h
?????文件??????86604??2011-10-12?23:59??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\XXXSESE.APS
?????文件???????3499??2011-10-13?20:35??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\XXXSESE.clw
?????文件???????2729??2011-10-12?20:35??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\XXXSESE.cpp
?????文件???????5204??2011-10-12?20:35??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\XXXSESE.dsp
?????文件????????522??2011-10-07?23:37??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\XXXSESE.dsw
?????文件???????1364??2011-10-12?20:29??電影公布器2.0-------網(wǎng)絡(luò)版XXXSESE\XXXSESE.h
............此處省略12個(gè)文件信息
評論
共有 條評論