Windows
Operating system
Providing application programming interface (Application Programming Interface)–API function
All major Windows functions are declared in the Windows.h header file.
Handle — the identification number of the resource.
The message is represented by the MSG structure.
typedef struct tagMSG {
HWND hwnd; //Message belongs to window
UINT message; //Message identifier 1
WPARAM wParam; //Message additional message unsigned 2
LPARAM lParam; //Additional message for message long
DWORD time; //time(int)
POINT pt; //cursor position
} MSG, *PMSG, *LPMSG;
1 Windows will correspond to the message The value is defined as the form of the WM_XXX macro
2 Example: the ascii code of the keyboard pressing the key
Basic win32 program implementation steps:
I: Definition of the WinMain function
II: Create a window
III: Make a message loop
IV: Write a window procedure function
WinMain function
int WINAPI WinMain(
HINSTANCE hInstance, //handle of the current running instance
HINSTANCE hPrevInstance, //handle of the previous instance
LPSTR lpCmdLine, //null-terminated string specifying the command line passed to the application Parameters
int nCmdShow //Window display status
);
1 In Win32 environment, this parameter is always NULL
Create a window specific Step:
I: Design one Window class
II: Register window class
III: Create window
IV: Display and update window
WNDCLASS structure Implement window class design
typedef struct tagWNDCLASS {UINT style; //Window style (you can use &~ to remove unwanted styles)WNDPROC lpfnWndProc; //point to window procedure function ( Callback function) pointerint cbClsExtra; //class window additional memory, generally set to 0int cbWndExtra; //window additional memory, generally 0HINSTANCE hInstance; //instance handleHICON hIcon; //icon handle 1HCURSOR hCursor; //mouse handle 2HBRUSH hbrBackground; //background brush handle 3LPCTSTR lpszMenuName;//menu name, NULL no window, menu Not a windowLPCTSTR lpszClassName; window class name} WNDCLASS, *PWNDCLASS;
Windows7 comes with Netmeeting chat software. In addition to sending text messages and chatting, it
1, press ”Win+R“ key combination to open the run, enter ”gpedit.msc“ then pr
Earlier, there was a message from Windows 10 running Cortana voice assistant. Foreign media Neowin i
According to foreign media reports, a few days ago, Microsoft executive Joe Belfiore released a vide
Win10 SR1 major repair update or push the
The hidden triangle in the lower right corner of the Win7 system taskbar is missing.
[Video] Win10 Preview Build 10056 Latest Video Demo
Win10 Preview 10547: Desktop mode split screen operation is more convenient
Win10 colorful border theme package FlattasDark/Flattastic download
Win10 mobile phone preview version 10240 simulator atlas exposure
Windows7 compressed file to the smallest method
Win10 Enterprise Official Edition Evaluation Version ISO Image Download (32-bit/64-bit) Free 90-day
How to set win10 power-on password?
How to use the basic conditions rollback feature Win10 system
Win7 suddenly pops up Explorer.exe error window how to do
How to enable "prevent media sharing" function in Windows 10
Three steps to easily remove the npf.sys virus in the computer
Win7/win8.1 quickly get win10 upgrade push notification tips
Win7, XP system disable and restore control panel, registry editor, group policy method