当前位置:网站首页>ELS message loop
ELS message loop
2022-07-26 03:15:00 【joker_ 0030】
#include<Windows.h>
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPreInstance,LPSTR ipCmdLine,int nCmdShow)
{
// Initialize window class .
WNDCLASSEX db;
HWND hWnd;
MSG msg;// Structural variable .
db.cbClsExtra = 0;
db.cbSize = sizeof(WNDCLASSEX);
db.cbWndExtra = 0;
db.hbrBackground = (HBRUSH)COLOR_WINDOW;
db.hCursor = NULL;
db.hIcon = NULL;
db.hIconSm = NULL;
db.hInstance = hInstance;
db.lpfnWndProc = NULL;
db.lpszClassName = "els";
db.lpszMenuName = NULL;
db.style = CS_HREDRAW | CS_VREDRAW;
if(0==RegisterClassEx(&db));
{
int a = GetLastError();
return 0;
}
// create a window .hWnd Window handle Failure to return NULL.
hWnd=CreateWindowEx(WS_EX_TOPMOST,"els","elsfangkuai",WS_OVERLAPPEDWINDOW,100,100,100,100,NULL,NULL,hInstance,NULL);
if (NULL == hWnd)// Window handle . Unique identification of the window .
{
return 0;
}
// Display window
ShowWindow(hWnd, nCmdShow);
// Message loop . queue .
// Return value : Failure to return NULL.
// Parameters 1: Point to MSG Pointer to the message structure .
// Parameters 2: Specify the handle of the window , Use to process the message of this window .NULL Represents all the information of the current real column .
// Parameters 3,4: Set the range of messages to be processed ,0,0 All information .
GetMessage(&msg, NULL, 0, 0)//NULL He Fei NULL The difference between .
{
// This function converts virtual key messages into character messages . Character messages are sent to the call ready message queue .
// Return value : If the message is converted , Returns a nonzero value .
// Parameters : Point to MSG Pointer to the message structure .
TranslateMessage(&msg);// Translate the news .
// This function distributes a message to the window program .
// Return value : The return value is the value returned by the window program . Although the meaning of the return value depends on the information being dispatched , But the return value is usually ignored .
// Parameters : Point to MSG Pointer to the message structure .
DispatchMessage(&msg);// Distribution message . Standard message Command message Notification message Custom message .
}
return 0;
}
边栏推荐
- File operation (I) -- File introduction and file opening and closing methods
- What are the methods of array sorting in JS
- Understand preloading and lazy loading, and learn slow animation
- How to reinstall win7 system?
- Hcip day 8 notes sorting (OSPF routing control, Appendix E, anti ring, shortest path calculation, republication))
- Unity quickly builds urban scenes
- [Yuri crack man] brings you easy understanding - deep copy and shallow copy
- QT notes - Q_ Q and Q_ D learning
- Course notes of single chip microcomputer principle and interface technology for migrant workers majoring in electronic information engineering
- 爆肝出了4W字的Redis面试教程
猜你喜欢

Win11 method of changing disk drive letter

Use eventlog analyzer for log forensics analysis

Swin Transformer【Backbone】

Leetcode · 83 biweekly match · 6128. best poker hand · simulation

LeetCode·每日一题·919.完全二叉树插入器·层次遍历·BFS

Swin Transformer【Backbone】

离线数据仓库从0到1-阶段二软件安装

Win11更改磁盘驱动器号的方法

Installation and operation of orb-slam2 under ROS

How to install with USB flash disk?
随机推荐
Is the galaxy VIP account opened by qiniu safe?
[sql] usage of self connection
在混合云中管理数据库:八个关键注意事项
canvas——绘制曲线——挂钟,饼图,五角星
Unity快速搭建城市场景
中国信通院陈屹力:降本增效是企业云原生应用的最大价值
万维网、因特网和互联网的区别
实现一个方法,找出数组中的第k大和第m大的数字相加之和
Istio三之VirtualService、Gateway、DestinationRule配置使用
Multithreaded programming
STM32 - PWM learning notes
Opencv annotates the image (picture frame + writing)
Canvas -- drawing of rectangle -- making of histogram
URDF 语法详解
els 窗口设置、WM_CREATE、WM_PAINT
班级里有一群学生考试结果出来了,考了语文和数学两门,请筛选出总分是第一的同学
CMD CPM command summary
Understand preloading and lazy loading, and learn slow animation
Remember SQL optimization once
Why did Mr. Cao, a productionist in the field of high-end tea, choose Ruifeng L6 max?