当前位置:网站首页>els 初始化窗口类
els 初始化窗口类
2022-07-26 03:10:00 【joker_0030】
#include<Windows.h>
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPreInstance,LPSTR ipCmdLine,int nCmdShow)
{
//初始化窗口类。
WNDCLASSEX db;//WNDCLASS的扩展。
db.cbClsExtra = 0;//紧跟在窗口类尾部的一块额外的空间,不用设为0。
db.cbSize = sizeof(WNDCLASSEX);//结构体大小,sizeof(WNDCLASSEX)。
db.cbWndExtra = 0;//紧跟在窗口实列尾部的一块额外的空间,不用设为0。
db.hbrBackground = (HBRUSH)COLOR_WINDOW;//窗口类的背景刷,为背景刷句柄,也可以为系统颜色值。
db.hCursor = NULL;//光标风格,不用设为NULL,TODO,测试。
db.hIcon = NULL;//图标,不用设为NULL,TODO,测试。 Loadlcon(NULL,IDI_APPLICATION)。
db.hIconSm = NULL;//小图标,不用设为NULL,TODO,测试。
db.hInstance = hInstance;//当前函数实列句柄,hinstance。
db.lpfnWndProc = ;//回调函数地址。WinProc。
db.lpszClassName = "elsfang_kuai";//名字不要重复。//"NumRain",窗口的标识,给系统看的。
db.lpszMenuName = NULL;//菜单的名字,无NULL,同目录资源的名字一样。如果使用整型id表示菜单,可以用MAKEINTRESOURCE定义一个宏。
db.style = CS_HREDRAW | CS_VREDRAW;//窗口类的样式,它的值可以是窗口样式值的任意组合。CS_HREDRAW|CS_VREDRAW,这是个垂直刷新和水平刷新,窗口尺寸改变,重画活动区域。
//12个成员不可写多也不可写少,否则窗口都会创建失败。
//警告C4133“ = ”: 从“char[13]”到“LPCWSTR”的类型不兼容。解决方案将属性->高级->字符集(从Unicode字符集改为多字节字符集)。
return 0;
}
边栏推荐
- ES6 set and map
- An article allows you to understand the relevance of cloud native containerization
- LeetCode·
- STM32 - DMA notes
- Win11 method of changing disk drive letter
- The source of everything, the choice of code branching strategy
- "Xiao Deng's view" the value brought by Siem to enterprises (II)
- Usage of arguments.callee
- Jenkins' study notes are detailed
- Opencv 以指定格式保存图片
猜你喜欢

VR panoramic shooting and production of business center helps businesses effectively attract people

Win11 method of changing disk drive letter

【C进阶】深入探索数据的存储(深度剖析+典例解读)

Keyboardtraffic, a tool developed by myself to solve CTF USB keyboard traffic

STM32——PWM学习笔记

STM32 - PWM learning notes

Arthas download and startup
![[SQL] 自连接的用法](/img/92/92474343b4b4e6ea60453b4799cb55.jpg)
[SQL] 自连接的用法

How to close the case prompt icon of win11? Closing method of win11 case prompt Icon

Influence of middle tap change on ZVS oscillation circuit
随机推荐
Pit trodden when copying list: shallow copy and deep copy
canvas——绘制曲线——挂钟,饼图,五角星
Have you ever seen this kind of dynamic programming -- the stock problem of state machine dynamic programming (Part 1)
Influence of middle tap change on ZVS oscillation circuit
Usage of fuser and lsof
Canvas - drawing pictures - dynamic drawing production
Application of shift distance and hypothesis
JSD-2204-酷鲨商城(管理商品模块)-Day02
规范自己debug的流程
Keyboardtraffic, a tool developed by myself to solve CTF USB keyboard traffic
STM - exti external interrupt learning notes
What are the methods of array sorting in JS
Type the URL to the web page display. What happened during this period?
Cloud native guide what is cloud native infrastructure
(9) Attribute introspection
LeetCode·每日一题·919.完全二叉树插入器·层次遍历·BFS
[NOIP2001 普及组] 最大公约数和最小公倍数问题
Personally test five efficient and practical ways to get rid of orders, and quickly collect them to help you quickly find high-quality objects!
Nahamcon CTF 2022 babyrev reverse analysis
Opencv 在图像上进行标注(画框+写字)