#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. Redis系列之key操作命令与Redis中的事务详解(六)

    序言 本篇主要目的有二: 1.展示所有数据类型中key的所有操作命令,以供大家学习,查阅,更深入的挖掘redis潜力. 2.掌握redis中的事务,让你的数据完整性一致性拥有更优的保障. redis命 ...

  2. 自建Ngrok服务与使用方法

    ngrok 是一个反向代理,通过在公共的端点和本地运行的 Web 服务器之间建立一个安全的通道.ngrok 可捕获和分析所有通道上的流量,便于后期分析和重放.可以被使用来进行微信借口的本地调试.在ng ...

  3. clipChildren和clipToPadding

    clipChildren 和 clipToPadding clipChild 用于定义子控件是否在父控件边界内进行绘制.clipChild 默认为 true.也就是不允许进行扩展绘制. clipToP ...

  4. 通过一个实例理解 offsetLeft,offsetTop; offsetWidth , offsetHeight

    obj.offsetTop 指 obj 相对于版面或由 offsetParent 属性指定的父坐标的计算上侧位置,整型 obj.offsetLeft 指 obj 相对于版面或由 offsetParen ...

  5. 2016网易春招Java在线笔试回忆录

    别看是在线笔试,但是非常严格,全称窗口不得最小化和关闭,转移,全称需要打开摄像头监控,使用草稿纸需要摄像头对准……反正2个小时,题量在那儿摆着,有作弊的功夫不如好好做做最后的编程题呢……网易不让泄漏原 ...

  6. 巡检脚本OS+Oracle

    巡检脚本 主机巡检脚本:OSWatcher.sh Oracle巡检脚本:ORAWatcher.sh 脚本使用方法 1.建立脚本放置目录 # mkdir /var/collect 2.把脚本ORAWat ...

  7. Oracle 11.2.0.4单实例打PSU,OJVM PSU补丁快速参考

    写在前面: 1.Oracel打每个补丁的操作有时存在差异,所以不管多熟悉,都应该在打任何补丁之前阅读新补丁中附带的readme. 2.Oracle每季度都会更新一个最新的PSU,本文最新指的是当前最新 ...

  8. ASP.NET Core 中文文档 第二章 指南(4.2)添加 Controller

    原文:Adding a controller 翻译:娄宇(Lyrics) 校对:刘怡(AlexLEWIS).何镇汐.夏申斌.孟帅洋(书缘) Model-View-Controller (MVC) 架构 ...

  9. ASP.NET Core 中文文档 第二章 指南 (09) 使用 Swagger 生成 ASP.NET Web API 在线帮助测试文档

    原文:ASP.NET Web API Help Pages using Swagger 作者:Shayne Boyer 翻译:谢炀(kiler) 翻译:许登洋(Seay) 对于开发人员来说,构建一个消 ...

  10. 微服务(Microservices)—Martin Fowler【翻译】

    本文转载自:http://www.cnblogs.com/liuning8023/p/4493156.html -------------------------------------------- ...