- 博客(25)
- 收藏
- 关注
转载 总结1
API的英文全称(Application Programming Interface),WIN32 API也就是MicrosoftWindows 32位平台的应用程序编程接口。对这个定义的理解,需要追溯到操作系统的发展历史上,当WINDOWS操作系统开始占据主导地位的时候,开发WINDOWS平台下的应用程序成为人们的需要。而在WINDOWS程序设计领域处于发展的初期,WINDOW...
2017-08-03 20:05:00
180
转载 Windows程序代码重构
代码重构:在程序功能实现之后,对代码进行一定规模的整理,使之符合“高内聚、低耦合”的软件设计原则,便于维护和使用。 ①用函数封装消息处理代码——对Windows程序窗口函数中的每一个case程序段进行封装以形成一个消息处理函数,而在case中调用这个函数。 ②利用数组或链表实现消息映射表进一步实现代码的隔离——因为窗口函数switch…case结构实质上实现的就是一个根据消息...
2017-08-03 19:35:00
166
转载 Windows应用程序结构
解决”char []"转换为"LPCWSTR":①利用L" "或_T(" ")②项目——属性——常规——字符集——使用多字节字符集#include<windows.h>#include<tchar.h>LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);int...
2017-08-03 17:03:00
192
转载 事件、消息循环和窗口函数
一、事件与消息凡是需要程序产生相应动作的原因或刺激都是事件(键盘的输入、鼠标的点击)。|Windows定义了一个用以表示信息的结构——消息。typedef struct tagMSG{ HWND hwnd;//产生消息的窗口句柄(事件的产生地点) <strong>UINT message;//消息的标识码(事件种类)<...
2017-08-02 18:18:00
276
转载 窗口的创建和显示
一个Windows应用程序主窗口的创建主要需要以下过程:使用WNDCLASS结构变量定制符合程序需要的窗口——①窗口的创建将定制的窗口向系统注册——②窗口类的注册以窗口类注册名为参数,调用创建窗口的API函数在内存中创建窗口——③窗口的创建调用API函数将窗口显示到显示器屏幕上——④窗口的显示①窗口的创建WNDCLASS wc;wc.style...
2017-08-02 10:52:00
148
转载 Windows的数据类型
一、对c基本数据类型定义了便于识别的别名:1 typedef unsigned long DWORD;2 typedef int BOOL;3 typedef unsigned char BYTE;4 typedef unsigned short WORD;5 typedef float FLOAT;6 ...
2017-08-02 10:18:00
167
转载 线性表
结点逻辑关系为线性的结构——线性表现实生活中的线性关系:①排队中的一一对应关系②(Caesar Code)字母表的表示方法③电话号码表的结构(姓名、电话、身份证号、地址)线性表的定义:一个线性表是n(n>=0)个同类型结点的有限序列。线性表的逻辑结构:线性表的存储结构:顺序表:将线性表中的元素依次放在一个连续的存储空间中,这样的线性表叫顺...
2017-07-27 09:48:00
183
转载 MFC控件篇
为了实现应用程序与用户之间的交互,Windows允许在应用程序的界面放置一些图形部件(控件),用来处理用户事件,并使应用程序做出相应的反应。在大一结束时的MFC课程设计阶段,笔者正是大量堆砌了不少控件,勉强取得“中等”的评价,现在想想…,“哎”“呀”!总的来说,控件是应用程序窗口的子窗口。MFC的控件类封装了Windows的标准控件和通用控件,都派生于类CWind。标准控...
2017-07-22 20:02:00
114
转载 TOJ3067: 求最大值II
#include<iostream>#include<algorithm>using namespace std;int main(){ int n; while (cin >> n) { while (n--) { int a, b;...
2017-07-22 18:54:00
607
转载 TOJ1301: 统计同成绩学生人数
#include<iostream>using namespace std;int main(){ int N; int a[1000]; int score; while (cin >> N,N!=0) { int num = 0; for (int i...
2017-07-22 18:47:00
518
转载 TOJ1056: 英文金曲大赛
Time Limit Exceeded: 1 #include<iostream> 2 #include<string> 3 #include<iomanip> 4 using namespace std; 5 6 int main() 7 { 8 string s; 9 double a[...
2017-07-22 18:31:00
366
转载 TOJ2780: 数数小木块
1 #include<iostream> 2 using namespace std; 3 4 int fun(int n) 5 { 6 int sum = 0; 7 for (;n >= 1;n--) 8 { 9 sum += (n*n+n) / 2;10 }11 ...
2017-07-21 18:59:00
668
转载 TOJ1164: 最大公因子
1 #include<iostream> 2 #include<algorithm> 3 using namespace std; 4 5 int fun(int m, int n) 6 { 7 int max_commondivisor; 8 int m1 = max(m, n), n1 = min(m,n...
2017-07-21 18:30:00
408
转载 TOJ1007
#include<iostream>using namespace std;int fun(int N){ int arr[100]; arr[0] = 1;arr[1] = 1; for (int i = 2;i <= 40;i++) { arr[i] = arr[i - 1] + ar...
2017-07-21 18:02:00
87
转载 TOJ2951
1 #include<iostream> 2 using namespace std; 3 int main() 4 { 5 int T; 6 cin >> T; 7 while (T--) 8 { 9 int N,a[10000];10 cin >...
2017-07-12 23:03:00
80
转载 TOJ1420
1 #include<iostream> 2 #include<string> 3 using namespace std; 4 int main() 5 { 6 string s; 7 int N; 8 int i; 9 while (cin >> N)10 {...
2017-07-11 18:36:00
132
转载 TOJ1392
1 #include<iostream> 2 using namespace std; 3 4 int main() 5 { 6 int M; 7 while(cin>>M) 8 { 9 double a,b,c;10 while(M--)11 ...
2017-07-11 17:38:00
95
转载 TOJ3064_判断闰年
1 #include<iostream> 2 using namespace std; 3 4 int main() 5 { 6 int n; 7 int y; 8 while(cin>>n) 9 {10 while(n--)11 {12 ...
2017-07-11 17:25:00
507
转载 TOJ1201
#include<iostream>#include<iomanip>#include<cmath>using namespace std;int main(){ double a, b, c; double s; while (scanf("%lf %lf %lf",&a,&b...
2017-07-09 20:53:00
75
转载 TOJ1373_多项式规律
#include<iostream>#include<iomanip>using namespace std;double seq(int n){ double s = 0.0; for (int i = 1;i <= n;i++) { if (i % 2 == 0) ...
2017-07-08 23:08:00
156
转载 Windows程序基础——Windows应用程序的基本概念
Windows是一种应用于微型计算机的操作系统,它为应用程序提供了一个多任务运行平台,它为应用程序提供了一致性的图形化窗口和菜单。Windows应用程序都具有图形界面并由事件来驱动其运行。图形用户界面(GUI)——与键盘和鼠标相配合区别:普通C语言程序:主函数(系统加载)及主函数调用的函数;Windows程序主函数(系统加载)及事件处理函数(系统调用);一个Windo...
2017-07-08 16:25:00
329
转载 Why to learn MFC?
桌面系统程序开发:MFC Java .NETMFC———Windows 应用程序框架可视化windows 开发工具:visual basic\delphi\c++ builder MFC一、1.Windows 应用程序的特点:图形界面、多任务、事件驱动2.数据和函数的组织方法|结构:资源、动态链接库|接受|分派消息的主程序模块和处理消息的消息相应程序模块...
2017-07-08 12:08:00
99
转载 TOJ1062
#include<iostream>using namespace std;int main(){ int n; while (cin >> n, n != 0) { int m=1; for (int i = 1;i < n;++i) { ...
2017-07-07 22:39:00
152
转载 TOJ1369
c++输出的精度表示: 头文件:#include <iomanip> cout<<setionsflags(ios::fixed)<<setprecision(2)<<N<<endl; 1 #include<iostream> 2 #include<cmath> 3 #in...
2017-07-07 21:08:00
85
转载 TOJ1003
1 #include<iostream> 2 using namespace std; 3 4 int main() 5 { 6 int n, m; 7 while (cin >> n >> m,n!=0,m!=0) 8 { 9 int n_dove, n_rab...
2017-07-06 18:15:00
137
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人