Home > Back-end >  I want to know what the framework is used for?
I want to know what the framework is used for?

Time:10-01

 int WINAPI WinMain (HINSTANCE HINSTANCE, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
Modifed WNDCLASSEX wc.
The HWND HWND;
MSG MSG.

Memset (& amp; Wc, 0, sizeof (wc));
Wc. CbSize=sizeof (modifed WNDCLASSEX);
Wc. LpfnWndProc=;/* insert window procedure function here */
The wc. The hInstance=hInstance;
Wc. HCursor=LoadCursor (NULL, IDC_ARROW);
Wc. HbrBackground=(HBRUSH) (COLOR_WINDOW + 1);
Wc. LpszClassName="WindowClass";
Wc. HIcon=LoadIcon (NULL, IDI_APPLICATION);/* use "A" as icon name when you want to use the project icon */
Wc. HIconSm=LoadIcon (NULL, IDI_APPLICATION); As above *//*

if(! RegisterClassEx (& amp; Wc)) {
MessageBox (NULL, "Windows Registration Failed!" , "Error!" , MB_ICONEXCLAMATION | MB_OK);
return 0;
}

HWND=CreateWindowEx (WS_EX_CLIENTEDGE, "WindowClass", "the Caption", WS_VISIBLE | WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 640480, NULL, NULL, hInstance, NULL);
If (HWND==NULL) {
MessageBox (NULL, "Window Creation Failed!" , "Error!" , MB_ICONEXCLAMATION | MB_OK);
return 0;
}

While (GetMessage (& amp; Msg, NULL, 0, 0) & gt; 0 {
TranslateMessage (& amp; Msg);
DispatchMessage (& amp; Msg);
}
Return Msg. WParam;
}

CodePudding user response:

Standard of the win32 GUI program
But missed the message callback handler

CodePudding user response:

To find a book called Windows programming a look, there are electronic version
  • Related