資源簡介
鼠標放在屏幕最上邊,點擊第一個圖標,盒子打開氣球從盒子飛出來,氣球顏色和位置是rand的,每次打開都不同

代碼片段和文件信息
//?MainFrm.cpp?:?implementation?of?the?CMainframe?class
//
#include?“stdafx.h“
#include?“welcome.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)
ON_WM_CREATE()
ON_WM_GETMINMAXINFO()
//}}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
fullscreenkey=FALSE;
}
CMainframe::~CMainframe()
{
}
int?CMainframe::OnCreate(LPCREATESTRUCT?lpCreateStruct)
{
if?(CframeWnd::OnCreate(lpCreateStruct)?==?-1)
return?-1;
if?(!m_wndToolBar.CreateEx(thisTBstyle_FLATWS_CHILD|CBRS_TOP|
CBRS_GRIPPER|CBRS_TOOLTIPS|CBRS_FLYBY|CBRS_SIZE_DYNAMIC)||
!m_wndToolBar.LoadToolBar(IDR_MAINframe))
{
TRACE0(“Falied?to?creat?toolbar\n“);
return?-1;
}
if?(!m_wndStatusBar.Create(thisWS_CHILD|CBRS_BOTTOM)||
!m_wndStatusBar.SetIndicators(indicatorssizeof(indicators)/sizeof(UINT)))
{
TRACE0(“Failed?to?creat?status?bar“);
return?-1;
}
if?(m_wndStatusBar)
{
m_wndStatusBar.SetPaneInfo(00SBPS_STRETCH50);
m_wndStatusBar.SetPaneInfo(10050);
m_wndStatusBar.SetPaneInfo(20SBPS_STRETCH50);
m_wndStatusBar.SetPaneInfo(30SBPS_STRETCH50);
};
fullscreenkey?=?TRUE;
CRect?winmeclientme;
GetWindowRect(&winme);
RepositionBars(00xffffAFX_IDW_PANE_FIRSTreposQuery&clientme);
ClientToScreen(&clientme);
int?fullwide?=?GetSystemMetrics(SM_CXSCREEN);
int?fullhide?=?GetSystemMetrics(SM_CXSCREEN);
mefullscreen.left?=?winme.left?-?clientme.left;
mefullscreen.top?=?winme.top?-?clientme.top;
mefullscreen.right?=?winme.right?-?clientme.right+fullwide;
mefullscreen.bottom?=?winme.bottom?-?clientme.bottom+fullhide;
WINDOWPLACEMENT?winfull;
winfull.length?=?sizeof(WINDOWPLACEMENT);
winfull.flags?=?0;
winfull.showCmd?=?SW_SHOWNORMAL;
winfull.rcNormalPosition?=?mefullscreen;
SetWindowPlacement(&winfull);
//?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::
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2376??2012-03-14?10:56??box\Debug\BuildLog.htm
?????文件??????57622??2012-03-07?10:03??box\Debug\MainFrm.obj
?????文件?????280049??2012-03-07?10:03??box\Debug\StdAfx.obj
?????文件?????214016??2012-03-07?09:57??box\Debug\vc60.idb
?????文件?????372736??2012-03-07?09:57??box\Debug\vc60.pdb
?????文件?????338944??2012-03-14?10:56??box\Debug\vc70.idb
?????文件????1019904??2012-03-14?10:56??box\Debug\vc70.pdb
?????文件????1531904??2012-03-14?10:56??box\Debug\welcome.exe
?????文件??????27025??2012-03-07?10:03??box\Debug\welcome.obj
?????文件???10485760??2012-03-07?10:03??box\Debug\welcome.pch
?????文件????6818816??2012-03-14?10:56??box\Debug\welcome.pdb
?????文件??????19044??2012-03-13?16:34??box\Debug\welcome.res
?????文件??????15453??2012-03-07?10:03??box\Debug\welcomeDoc.obj
?????文件??????60232??2012-03-14?10:56??box\Debug\welcomeView.obj
?????文件???????4026??2012-03-07?09:20??box\MainFrm.cpp
?????文件???????1593??2012-03-06?14:54??box\MainFrm.h
?????文件???????4335??2012-03-06?14:32??box\ReadMe.txt
?????文件???????1438??2012-03-13?16:34??box\res\Toolbar.bmp
?????文件???????1078??2012-03-06?14:32??box\res\welcome.ico
?????文件????????399??2012-03-06?14:32??box\res\welcome.rc2
?????文件???????1078??2012-03-06?14:32??box\res\welcomeDoc.ico
?????文件????????729??2012-03-13?16:34??box\resource.h
?????文件????????209??2012-03-06?14:32??box\StdAfx.cpp
?????文件???????1054??2012-03-06?14:32??box\StdAfx.h
?????文件??????45896??2012-03-13?16:34??box\welcome.aps
?????文件???????2367??2012-03-07?09:58??box\welcome.clw
?????文件???????4227??2012-03-06?14:32??box\welcome.cpp
?????文件???????4601??2012-03-06?15:38??box\welcome.dsp
?????文件????????520??2012-03-06?14:32??box\welcome.dsw
?????文件???????1367??2012-03-06?14:32??box\welcome.h
............此處省略17個文件信息
評論
共有 條評論