#include<afxwin.h>
#include<afx.h>
#define _AFXDLL
class CHelloApp :public CWinApp
{
public:
 virtual BOOL InitInstance();
};
CHelloApp theApp;
class CMainFrame :public CFrameWnd//主窗口类
{
public:
 CMainFrame() {
  Create(NULL, _T("Hello World!"), WS_OVERLAPPEDWINDOW, CRect(0, 0, 400, 300));//
 }
protected:
 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(CMainFrame,CFrameWnd)
 ON_WM_LBUTTONDOWN()
 END_MESSAGE_MAP()
void CMainFrame::OnLButtonDown(UINT nFlags, CPoint point)
{
 MessageBox(_T("welcome to learn visual c++!"),_T( "hello"));
 CFrameWnd::OnLButtonDown(nFlags, point);
}
BOOL CHelloApp::InitInstance()
{
 m_pMainWnd = new CMainFrame();
 m_pMainWnd->ShowWindow(m_nCmdShow);
 m_pMainWnd->UpdateWindow();
 return TRUE;
}

经历了如下error:http://www.vcerror.com/?p=130

注意项目——>属性——>常规中 MFC 设置在动态dll中使用

My first win32 application program的更多相关文章

  1. 【转】VS2012编译出来的程序,在XP上运行,出现“.exe 不是有效的 win32 应用程序” “not a valid win32 application”

    原文网址:http://www.cnblogs.com/Dageking/archive/2013/05/15/3079394.html VS2012编译出来的程序,在XP上运行,出现“.exe 不是 ...

  2. VS2012编译出来的程序,在XP上运行,出现“.exe 不是有效的 win32 应用程序” “not a valid win32 application”

    升级vs2010到vs2012,突然发现build出来的应用程序无法运行,提示“不是有效的 win32 应用程序” or “not a valid win32 application”. 参考CSDN ...

  3. Oracle Bills of Material and Engineering Application Program Interface (APIs)

    In this Document Goal   Solution   1. Sample Notes for BOM APIs   2. Datatypes used in these APIs   ...

  4. npm 安装文件 运行报错 %1 is not a valid Win32 application

    安装了那个模板出了错报这样的错误 “%1 is not a valid Win32 application” 你就除那个模板新安装. 如下例: 运行 npm install -g @angular/c ...

  5. from PyQt4.QtGui import * 提示 ImportError: DLL load failed: %1 is not a valid Win32 application.

    个人用64位电脑安装了64位的PyQt后 from PyQt4.QtGui import * 提示 ImportError: DLL load failed: %1 is not a valid Wi ...

  6. Application binary interface and method of interfacing binary application program to digital computer

    An application binary interface includes linkage structures for interfacing a binary application pro ...

  7. Win32 Console Application、Win32 Application、MFC三者之间的联系和区别

    转自:http://blog.csdn.net/c_base_jin/article/details/52304845 在windows编程中,我们或多或少都听说这三个名称,分别是Win32 Cons ...

  8. 在Win32 Application 环境下实现MFC窗口的创建

    // Win32下MFC.cpp : Defines the entry point for the application.// #include "stdafx.h" clas ...

  9. ionic 报错%1 is not a valid Win32 application

    Fixed the problem by installing python version 3.0 and above will do下载Python3.0或以上版本 python官网传送门:htt ...

随机推荐

  1. ASP.NET中Session的sessionState 4种mode模式

    1. sessionState的4种mode模式 在ASP.NET中Session的sessionState的4中mode模式:Off.InProc.StateServer及SqlServer. 2. ...

  2. Android动画效果之Property Animation进阶(属性动画)

    前言: 前面初步认识了Android的Property Animation(属性动画)Android动画效果之初识Property Animation(属性动画)(三),并且利用属性动画简单了补间动画 ...

  3. 由css reset想到的深入理解margin及em的含义

    由css reset想到的深入理解margin及em的含义 原文地址:http://www.ymblog.net/content_189.html 经常看到这样语句,*{ margin:0px;pad ...

  4. Elasticsearch —— bulk批量导入数据

    在使用Elasticsearch的时候,一定会遇到这种场景--希望批量的导入数据,而不是一条一条的手动导入.那么此时,就一定会需要bulk命令! 更多内容参考我整理的Elk教程 bulk批量导入 批量 ...

  5. 年终巨献 史上最全 ——LINQ to SQL语句

    LINQ to SQL语句(1)之Where 适用场景:实现过滤,查询等功能. 说明:与SQL命令中的Where作用相似,都是起到范围限定也就是过滤作用的,而判断条件就是它后面所接的子句.Where操 ...

  6. Entity Framework 教程——概述

    Entity Framework 基础 本教材将手把手教你使用entity framework,我们将使用entity framework 6.0和visual studio 2012. 以下表格是e ...

  7. bzoj2820--莫比乌斯反演

    题目大意: 给定N, M,求1<=x<=N, 1<=y<=M且gcd(x, y)为质数的(x, y)有多少对. 推导: 设n<=m ans=  = 由于gcd(i,j)= ...

  8. 配置mac百度云同步盘

    1. 选择同步盘在电脑中的位置,该文件夹中的内容与云端保持一致.默认位置/Users/LemonVerbena/百度云同步盘.电脑同步盘的作用与百度云网盘的主页一样,下面可以包括多个同步文件夹. 2. ...

  9. JDK1.8 HashMap 源码分析

    一.概述 以键值对的形式存储,是基于Map接口的实现,可以接收null的键值,不保证有序(比如插入顺序),存储着Entry(hash, key, value, next)对象. 二.示例 public ...

  10. IOS 2D游戏开发框架 SpriteKit-->续(创建用户角色精灵--原创)

    一.主要实现   今天spritekit实现创建玩家角色精灵(SKSpriteNode *), 增加角色精灵的手势操作,这里增加的手势计算方法与objective-c中是不一样的,因为objectiv ...