回顾下WinMain
我们在学习标准C++的时候,都知道每个应用程序运行时都会先进入入口点函数main,而当从main函数跳出时程序就结束了。在Windows编程里面,也是一样的,只是我们的入口点函数不叫main,叫WinMain,这个函数不同于main,我们不能乱来,它的定义必须与声明保持一致。
1
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
// MyWinMain.cpp : Defines the entry point for the application.
// #include "stdafx.h" // Global Variables: // Forward declarations of functions included in this code module: int APIENTRY _tWinMain( HINSTANCE hInstance, // TODO: Place code here. // Initialize global strings // Perform application initialization: hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_MYWINMAIN)); // Main message loop: return (int) msg.wParam; // wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; return RegisterClassEx(&wcex); // hInst = hInstance; // Store instance handle in our global variable hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, if (!hWnd) ShowWindow(hWnd, nCmdShow); return TRUE; // switch (message) // Message handler for about box. case WM_COMMAND: |
最新文章
- Windows 10下使用U盘安装Ubuntu双系统
- python异常处理
- overflow:hidden清楚浮动的影响
- C# this和base的使用
- MAC使用CocoaPods
- judge remote file exist
- 在线富文本编辑器FckEditor配置(.Net Framework 3.5)
- openId 列表
- 9款基于CSS3 Transitions实现的鼠标经过图标悬停特效
- Spring服务定制
- 苹果手机连接Wifi认证机制
- Python抓取天气信息并存储原来这么简单
- WebBench压力测试工具(详细源码注释+分析)
- 剑指offer编程题Java实现——面试题9斐波那契数列
- Execl矩阵如何转化成Pajek的net文件
- It was not possible to find any compatible framework version
- Android An unexpected exception occurred while creating a change object. see the error log for more details
- HDU 2030 汉字统计
- [转]Intellij idea创建javaWeb以及Servlet简单实现
- docker:搭建lamp应用
热门文章
- CocoaPods安装小步骤
- 基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:2.搭建环境-2.9.	配置用户等效性(可选项)
- 查看MySQL数据库大小
- IStorage
- [Javascript] Intercept property access with Javascript Proxy
- 各大网站css初始化代码【转】
- Java 多线程之 synchronized 和 volatile 的比較
- C#秘密武器之反射——替换反射
- 一个好用的短连接服务,mark备用
- 通过浏览器查看nginx服务器状态配置方法