当前位置:网站首页>ELS initialization window class
ELS initialization window class
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;//WNDCLASS An extension of .
db.cbClsExtra = 0;// An extra space immediately following the end of the window class , Do not set to 0.
db.cbSize = sizeof(WNDCLASSEX);// Structure size ,sizeof(WNDCLASSEX).
db.cbWndExtra = 0;// An extra space immediately following the end of the window's real column , Do not set to 0.
db.hbrBackground = (HBRUSH)COLOR_WINDOW;// Background brush of window class , Brush handle for background , It can also be the system color value .
db.hCursor = NULL;// Cursor style , Do not set to NULL,TODO, test .
db.hIcon = NULL;// Icon , Do not set to NULL,TODO, test . Loadlcon(NULL,IDI_APPLICATION).
db.hIconSm = NULL;// Small icons , Do not set to NULL,TODO, test .
db.hInstance = hInstance;// Current function real column handle ,hinstance.
db.lpfnWndProc = ;// Callback function address .WinProc.
db.lpszClassName = "elsfang_kuai";// Don't repeat the name .//"NumRain", The identification of the window , For the system .
db.lpszMenuName = NULL;// The name of the menu , nothing NULL, The name of the directory resource is the same . If you use integer id Show menu , It can be used MAKEINTRESOURCE Define a macro .
db.style = CS_HREDRAW | CS_VREDRAW;// Style of window class , Its value can be any combination of window style values .CS_HREDRAW|CS_VREDRAW, This is a vertical refresh and horizontal refresh , Window size changes , Redraw active area .
//12 Members cannot write more or less , Otherwise, the creation of windows will fail .
// Warning C4133“ = ”: from “char[13]” To “LPCWSTR” Incompatible type for . The solution will attribute -> senior -> Character set ( from Unicode Change character set to multi byte character set ).
return 0;
}
边栏推荐
- 【尤里复裂人】带你轻松理解——深拷贝和浅拷贝
- STM32——串口学习笔记(一个字节、16位数据、字符串、数组)
- Canvas - drawing pictures - dynamic drawing production
- Opencv 以指定格式保存图片
- Unity快速搭建城市场景
- STM——EXTI外部中断学习笔记
- 爆肝出了4W字的Redis面试教程
- Looking at the next step of BAIC bluevale through the 8billion fund-raising, product upgrading and building core capabilities are the key words
- JVM memory model parsing
- 小测(一)
猜你喜欢
随机推荐
Multithreaded programming
图解LeetCode——5. 最长回文子串(难度:中等)
JVM内存模型解析
Installation and operation of orb-slam2 under ROS
离线数据仓库从0到1-阶段一资源购买配置
How to correctly calculate the CPU utilization of kubernetes container
Understand preloading and lazy loading, and learn slow animation
Win11 hide input method status bar method
Unity quickly builds urban scenes
STM - exti external interrupt learning notes
QT笔记——Q_Q 和Q_D 学习
Hcip day 8 notes sorting (OSPF routing control, Appendix E, anti ring, shortest path calculation, republication))
QT notes - temporary floating window
复制列表时踩过的坑:浅拷贝与深拷贝
Leetcode · daily question · sword finger offer | | 115. reconstruction sequence · topological sorting
一切的源头,代码分支策略的选择
Teach you to rely on management hand in hand
小测(一)
JVM memory model parsing
canvas——绘制文本——饼图的修改









