#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. 《JavaScript高级程序设计》读书笔记 2

    1,动态模型模式 function Person (name,age,job) { this.name=name; this.age=age; this.job=job; if(typeof this ...

  2. 梯度提升树(GBDT)原理小结

    在集成学习之Adaboost算法原理小结中,我们对Boosting家族的Adaboost算法做了总结,本文就对Boosting家族中另一个重要的算法梯度提升树(Gradient Boosting De ...

  3. 设计模式(十三):从“FQ”中来认识代理模式(Proxy Pattern)

    我们知道Google早就被墙了,所以FQ才能访问Google呢,这个“FQ”的过程就是一个代理的过程.“代理模式”在之前的博客中不止一次的提及过,之前的委托回调就是代理模式的具体应用.今天我们就从“F ...

  4. 【NLP】基于机器学习角度谈谈CRF(三)

    基于机器学习角度谈谈CRF 作者:白宁超 2016年8月3日08:39:14 [摘要]:条件随机场用于序列标注,数据分割等自然语言处理中,表现出很好的效果.在中文分词.中文人名识别和歧义消解等任务中都 ...

  5. 结合阿里云服务器,使用FTP上传和下载文件,出现的问题和解决方案

    一.FTP出现的问题 二.在网上找的方案 如果使用FileZilla默认设置连接ftp服务器的话可能会报以下错误: 错误: 无法建立数据连接:ECONNREFUSED - Connection ref ...

  6. 自己动手,实现一种类似List<T>的数据结构(一)

    前言 上一篇文章<Unity3D中常用的数据结构总结与分析>简单总结了一下小匹夫工作中经常遇到的一些数据结构.不过小匹夫一直有种观点,就是光说的热闹实际啥也不做真的没啥意思.光说不练假把式 ...

  7. Scrapy:为spider指定pipeline

    当一个Scrapy项目中有多个spider去爬取多个网站时,往往需要多个pipeline,这时就需要为每个spider指定其对应的pipeline. [通过程序来运行spider],可以通过修改配置s ...

  8. .NET正则表达式基础入门

    这是我第一次写的博客,个人觉得十分不容易.以前看别人写的博客文字十分流畅,到自己来写却发现十分困难,还是感谢那些为技术而奉献自己力量的人吧. 本教程编写之前,博主阅读了<正则指引>这本入门 ...

  9. 【无私分享:ASP.NET CORE 项目实战(第二章)】添加EF上下文对象,添加接口、实现类以及无处不在的依赖注入(DI)

    目录索引 [无私分享:ASP.NET CORE 项目实战]目录索引 简介 上一章,我们介绍了安装和新建控制器.视图,这一章我们来创建个数据模型,并且添加接口和实现类. 添加EF上下文对象 按照我们以前 ...

  10. maven之一:maven安装和eclipse集成

    maven作为一个项目构建工具,在开发的过程中很受欢迎,可以帮助管理项目中的bao依赖问题,另外它的很多功能都极大的减少了开发的难度,下面来介绍maven的安装及与eclipse的集成. maven的 ...