資源簡介
適合mfc新手入門,是基于mfc對話框變成,代碼簡易易理解。

代碼片段和文件信息
//?caddwin.cpp?:?implementation?file
//
#include?“stdafx.h“
#include?“StudentSystem.h“
#include?“caddwin.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?caddwin?dialog
caddwin::caddwin(CWnd*?pParent?/*=NULL*/)
:?CDialog(caddwin::IDD?pParent)
{
//{{AFX_DATA_INIT(caddwin)
//?NOTE:?the?ClassWizard?will?add?member?initialization?here
//}}AFX_DATA_INIT
}
void?caddwin::DoDataExchange(CDataExchange*?pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(caddwin)
//?NOTE:?the?ClassWizard?will?add?DDX?and?DDV?calls?here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(caddwin?CDialog)
//{{AFX_MSG_MAP(caddwin)
ON_WM_PAINT()
ON_WM_CTLCOLOR()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?caddwin?message?handlers
void?caddwin::OnOK()?
{
//?TODO:?Add?extra?validation?here
CDialog::OnOK();
}
void?caddwin::OnPaint()?
{
CPaintDC?dc(this);
?CBitmap???bitmap;
?bitmap.LoadBitmap(IDB_BITMAP1);????//這個IDB_BITMAP1要自己添加
?CBrush???brush;
?brush.CreatePatternBrush(&bitmap);
?CBrush*???pOldBrush???=???dc.Selectobject(&brush);
?dc.Rectangle(00600400);???//?這些參數可以調整圖片添加位置和大小
?dc.Selectobject(pOldBrush);
}
HBRUSH?caddwin::OnCtlColor(CDC*?pDC?CWnd*?pWnd?UINT?nCtlColor)?
{
HBRUSH?hbr?=?CDialog::OnCtlColor(pDC?pWnd?nCtlColor);
if((pWnd->GetDlgCtrlID()?==?ADD_STATIC))
??{
???pDC->SetTextColor(RGB(250250250));//設置靜態文本框字體顏色
???pDC->SetBkMode(TRANSPARENT);//設置為透明
???return?HBRUSH(GetStockobject(HOLLOW_BRUSH));//設置透明這句話不能掉
??}
return?hbr;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-07-09?09:47??StudentSystem\
?????文件??????????26??2018-07-05?16:48??StudentSystem\b.txt
?????文件????????1818??2018-07-05?16:43??StudentSystem\caddwin.cpp
?????文件????????1280??2018-07-05?16:42??StudentSystem\caddwin.h
?????文件????????2694??2018-07-05?16:19??StudentSystem\DataInput.cpp
?????文件????????1898??2018-07-05?16:14??StudentSystem\DataInput.h
?????文件????????2803??2018-07-05?16:32??StudentSystem\DataSeeek.cpp
?????文件????????1352??2018-07-05?16:25??StudentSystem\DataSeeek.h
?????目錄???????????0??2018-07-09?09:47??StudentSystem\Debug\
?????文件???????14434??2018-07-05?16:43??StudentSystem\Debug\caddwin.obj
?????文件???????????0??2018-07-05?16:43??StudentSystem\Debug\caddwin.sbr
?????文件???????30673??2018-07-05?16:43??StudentSystem\Debug\DataInput.obj
?????文件???????????0??2018-07-05?16:43??StudentSystem\Debug\DataInput.sbr
?????文件???????32156??2018-07-05?16:32??StudentSystem\Debug\DataSeeek.obj
?????文件???????????0??2018-07-05?16:32??StudentSystem\Debug\DataSeeek.sbr
?????文件???????28192??2018-07-05?16:44??StudentSystem\Debug\SDELETE.obj
?????文件???????????0??2018-07-05?16:44??StudentSystem\Debug\SDELETE.sbr
?????文件??????105776??2018-07-03?16:39??StudentSystem\Debug\StdAfx.obj
?????文件?????1376336??2018-07-03?16:39??StudentSystem\Debug\StdAfx.sbr
?????文件?????5800960??2018-07-05?16:44??StudentSystem\Debug\StudentSystem.bsc
?????文件??????700501??2018-07-05?16:44??StudentSystem\Debug\StudentSystem.exe
?????文件??????309172??2018-07-05?16:44??StudentSystem\Debug\StudentSystem.ilk
?????文件???????13407??2018-07-05?16:08??StudentSystem\Debug\StudentSystem.obj
?????文件?????7073316??2018-07-03?16:39??StudentSystem\Debug\StudentSystem.pch
?????文件??????427008??2018-07-05?16:44??StudentSystem\Debug\StudentSystem.pdb
?????文件??????484092??2018-07-05?16:43??StudentSystem\Debug\StudentSystem.res
?????文件???????????0??2018-07-05?16:08??StudentSystem\Debug\StudentSystem.sbr
?????文件???????34453??2018-07-05?16:40??StudentSystem\Debug\StudentSystemDlg.obj
?????文件???????????0??2018-07-05?16:40??StudentSystem\Debug\StudentSystemDlg.sbr
?????文件??????279552??2018-07-05?16:44??StudentSystem\Debug\vc60.idb
?????文件??????462848??2018-07-05?16:44??StudentSystem\Debug\vc60.pdb
............此處省略22個文件信息
評論
共有 條評論