资源简介
包含简单的几个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)
相关资源
- C++中头文件与源文件的作用详解
- C++多线程网络编程Socket
- VC++ 多线程文件读写操作
- 利用C++哈希表的方法实现电话号码查
- 移木块游戏,可以自编自玩,vc6.0编写
- C++纯文字DOS超小RPG游戏
- MFC数字钟(基于VC6.0)
- 安科瑞智能电能表MODBUS通讯程序 VC6
- LINUX下命令行界面的C语言细胞游戏
- VC++MFC小游戏实例教程(实例)+MFC类库
- VC6LineNumberAddin.dll
- 用VC6.0实现多边形扫描线填充算法
- 连铸温度场计算程序(C++)
- 6自由度机器人运动学正反解C++程序
- Em算法(使用C++编写)
- libstdc++-4.4.7-4.el6.i686.rpm
- VC++实现CMD命令执行与获得返回信息
- 白话C++(全)
- C++标准库第1、2
- 大数类c++大数类
- C++语言编写串口调试助手
- VC助手 VC6.0助手
- c++素数筛选法
- C++ mqtt 用法
- 商品库存管理系统 C++ MFC
- Qt的纽带风格界面实现(Office Ribbon风
- c++ 多功能计算器
- C++17 In Detail
- QT半透明效果界面
- 使用wxWidgets进行跨平台程序开发
评论
共有 条评论