使用MFC绘制中国地图


编写一个程序使得其可以画出中国地图,并且能够实现放大缩小,移动等功能,点击你所在省份跳出省份简介。在MFC中添加音乐,对话框中添加背景图片等
资源截图
代码片段和文件信息
// 1.cpp : Defines the class behaviors for the application.
//

#include “stdafx.h“
#include “1.h“

#include “MainFrm.h“
#include “1Doc.h“
#include “1View.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMy1App

BEGIN_MESSAGE_MAP(CMy1App CWinApp)
//{{AFX_MSG_MAP(CMy1App)
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
// Standard file based document commands
ON_COMMAND(ID_FILE_NEW CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN CWinApp::OnFileOpen)
// Standard print setup command
ON_COMMAND(ID_FILE_PRINT_SETUP CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMy1App construction

CMy1App::CMy1App()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CMy1App object

CMy1App theApp;

/////////////////////////////////////////////////////////////////////////////
// CMy1App initialization

BOOL CMy1App::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“));

LoadStdProfileSettings();  // Load standard INI file options (including MRU)

// Register the application‘s document templates.  Document templates
//  serve as the connection between documents frame windows and views.

CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINframe
RUNTIME_CLASS(CMy1Doc)
RUNTIME_CLASS(CMainframe)       // main SDI frame window
RUNTIME_CLASS(CMy1View));
AddDocTemplate(pDocTemplate);

// Parse command line for standard shell commands DDE file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);

// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;

// The one and only window has been initialized so show and update it.
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();

return TRUE;
}


/////////////////////////////////////////////////

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     842656  2010-06-02 13:23  21508105_地图21508105宋涵_地图1.aps

     文件       3219  2010-06-02 13:25  21508105_地图21508105宋涵_地图1.clw

     文件       4147  2010-04-21 21:04  21508105_地图21508105宋涵_地图1.cpp

     文件       4656  2010-06-01 19:11  21508105_地图21508105宋涵_地图1.dsp

     文件        508  2010-04-21 21:04  21508105_地图21508105宋涵_地图1.dsw

     文件       1311  2010-04-21 21:04  21508105_地图21508105宋涵_地图1.h

     文件     238592  2010-06-02 13:25  21508105_地图21508105宋涵_地图1.ncb

     文件     104208  2010-06-02 13:23  21508105_地图21508105宋涵_地图1.plg

     文件      17282  2010-06-01 20:46  21508105_地图21508105宋涵_地图1.rc

     文件    3555976  2010-06-01 20:40  21508105_地图21508105宋涵_地图1.wav

     文件       1676  2010-04-21 21:04  21508105_地图21508105宋涵_地图1Doc.cpp

     文件       1434  2010-04-21 21:04  21508105_地图21508105宋涵_地图1Doc.h

     文件      40904  2010-06-02 13:22  21508105_地图21508105宋涵_地图1View.cpp

     文件       2591  2010-05-31 22:10  21508105_地图21508105宋涵_地图1View.h

     文件       2631  2010-06-01 20:41  21508105_地图21508105宋涵_地图JiangSu.cpp

     文件       1364  2010-06-01 19:05  21508105_地图21508105宋涵_地图JiangSu.h

     文件       2745  2010-05-31 19:56  21508105_地图21508105宋涵_地图MainFrm.cpp

     文件       1466  2010-05-30 20:41  21508105_地图21508105宋涵_地图MainFrm.h

     文件       4205  2010-04-21 21:04  21508105_地图21508105宋涵_地图ReadMe.txt

     文件       1191  2010-06-01 19:06  21508105_地图21508105宋涵_地图
esource.h

     文件       1192  2004-08-17 20:00  21508105_地图21508105宋涵_地图start.wav

     文件        203  2010-04-21 21:04  21508105_地图21508105宋涵_地图StdAfx.cpp

     文件       1054  2010-04-21 21:04  21508105_地图21508105宋涵_地图StdAfx.h

     文件       1078  2010-04-21 21:04  21508105_地图21508105宋涵_地图
es1.ico

     文件        393  2010-04-21 21:04  21508105_地图21508105宋涵_地图
es1.rc2

     文件       1078  2010-04-21 21:04  21508105_地图21508105宋涵_地图
es1Doc.ico

     文件     810056  2010-06-01 19:06  21508105_地图21508105宋涵_地图
eslarge_g3hK_3436e132095.bmp

     文件       1678  2010-06-01 20:45  21508105_地图21508105宋涵_地图
esToolbar.bmp

     文件    1151043  2010-06-02 13:23  21508105_地图21508105宋涵_地图Debug1.exe

     文件     396296  2010-06-02 13:23  21508105_地图21508105宋涵_地图Debug1.ilk

............此处省略21个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)