資源簡介
該程序的主要功能是同時用直方圖和餅圖顯示某一高校的博士研究生、碩士研究生、本科生和專科生的比例分布,并用文字和不同顏色表示學生的類別。
通過設置坐標映射模式定義餅圖和直方圖的邏輯坐標原點、坐標方向和單位。可以在程序里修改比例,改變圖形。
我是一個初學者,這個程序是自己一步一步摸索出來的,肯定有很多不足,請大家指正。

代碼片段和文件信息
//?A7.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“A7.h“
#include?“MainFrm.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CA7App
BEGIN_MESSAGE_MAP(CA7App?CWinApp)
//{{AFX_MSG_MAP(CA7App)
ON_COMMAND(ID_APP_ABOUT?OnAppAbout)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CA7App?construction
CA7App::CA7App()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CA7App?object
CA7App?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CA7App?initialization
BOOL?CA7App::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
//?Change?the?registry?key?under?which?our?settings?are?stored.
//?TODO:?You?should?modify?this?string?to?be?something?appropriate
//?such?as?the?name?of?your?company?or?organization.
SetRegistryKey(_T(“Local?AppWizard-Generated?Applications“));
//?To?create?the?main?window?this?code?creates?a?new?frame?window
//?object?and?then?sets?it?as?the?application‘s?main?window?object.
CMainframe*?pframe?=?new?CMainframe;
m_pMainWnd?=?pframe;
//?create?and?load?the?frame?with?its?resources
pframe->Loadframe(IDR_MAINframe
WS_OVERLAPPEDWINDOW?|?FWS_ADDTOtitle?NULL
NULL);
//?The?one?and?only?window?has?been?initialized?so?show?and?update?it.
pframe->ShowWindow(SW_SHOW);
pframe->UpdateWindow();
return?TRUE;
}
/////////////////////////////////////////////////////////////////////////////
//?CA7App?message?handlers
/////////////////////////////////////////////////////////////////////////////
//?CAboutDlg?dialog?used?for?App?About
class?CAboutDlg?:?public?CDialog
{
public:
CAboutDlg();
//?Dialog?Data
//{{AFX_DATA(CAboutDlg)
enum?{?IDD?=?IDD_ABOUTBOX?};
//}}AFX_DATA
//?ClassWizard?generated?virtual?function?overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual?void?DoDataExchange(CDataExchange*?pDX);????//?DDX/DDV?support
//}}AFX_VIRTUAL
//?Implementation
protected:
//{{AFX_MSG(CAboutDlg)
//?No?message?handlers
//}}AFX_MSG
DECLARE_MESSA
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????40120??2011-11-03?22:04??A7\A7.APS
?????文件???????1720??2011-11-11?00:18??A7\A7.clw
?????文件???????3621??2011-10-28?10:17??A7\A7.cpp
?????文件???????4289??2011-10-28?10:17??A7\A7.dsp
?????文件????????512??2011-10-28?10:17??A7\A7.dsw
?????文件???????1323??2011-10-28?10:17??A7\A7.h
?????文件??????58368??2011-11-11?11:56??A7\A7.ncb
?????文件??????49664??2011-11-11?11:56??A7\A7.opt
?????文件????????238??2011-11-11?11:56??A7\A7.plg
?????文件???????9103??2011-11-03?22:04??A7\A7.rc
?????文件???????3793??2011-11-11?11:56??A7\ChildView.cpp
?????文件???????1309??2011-11-03?21:29??A7\ChildView.h
?????文件?????114763??2011-11-11?11:55??A7\Debug\A7.exe
?????文件?????255800??2011-11-11?11:55??A7\Debug\A7.ilk
?????文件??????21317??2011-11-03?21:29??A7\Debug\A7.obj
?????文件????5490616??2011-10-28?10:34??A7\Debug\A7.pch
?????文件?????435200??2011-11-11?11:55??A7\Debug\A7.pdb
?????文件???????4840??2011-11-03?22:04??A7\Debug\A7.res
?????文件??????21781??2011-11-11?11:55??A7\Debug\ChildView.obj
?????文件??????20781??2011-11-03?21:29??A7\Debug\MainFrm.obj
?????文件?????105649??2011-10-28?10:34??A7\Debug\StdAfx.obj
?????文件?????214016??2011-11-11?11:56??A7\Debug\vc60.idb
?????文件?????372736??2011-11-11?11:55??A7\Debug\vc60.pdb
?????文件???????3279??2011-10-28?10:17??A7\MainFrm.cpp
?????文件???????1744??2011-10-28?10:17??A7\MainFrm.h
?????文件???????3803??2011-10-28?10:17??A7\ReadMe.txt
?????文件???????1078??2011-10-28?10:17??A7\res\A7.ico
?????文件????????394??2011-10-28?10:17??A7\res\A7.rc2
?????文件????????838??2011-10-28?10:17??A7\res\Toolbar.bmp
?????文件????????589??2011-11-03?22:04??A7\resource.h
............此處省略8個文件信息
- 上一篇:書店租賃系統C++帶SQL數據庫
- 下一篇:小程序 俄羅斯方塊
評論
共有 條評論