Ôn tập bài tập thực hành lập trình

Cách tạo môt ứng dụng vẽ hình trong Microsoft Visual C++ File à New àXuất hiện cửa sổ New, ta chọn thẻ Projects, sau đó chọn đủ 3 bước sau: B1: Chọn MFC AppWizard(exe) B2: Xác định thư mục chứa ứng dụng trong mục Location B3: Đặt tên cho ứng dụng trong mục Project Name àXuất hiện cửa sổ MFC AppWizard àChọn Single Document (dùng để vẽ hình)

pdf16 trang | Chia sẻ: ttlbattu | Lượt xem: 1864 | Lượt tải: 1download
Bạn đang xem nội dung tài liệu Ôn tập bài tập thực hành lập trình, để tải tài liệu về máy bạn click vào nút DOWNLOAD ở trên
ÔN TẬP BÀI TẬP THỰC HÀNH LẬP TRÌNH WINDOW ****************************************************** Bài 1: IDC_EDIT_A IDC_EDIT_B IDC_STATIC_KETQUA IDC_BUTTON_TINH chọn BN_CLICKED IDC_RADIO_CONG Chọn Group Radio Button Group Box chọn Tab stop void CBai1_1Dlg::OnButtonTinh() { UpdateData (true); float kq; switch (m_pheptinh) { case 0: kq=m_a + m_b; break; case 1: kq=m_a - m_b; break; case 2: kq=m_a * m_b; break; case 3: kq=m_a / m_b; break; } m_ketqua.Format ("%0.0f",kq); UpdateData (false); } Bài 2: IDC_EDIT_NHAP IDC_LIST 1 IDC_LIST2 IDC_BUTTON_PHAI chọn BN_CLICKED IDC_BUTTON_ RAI chọn BN_CLICKED IDC_BUTTON_NHAP chọn BN_CLICKED void CBai1_2Dlg::OnButtonNhap() { UpdateData (true); m_list1.AddString (m_nhap); m_nhap.Empty (); UpdateData(false); } ****************************************************** void CBai1_2Dlg::OnButtonPhai() //click button chuyen du lieu qua phai { UpdateData (true); CString s; int i; i=m_list1.GetCurSel (); m_list1.GetText (i,s); m_list2.AddString (s); m_list1.DeleteString(i); UpdateData (false); } ****************************************************** void CBai1_2Dlg::OnButtonTrai() //click button chuyen du lieu qua trai { int j,i,tong; CString s; //thuc hien viec chuyen cac gia tri duoc chon qua list1 tong=m_list2.GetCount ();//tinh tong cac dong trong listcontrol for (j=0;j<tong;j++ ) { if (m_list2.GetSel(j)==1) { m_list2.GetText (j,s); m_list1.AddString (s); m_list2.DeleteString (j); } } //thuc hien xoa cac gia tri bi chuyen trong list2 tong=m_list2.GetCount (); for (i=0;i<tong;i++ ) { if (m_list2.GetSel(i)==1) { m_list2.DeleteString (i); } } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Bài 3: IDC_COMBO1 chọn: à CBN_SELCHANGE à CBN_SELENDOK IDC_STATIC_1 chọn Group Group Box Vào ComboBox chuột phải chọn Properties à Data: nhập dữ liệu vào (chọn Ctrl+Enter để xuống hàng) Trong thẻ General à Type: + DropDown: cho phép lựa chọn + nhập dữ liệu + DropList: không nhập được dữ liệu + Simple: hiển thị giống listbox void CBai1_4Dlg::OnSelendokCombo1() { UpdateData (true); m_ketqua.Empty (); int i=m_combo.GetCurSel (); CString s,s1,s2; m_combo.GetLBText (i,s); int gt=i+1,tinh; for(int j=1;j<=10;j++) { tinh=gt*j; s1.Format ("%.0d",j); s2.Format ("%.0d",tinh); m_ketqua=m_ketqua + s +" x "+ s1 +"= "+ s2 +"\n"; } UpdateData (false); } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Bài 4: IDC_EDIT_at IDC_EDIT_bt IDC_EDIT_kqt IDC_EDIT_a a IDC_EDIT_b a IDC_EDIT_kqa IDC_RADIO_CONG chọn Group IDC_BUTTON_TINH chọn BN_CLICKED Group Box chọn Tab stop Bài này chúng ta phải khai báo thêm lớp COMPLEX Insert à New Class à - ClassType: Generic Class - Name: COMPLEX - FileName: COMPLEX.cpp - Base class(es): + Derived From: CObject + As: public ****************************************************** COMPLEX.h class COMPLEX : public CObject { protected: double thuc; double ao; public: //phuong thuc cap nhat du lieu void SetComplex(double t,double a); //nguyen mau phuong thuc tra ve phan thuc double GetThuc(); //nguyen phuong thuc tra ve phan ao double GetAo(); //nguyen mau phuong thuc cong hai so phuc COMPLEX cong(COMPLEX z); //nguyen mau phuong thuc tru hai so phuc COMPLEX tru(COMPLEX z); //nguyen mau phuong thuc nhan hai so phuc COMPLEX nhan(COMPLEX z); //nguyen mau phuong thuc chia hai so phuc COMPLEX chia(COMPLEX z); //nguyen mau ham tao hai tham so COMPLEX(double t,double a); //nguyen mau ham tao khong tham so COMPLEX(); //nguyen mau ham huy virtual ~COMPLEX(); //nguyen mau ham tao sao chep COMPLEX(COMPLEX& z); //nguyen mau phuong thuc toan tu + COMPLEX operator +(COMPLEX z); //nguyen mau phuong thuc toan tu - COMPLEX operator -(COMPLEX z); //nguyen mau phuong thuc toan tu * COMPLEX operator *(COMPLEX z); //nguyen mau phuong thuc toan tu / COMPLEX operator /(COMPLEX z); //nguyen mau phuong thuc toan tu = COMPLEX& operator =(COMPLEX& z); }; ****************************************************** COMPLEX.cpp //dinh nghia phuong thuc toan tu = COMPLEX& COMPLEX::operator =(COMPLEX& z) { thuc=z.thuc; ao=z.ao; return *this; } //dinh nghia phuong thuc toan tu + COMPLEX COMPLEX::operator +(COMPLEX z) { COMPLEX t(thuc+z.thuc,ao+z.ao); return t; } //dinh nghia phuong thuc toan tu - COMPLEX COMPLEX::operator -(COMPLEX z) { COMPLEX t(thuc-z.thuc,ao-z.ao); return t; } //dinh nghia phuong thuc toan tu * COMPLEX COMPLEX::operator *(COMPLEX z) { COMPLEX t(thuc*z.thuc,ao*z.ao); return t; } //dinh nghia phuong thuc toan tu / COMPLEX COMPLEX::operator /(COMPLEX z) { COMPLEX t(thuc/z.thuc,ao/z.ao); return t; } //dinh nghia ham tao sao chep COMPLEX::COMPLEX(COMPLEX& z) { thuc=z.thuc; ao=z.ao; } //dinh nghia ham huy COMPLEX::~COMPLEX() { } //dinh nghia ham tao khong tham so COMPLEX::COMPLEX() { thuc=0; ao=0; } //dinh nghia ham tao hai tham so COMPLEX::COMPLEX(double t,double a) { thuc=t; ao=a; } //dinh nghia phuong thuc cong hai so phuc COMPLEX COMPLEX::cong(COMPLEX z) { COMPLEX t; t.thuc=thuc+z.thuc; t.ao=ao+z.ao; return t; } //dinh nghia phuong thuc tru hai so phuc COMPLEX COMPLEX::tru(COMPLEX z) { COMPLEX t; t.thuc=thuc-z.thuc; t.ao=ao-z.ao; return t; } //dinh nghia phuong thuc nhan hai so phuc COMPLEX COMPLEX::nhan(COMPLEX z) { COMPLEX t; t.thuc=thuc*z.thuc; t.ao=ao*z.ao; return t; } //dinh nghia phuong thuc chia hai so phuc COMPLEX COMPLEX::chia(COMPLEX z) { COMPLEX t; t.thuc=thuc/z.thuc; t.ao=ao/z.ao; return t; } //dinh nghia phuong thuc cap nhat du lieu void COMPLEX::SetComplex(double t,double a) { //this->thuc=t; //this->ao=a; thuc=t; ao=a; } //dinh nghia phuong thuc tra ve phan thuc double COMPLEX::GetThuc() { return thuc; } double COMPLEX::GetAo() { return ao; } ****************************************************** Viết trong Dialog chính.cpp oid CBai2Dlg::OnButtonTinh() { COMPLEX a,b,kq; UpdateData(true); a.SetComplex(m_a_thuc,m_a_ao); b.SetComplex(m_b_thuc,m_b_ao); switch (m_pheptinh) { case 0: kq=a+b; break; case 1: kq=a-b; break; case 2: kq= a*b; break; case 3: kq=a/b; break; } m_ketqua_thuc=kq.GetThuc(); m_ketqua_ao=kq.GetAo(); UpdateData(false); } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Cá h tạo môt ứng dụng trong Microsoft Visual C++ File à New àXuất hiện cửa sổ New, ta chọn thẻ Projects, sau đó chọn đủ 3 bước sau: B1: Chọn MFC AppWizard(exe) B2: Xác định thư mục chứa ứng dụng trong mục Location B3: Đặt tên cho ứng dụng trong mục Project Name àXuất hiện cửa sổ MFC AppWizard àChọn Dialog Based %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Bài 5: Tương tự như bài 4 chúng ta cũng khai báo thêm lớp COMPLEX Viết trong Dialog chính.cpp void CBai3Dlg::OnButtonNhap() { UpdateData(true); COMPLEX* p; p=new COMPLEX(m_thuc,m_ao); ds.Add(p); m_list1.AddString(p->Print()); } void CBai3Dlg::OnButtonCong() { COMPLEX* p; COMPLEX s; for(int i=0;i<ds.GetSize();i++) { p=(COMPLEX*)ds.GetAt(i); s=s+(*p); } m_static_cong=s.Print(); UpdateData(false); } IDC_EDIT_THUC IDC_EDIT_AO IDC_STATIC_CONG IDC_LIST1 IDC_BUTTON_NHAP chọn BN_CLICKED IDC_BUTTON_CONG chọn BN_CLICKED List Box chọn tap stop Bài 6: Editbox Các nút nhớ add BN_CLICKED Group Box List Box chọn Tap stop Khai báo thêm lớp RATIO: RATIO.h class RATIO : public CObject { private: int tuso; int mauso; public: virtual ~RATIO(); // ham huy // ham tao RATIO(); RATIO(int a,int b); RATIO(RATIO& c); // ham tao sao chep void SetPhanSo(int a, int b); // gan gia tri phan so // tra ve tu so va mau so int GetTu(); int GetMau(); // nguyen mau cac toan tu ket hop, co ban, so sach RATIO operator=(RATIO a); RATIO operator+(RATIO a); RATIO operator-(RATIO a); RATIO operator*(RATIO a); RATIO operator/(RATIO a); RATIO operator+=(RATIO a); RATIO operator-=(RATIO a); RATIO operator*=(RATIO a); RATIO operator/=(RATIO a); bool operator==(RATIO a); bool operator>(RATIO a); bool operator>=(RATIO a); // ham rut gon phan so: RATIO Reduce(RATIO a); CString Print(); }; ************************************************************* RATIO.cpp ATIO::RATIO() { tuso=mauso=0; } RATIO::RATIO(int a,int b) { tuso=a; mauso=b; } RATIO::RATIO(RATIO& c) { tuso=c.tuso; mauso=c.mauso; } RATIO:: ~RATIO() { } void RATIO::SetPhanSo(int a, int b) { tuso=a; mauso=b; } int RATIO::GetTu() { return tuso; } int RATIO::GetMau() { return mauso; } RATIO RATIO::operator=(RATIO a) { tuso=a.tuso; mauso=a.mauso; return *this; } RATIO RATIO::operator+(RATIO a) { tuso=tuso*a.mauso+a.tuso*mauso; mauso=mauso*a.mauso; return Reduce(*this); } RATIO RATIO::operator-(RATIO a) { tuso=tuso*a.mauso-a.tuso*mauso; mauso=mauso*a.mauso; return Reduce(*this); } RATIO RATIO::operator*(RATIO a) { tuso=tuso*a.tuso; mauso=mauso*a.mauso; return Reduce(*this); } RATIO RATIO::operator/(RATIO a) { tuso=tuso*a.mauso; mauso=mauso*a.tuso; return Reduce(*this); } RATIO RATIO::operator+=(RATIO a) { *this=a+(*this); return *this; } RATIO RATIO::operator-=(RATIO a) { *this=a-(*this); return *this; } RATIO RATIO::operator*=(RATIO a) { *this=a*(*this); return *this; } RATIO RATIO::operator/=(RATIO a) { *this=a/(*this); return *this; } bool RATIO::operator==(RATIO a) { RATIO b; b= Reduce(*this); a=Reduce(a); if((a.tuso=b.tuso)&&(a.mauso=b.mauso)) return true; return false; } bool RATIO::operator>(RATIO a) { if((((double)tuso/(double)mauso)-((double)a.tuso/(double)a.mauso))>0) return true; return false; } bool RATIO::operator>=(RATIO a) { if(((double)tuso/(double)mauso)>=((double)tuso/(double)mauso)) return true; return false; } RATIO RATIO::Reduce(RATIO p) { int a=abs(p.tuso); int b=abs(p.mauso); while(a!=b) { if(a>b) a-=b; else b-=a; } p.tuso=p.tuso/a; p.mauso=p.mauso/a; return p; } CString RATIO::Print() { CString s_tuso,s_mauso,s; if(tuso>0) { s_tuso.Format("%d",tuso); s_mauso.Format("%d",mauso); s=s_tuso +"/"+s_mauso; } else { s_tuso.Format("%d",tuso); s_mauso.Format("%d",mauso); s="-"+s_tuso +"/"+s_mauso; } return s; } ****************************************************** Viết trong dialog chính .cpp void CBaitapTH_5_PhansoDlg::OnButton1() { UpdateData(true); RATIO* p; p=new RATIO(m_tuso,m_mauso); ds.Add(p); m_list.AddString(p->Print()); UpdateData(false); } void CBaitapTH_5_PhansoDlg::OnButton2() { UpdateData(true); if(ds.GetSize()==0) { MessageBox("Ko co phan tu nao de tin kiem !","Thong bao"); } else { RATIO* p; RATIO s=(*(RATIO*)ds.GetAt(0)); for(int i =0;i<ds.GetSize();i++) { p=(RATIO*)ds.GetAt(i); if(s>(*p)) s=(*p); } m_kq_tuso=s.GetTu(); m_kq_mauso = s.GetMau(); UpdateData(false); } } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Bài 7: IDC_STATIC_CHUCHAY IDC_CHECK1 chọn BN_CLICKED Viết trong BOOL CBai1_3Dlg::OnInitDialog() UpdateData (true); m_chuchay="- DOC LAP - TU DO - HANH PHUC "; i=1; UpdateData (false); ****************************************************** void CBai1_3Dlg::OnCheck1() { UpdateData (true); if(m_check) { SetTimer (1,100,NULL); } else { KillTimer (1); } UpdateData (false); } void CBai1_3Dlg::OnTimer(UINT nIDEvent) { UpdateData (true); switch(nIDEvent ) { case 1: int dodai; CString s,s1,s2; s=m_chuchay; dodai=s.GetLength (); s1=m_chuchay.Left (dodai-1); s2=m_chuchay.Right (1); s.Replace (s,s1); m_chuchay=s2+s; break; } UpdateData (false); CDialog::OnTimer(nIDEvent); } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Bài 8: Tên menu: IDR_MENU1 IDC_EDIT_HOTEN IDC_DATETIMEPICKER_NGAYDE N IDC_DATETIMEPICKER_NGAYDI IDC_EDIT_SONGAY IDC_EDIT_TIENTRA IDC_BUTTON_TINHTIEN IDC_BUTTON_RESET IDC_LIST1 Radio Button Group Box chọn Tap stop ControlID(s) Messages ID_FILE_OPEN COMMAND ID_FILE_EXIT ID_FILE_SAVE IDC_BUTTON_RESET BN_CLICKED IDC_BUTTON_TINHTIEN IDC_LIST1 NM_DBLCLK CKhachsanDlg Serialize Khai báo thêm một lớp thông tin thongtin.h class Cthongtin : public CObject { public: DECLARE_SERIAL(Cthongtin) void Serialize(CArchive& ar); long mtientra; int msongay; int mloai; CString mhoten,mngayden,mngaydi; Cthongtin(); virtual ~Cthongtin(); }; thongtin.cpp void Cthongtin::Serialize(CArchive& ar) { if (ar.IsStoring()) { // storing code ar<<mhoten<<mngayden <<mngaydi <<mloai<<msongay <<mtientra; } else { // loading code ar>>mhoten>>mngayden >>mngaydi >>mloai>>msongay >>mtientra; } } Khachsan.cpp void CKhachsanDlg::OnButtonTinhtien() { UpdateData (true); CString s1,s2,s3,s4,s5; if(m_ngayden >=m_ngaydi || m_hoten.IsEmpty () || m_loai ==-1) MessageBox ("Chua nhap, hay chon gia tri roi?...","Thong bao",MB_ICONEXCLAMATION); else { COleDateTimeSpan giatri; giatri=m_ngaydi - m_ngayden; //todo:phai ep kieu du lieu ngay thang nam khi lay ra //m_static.Format ("%d",(int)giatri.GetTotalDays ()); m_songay=(int)giatri.GetTotalDays (); m_tientra=(long)m_songay * loaiphong ();//co phuong thuc go ham loaiphong() UpdateData (false); s1.Format ("%d",m_songay); s2.Format ("%.0ld",m_tientra); s3.Format ("%ld",loaiphong ()); s4.Format ("%d/%d/%d",m_ngayden.GetDay (),m_ngayden .GetMonth (),m_ngayden .GetYear ()); s5.Format ("%d/%d/%d",m_ngaydi.GetDay (),m_ngaydi .GetMonth (),m_ngaydi .GetYear ()); int n; n=m_list.GetItemCount (); m_list.InsertItem (n,m_hoten); m_list.SetItemText (n,1,s4); //add ngay den vao ListCtrl m_list.SetItemText (n,2,s5); //add ngay di vao ListCtrl m_list.SetItemText (n,3,s3); //add loai phong vao ListCtrl m_list.SetItemText (n,4,s1); //add so ngay thue vao ListCtrl m_list.SetItemText (n,5,s2 +" " "VND"); //add tien tra vao ListCtrl Cthongtin *p=new Cthongtin (); p->mhoten =m_hoten; p->mngayden =s4; p->mngaydi =s5; p->mloai =loaiphong(); p->msongay =m_songay; p->mtientra =m_tientra; mArray.Add (p); m_reset.ShowWindow (true); m_tinhtien.ShowWindow (false); } } long CKhachsanDlg::loaiphong() { switch(m_loai) { case 0: return 100000; break; case 1: return 150000; break; case 2: return 200000; break; case 3: return 250000; break; } return 0; } void CKhachsanDlg::OnFileExit() { exit(1); } void CKhachsanDlg::OnFileOpen() { CFileDialog dlg(true); CFile f; BOOL b; if(dlg.DoModal()==IDOK) { b=f.Open (dlg.GetFileName (),CFile::modeRead|CFile::typeBinary); if(b) { CArchive ar(&f,CArchive::load); mArray.Serialize (ar); Cthongtin *p; int n; CString s1,s2,s3; for(int i=0;i<mArray.GetSize ();i++) { p=(Cthongtin*)mArray.GetAt (i); n=m_list.GetItemCount (); m_list.InsertItem (n,p->mhoten ); m_list.SetItemText (n,1,p->mngayden ); m_list.SetItemText (n,2,p->mngaydi ); s1.Format ("%d",p->mloai ); s2.Format ("%d",p->msongay ); s3.Format ("%ld",p->mtientra ); m_list.SetItemText (n,3,s1); m_list.SetItemText (n,4,s2); m_list.SetItemText (n,5,s3+ " ""VND"); } ar.Close(); }f.Close (); } } void CKhachsanDlg::OnFileSave() { CFileDialog dlg(false); CFile f; if(dlg.DoModal ()==IDOK) { f.Open (dlg.GetFileName(),CFile::modeCreate|CFile::modeWrite|CFile::typeBinary); CArchive ar(&f,CArchive::store); mArray.Serialize (ar); ar.Close(); f.Close (); } } void CKhachsanDlg::Serialize(CArchive& ar) { if (ar.IsStoring()) { // storing code } else { // loading code } } void CKhachsanDlg::OnDblclkList1(NMHDR* pNMHDR, LRESULT* pResult) { CString s1,s2,s3,s4,s5; for(int i=0;i<m_list.GetItemCount ();i++) { if(m_list.GetItemState (i,LVIS_SELECTED)==LVIS_SELECTED) { m_hoten =m_list.GetItemText (i,0); //lay gia tri ho ten tu ListCtrl va dua len Dlg s1=m_list.GetItemText (i,1);//lay gia tri ngay den s2=m_list.GetItemText (i,2);//lay gia tri ngay di s3=m_list.GetItemText (i,3);//lay gia tri loai phong s4=m_list.GetItemText (i,4);//lay gia tri so ngay thue s5=m_list.GetItemText (i,5);//lay gia tri tien tra //todo: dua gia tri ngay den tu ListCtrl len Dlg CString strngden; int ngden,thden,namden; strngden.Format ("%s",s1); if(strngden.GetLength ()==8) { ngden=atoi(strngden.Left (1)); thden=atoi(strngden.Mid (2,1)); namden=atoi(strngden.Right (4)); } else { if(strngden.GetLength ()==10) { ngden=atoi(strngden.Left (2)); thden=atoi(strngden.Mid (3,2)); namden=atoi(strngden.Right (4)); } else if(strngden.GetLength ()==9 && strngden.Mid (1,1)=="/") { ngden=atoi(strngden.Left (1)); thden=atoi(strngden.Mid (2,2)); namden=atoi(strngden.Right(4)); } else { ngden=atoi(strngden.Left (2)); thden=atoi(strngden.Mid (3,1)); namden=atoi(strngden.Right (4)); } } m_ngayden .SetDate (namden,thden ,ngden); //todo:: dua gia tri ngay di tu ListCtrl len Dlg CString strngdi; int ngdi,thdi,namdi; strngdi.Format ("%s",s2); if(strngdi.GetLength ()==8) { ngdi=atoi(strngdi.Left (1)); thdi=atoi(strngdi.Mid (2,1)); namdi=atoi(strngdi.Right (4)); } else { if(strngdi.GetLength ()==10) { ngdi=atoi(strngdi.Left (2)); thdi=atoi(strngdi.Mid (3,2)); namdi=atoi(strngdi.Right (4)); } else if(strngdi.GetLength ()==9 && strngdi.Mid (1,1)=="/") { ngdi=atoi(strngdi.Left (1)); thdi=atoi(strngdi.Mid (2,2)); namdi=atoi(strngdi.Right(4)); } else { ngdi=atoi(strngdi.Left (2)); thdi=atoi(strngdi.Mid (3,1)); namdi=atoi(strngdi.Right (4)); } } m_ngaydi.SetDate (namdi ,thdi, ngdi); //todo: dua gia loai phong len Dlg int mgiaphong=atoi(s3); switch(mgiaphong) { case 100000: m_loai =0;break; case 150000: m_loai =1;break; case 200000: m_loai =2;break; case 250000: m_loai =3;break; } //todo: dua cac gia tri so ngay thue va tien tra len Dlg m_songay=atoi(s4); m_tientra=atol(s5); } } UpdateData (false); *pResult = 0; } void CKhachsanDlg::Reset()//add function vao nhe { //todo: viet lenh reset noi dung, de nhap moi m_hoten.Empty (); m_ngayden =COleDateTime ::GetCurrentTime (); m_ngaydi =COleDateTime ::GetCurrentTime (); m_songay=0; m_tientra=0; m_loai=-1; UpdateData (false); } void CKhachsanDlg::OnButtonReset() { Reset (); m_tinhtien.ShowWindow (true); m_reset.ShowWindow (false); UpdateData (false); } ************************************************************** Viết trong BOOL CKhachsanDlg::OnInitDialog() UpdateData (true); m_reset.ShowWindow (false); m_list.InsertColumn (0,"Ho ten",LVCFMT_LEFT,120); m_list.InsertColumn(1,"Ngay bat dau",LVCFMT_LEFT,120); m_list.InsertColumn(2,"Ngay ket thuc",LVCFMT_LEFT,120); m_list.InsertColumn(3,"Loai phong",LVCFMT_LEFT,100); m_list.InsertColumn(4,"So ngay thue",LVCFMT_LEFT,120); m_list.InsertColumn(5,"So tien tra",LVCFMT_LEFT,120); UpdateDat
Tài liệu liên quan