int WINAPI WinMain (HINSTANCE hThisInstance,
HINSTANCE hPrevInstance,
LPSTR lpszArgument,
int nCmdShow)
{
HWND hwnd; /* This is the handle for our window */
MSG messages; /* Here messages to the application are saved */
WNDCLASSEX wincl; /* Data structure for the windowclass */
HWND 是唯一的 ID,在创建后可以在该 ID 下访问该窗口(及其信息)。你可以将其视为名称 id,但句柄通常是指技术上指向指针(结构)的指针。
消息结构充当正在运行的 winapiprogramm 和 Windows 操作系统之间的中介。操作系统负责处理来自该程序的输入并将通知传回该程序。这是在这个消息的帮助下完成的......它与消息循环紧密耦合。
https://learn.microsoft.com/en-us/windows/win32/learnwin32/window-messages