Windows programming Note (1): Hello world!

Source: Internet
Author: User

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.