资源简介
包含简单的几个C++实例,适用于初学者。内含的模板可以做修改变成其他界面。
代码片段和文件信息
// BarDemo.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “BarDemo.h“
#include “MainFrm.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CBarDemoApp
BEGIN_MESSAGE_MAP(CBarDemoApp CWinApp)
//{{AFX_MSG_MAP(CBarDemoApp)
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()
/////////////////////////////////////////////////////////////////////////////
// CBarDemoApp construction
CBarDemoApp::CBarDemoApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CBarDemoApp object
CBarDemoApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CBarDemoApp initialization
BOOL CBarDemoApp::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);
pframe->SetIcon(LoadIcon(IDR_MAINframe)FALSE);
// The one and only window has been initialized so show and update it.
pframe->ShowWindow(SW_SHOW);
pframe->UpdateWindow();
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CBarDemoApp 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)
相关资源
- 20多个常用的Hash算法C++ 实现
- C++仿360新界面源代码
- 遗传、禁忌、模拟退火解背包问题
- C++语言程序设计 郑莉 第四版 课后题
- 蚁群算法C++版
- C++开发精灵对战小游戏
- C++与js相互调用
- 使用Qt做的数据管理系统
- c++测试题aaaa
- c++职工工资管理系统
- 分数计算器C++
- c++职工管理系统链表
- c++密度据类MFC可视化
- 电信计费系统C++
- c++ 最小二乘算法拟合球心 使用Vs200
- 感染EXE文件的VC++源码请谨慎使用.
- vc自动更新源码
- 仓库管理系统 c++
- C++生产者消费者问题
- 基于RFID门禁系统源码 C/C++
- 多国语言Demo源码 c++builder6编写
- C++ IOCP socket完成端口视频教程及源码
- Skins VC6.0程序皮肤
- 自学VC++2010;用ADO方法在ACCESS2010数据
- C++primer5
- vc++判断显示器是否支持多点触摸
- WPS、微软EXCEL通用C++接口表格通用C+
- VS2017 C++ 编写一个通过注册表自定义软
- C++短信猫短信收发封装
-
VC 读写xm
l文件运用
评论
共有 条评论