Start learning Windows Programming and take note of all your learning notes for later viewing.
The first note, the Hello world! program is relatively simple, on the code:
#include <windows.h>int WINAPI WinMain (hinstance hinstance,hinstance hpreinstance,pstr sizecmdline,int iCmdShow {MessageBox (Null,text ("Hello world!"), TEXT ("MESSAGE"), MB_OK); return 0;}
Here's a quick explanation:
1 Header files:
In a Windows program, include the header file "Windows.h". In addition, there are some common header files, such as: "Winuser.h", "wingui.h".
2 Program Entry:
Windows programs are similar to the entrance to the C program. But from the main () function becomes int WINAPI WinMain (...) This function.
3 Message box functions:
The function of the MessageBox () is to display a message box in the following format:
MessageBox (Null,messageboxtext (content), title (title), MB_OK);
The usage is quite simple, no longer explained.
For ongoing updates, more Windows learning notes, see:
Windows programming Note (1): Hello world!