資源簡介
這里面包含幾種有特色的重繪按鈕,代碼注釋清晰容易上手。

代碼片段和文件信息
//?BeauButton.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“BeauButton.h“
#include?“BeauButtonDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CBeauButtonApp
BEGIN_MESSAGE_MAP(CBeauButtonApp?CWinApp)
//{{AFX_MSG_MAP(CBeauButtonApp)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG
ON_COMMAND(ID_HELP?CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CBeauButtonApp?construction
CBeauButtonApp::CBeauButtonApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CBeauButtonApp?object
CBeauButtonApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CBeauButtonApp?initialization
BOOL?CBeauButtonApp::InitInstance()
{
AfxEnableControlContainer();
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//??of?your?final?executable?you?should?remove?from?the?following
//??the?specific?initialization?routines?you?do?not?need.
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
CBeauButtonDlg?dlg;
m_pMainWnd?=?&dlg;
int?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?OK
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?Cancel
}
//?Since?the?dialog?has?been?closed?return?FALSE?so?that?we?exit?the
//??application?rather?than?start?the?application‘s?message?pump.
return?FALSE;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????35764??2014-02-18?17:46??BeauButton\BeauButton.aps
?????文件???????1741??2014-02-24?16:56??BeauButton\BeauButton.clw
?????文件???????2119??2013-12-25?17:23??BeauButton\BeauButton.cpp
?????文件???????5071??2014-02-19?13:28??BeauButton\BeauButton.dsp
?????文件????????543??2013-12-25?17:23??BeauButton\BeauButton.dsw
?????文件???????1423??2014-02-19?09:28??BeauButton\BeauButton.h
?????文件??????74752??2014-02-24?18:50??BeauButton\BeauButton.ncb
?????文件??????55808??2014-02-24?18:50??BeauButton\BeauButton.opt
?????文件????????254??2014-02-24?13:58??BeauButton\BeauButton.plg
?????文件???????5392??2014-02-18?17:46??BeauButton\BeauButton.rc
?????文件???????5235??2014-02-19?10:32??BeauButton\BeauButtonDlg.cpp
?????文件???????1575??2014-02-18?17:38??BeauButton\BeauButtonDlg.h
?????文件???????1092??2014-02-20?10:03??BeauButton\ConfigInfo.cpp
?????文件????????654??2014-02-19?09:40??BeauButton\ConfigInfo.h
?????文件?????778312??2014-02-24?13:57??BeauButton\Debug\BeauButton.exe
?????文件????1245820??2014-02-24?13:57??BeauButton\Debug\BeauButton.ilk
?????文件?????????51??2014-02-19?10:32??BeauButton\Debug\BeauButton.ini
?????文件??????25352??2014-02-24?13:56??BeauButton\Debug\BeauButton.obj
?????文件????5501788??2014-02-18?16:11??BeauButton\Debug\BeauButton.pch
?????文件????1983488??2014-02-24?13:57??BeauButton\Debug\BeauButton.pdb
?????文件???????2648??2014-02-18?17:46??BeauButton\Debug\BeauButton.res
?????文件??????38389??2014-02-24?13:56??BeauButton\Debug\BeauButtonDlg.obj
?????文件??????17960??2014-02-20?10:03??BeauButton\Debug\ConfigInfo.obj
?????文件??????90713??2012-06-06?13:09??BeauButton\Debug\msado15.tlh
?????文件??????76661??2012-06-06?13:09??BeauButton\Debug\msado15.tli
?????文件??????16246??2014-02-24?13:56??BeauButton\Debug\MyButton.obj
?????文件??????11794??2014-02-19?09:28??BeauButton\Debug\MyEdit.obj
?????文件??????21443??2014-02-19?09:28??BeauButton\Debug\MyGridCtrl.obj
?????文件??????31430??2014-02-19?09:28??BeauButton\Debug\NewButton.obj
?????文件?????106787??2014-02-18?16:11??BeauButton\Debug\StdAfx.obj
............此處省略22個文件信息
- 上一篇:簡易打字游戲程序 MFC
- 下一篇:數字圖像處理 DIB的讀取與顯示VC源代碼
評論
共有 條評論