当前位置:网站首页>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;
}
边栏推荐
- Safety margin of mass consumption
- Opencv 以指定格式保存图片
- How to correctly calculate the CPU utilization of kubernetes container
- [noip2001 popularization group] the problem of maximum common divisor and minimum common multiple
- URDF 语法详解
- Usage of arguments.callee
- Anti electronic ink screen st7302
- 了解预加载和懒加载、学会缓动动画
- YOLOv3: An Incremental Improvement
- How to reinstall win7 system?
猜你喜欢
![[detailed explanation of key and difficult points of document operation]](/img/f5/99c8cdf09763c66ab5d56cc96e50c7.png)
[detailed explanation of key and difficult points of document operation]

Win11大小写提示图标怎么关闭?Win11大小写提示图标的关闭方法
![[sql] case expression](/img/05/1bbb0b5099443f7ce5f5511703477e.png)
[sql] case expression

Arthas download and startup

Unknown-Aware Object Detection:Learning What You Don’t Know from Videos in the Wild(CVPR 2022)

Opencv 在图像上进行标注(画框+写字)

c语言分层理解(c语言函数)

Win11 method of changing disk drive letter
![[SQL] 自连接的用法](/img/92/92474343b4b4e6ea60453b4799cb55.jpg)
[SQL] 自连接的用法

URDF 语法详解
随机推荐
Opencv报错:(parameter or structure field))Unrecognized or unsupported array type in functon ‘cvGetMat‘
Hello World driver (II) - primary version
[tensorflow & pytorch] image data enhancement API
在混合云中管理数据库:八个关键注意事项
LeetCode·
Service gateway (zuul)
ByteDance (Tiktok) software test monthly salary 23K post, technical two-sided interview questions are newly released
STM32——串口学习笔记(一个字节、16位数据、字符串、数组)
What is the difference between heap memory and stack memory?
Canvas - drawing pictures - dynamic drawing production
Arthas' dynamic load class (retransform)
Dataframe sorting: datetime format splitting; Delete a specific line; Group integration.
Win11 method of changing disk drive letter
Win11麦克风权限的开启方法
Unknown-Aware Object Detection:Learning What You Don’t Know from Videos in the Wild(CVPR 2022)
How to design test cases according to the requirements of login testing?
Machine learning foundation plan 0-2: what is machine learning? What does it have to do with AI?
Usage of '...' in golang
Type the URL to the web page display. What happened during this period?
What's good for starting a business with 10000 yuan? Is we media OK?