資源簡介
mfc單文檔畫圖,可改顏色,設置畫筆線條粗細,自己做的mfc作業參考一下

代碼片段和文件信息
//?MainFrm.cpp?:?implementation?of?the?CMainframe?class
//
#include?“stdafx.h“
#include?“yu.h“
#include?“MainFrm.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CMainframe
IMPLEMENT_DYNCREATE(CMainframe?CframeWnd)
BEGIN_MESSAGE_MAP(CMainframe?CframeWnd)
//{{AFX_MSG_MAP(CMainframe)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code?!
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
static?UINT?indicators[]?=
{
ID_SEPARATOR???????????//?status?line?indicator
ID_INDICATOR_CAPS
ID_INDICATOR_NUM
ID_INDICATOR_SCRL
};
/////////////////////////////////////////////////////////////////////////////
//?CMainframe?construction/destruction
CMainframe::CMainframe()
{
//?TODO:?add?member?initialization?code?here
}
CMainframe::~CMainframe()
{
}
int?CMainframe::OnCreate(LPCREATESTRUCT?lpCreateStruct)
{
if?(CframeWnd::OnCreate(lpCreateStruct)?==?-1)
return?-1;
if?(!m_wndToolBar.CreateEx(this?TBstyle_FLAT?WS_CHILD?|?WS_VISIBLE?|?CBRS_TOP
|?CBRS_GRIPPER?|?CBRS_TOOLTIPS?|?CBRS_FLYBY?|?CBRS_SIZE_DYNAMIC)?||
!m_wndToolBar.LoadToolBar(IDR_MAINframe))
{
TRACE0(“Failed?to?create?toolbar\n“);
return?-1;??????//?fail?to?create
}
if?(!m_wndStatusBar.Create(this)?||
!m_wndStatusBar.SetIndicators(indicators
??sizeof(indicators)/sizeof(UINT)))
{
TRACE0(“Failed?to?create?status?bar\n“);
return?-1;??????//?fail?to?create
}
//?TODO:?Delete?these?three?lines?if?you?don‘t?want?the?toolbar?to
//??be?dockable
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);
return?0;
}
BOOL?CMainframe::PreCreateWindow(CREATESTRUCT&?cs)
{
if(?!CframeWnd::PreCreateWindow(cs)?)
return?FALSE;
//?TODO:?Modify?the?Window?class?or?styles?here?by?modifying
//??the?CREATESTRUCT?cs
return?TRUE;
}
/////////////////////////////////////////////////////////////////////////////
//?CMainframe?diagnostics
#ifdef?_DEBUG
void?CMainframe::AssertValid()?const
{
CframeWnd::AssertValid();
}
void?CMainframe::Dump(CDumpContext&?dc)?const
{
CframeWnd::Dump(dc);
}
#endif?//_DEBUG
/////////////////////////////////////////////////////////////////////////////
//?CMainframe?message?handlers
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????20149??2010-11-15?23:54??yu\Debug\MainFrm.obj
?????文件??????????0??2010-11-15?23:54??yu\Debug\MainFrm.sbr
?????文件??????16491??2010-11-16?12:08??yu\Debug\SettingDialog.obj
?????文件??????????0??2010-11-16?12:08??yu\Debug\SettingDialog.sbr
?????文件?????105844??2010-11-15?23:54??yu\Debug\StdAfx.obj
?????文件????1374943??2010-11-15?23:54??yu\Debug\StdAfx.sbr
?????文件?????222208??2010-11-16?12:08??yu\Debug\vc60.idb
?????文件?????372736??2010-11-16?12:08??yu\Debug\vc60.pdb
?????文件????3671040??2010-11-16?12:08??yu\Debug\yu.bsc
?????文件?????118868??2010-11-16?12:08??yu\Debug\yu.exe
?????文件?????423752??2010-11-16?12:08??yu\Debug\yu.ilk
?????文件??????22966??2010-11-16?00:32??yu\Debug\yu.obj
?????文件????6941440??2010-11-15?23:54??yu\Debug\yu.pch
?????文件?????508928??2010-11-16?12:08??yu\Debug\yu.pdb
?????文件???????7636??2010-11-16?11:39??yu\Debug\yu.res
?????文件??????????0??2010-11-16?00:32??yu\Debug\yu.sbr
?????文件??????14753??2010-11-15?23:54??yu\Debug\yuDoc.obj
?????文件??????????0??2010-11-15?23:54??yu\Debug\yuDoc.sbr
?????文件??????31976??2010-11-16?12:07??yu\Debug\yuView.obj
?????文件??????????0??2010-11-16?12:07??yu\Debug\yuView.sbr
?????文件???????2503??2010-11-15?20:26??yu\MainFrm.cpp
?????文件???????1581??2010-11-15?20:26??yu\MainFrm.h
?????文件???????4215??2010-11-15?20:26??yu\ReadMe.txt
?????文件???????1078??2010-11-15?20:26??yu\res\Toolbar.bmp
?????文件???????1078??2010-11-15?20:26??yu\res\yu.ico
?????文件????????394??2010-11-15?20:26??yu\res\yu.rc2
?????文件???????1078??2010-11-15?20:26??yu\res\yuDoc.ico
?????文件???????1146??2010-11-16?09:38??yu\resource.h
?????文件???????2572??2010-11-16?12:08??yu\SettingDialog.cpp
?????文件???????1403??2010-11-16?12:03??yu\SettingDialog.h
............此處省略22個文件信息
評論
共有 條評論