C ++ MessageBox messageboxa messageboxw afxmessagebox

Source: Internet
Author: User

From: http://blog.sina.com.cn/s/blog_5059be880100whu3.html

C-language MessageBox
Messageboxa (
   Hwnd,
   Lpcstr lptext,
   Maid,
   Uint utype );

Messageboxw (
   Hwnd,
   Lpcwstr lptext,
   Maid,
   Uint utype );

# Ifdef Unicode
# Define MessageBoxMessageboxw
# Else
# Define MessageBoxMessageboxa
# Endif

Example: MessageBox (null, text ("Hello world! "), Text (" hello "), mb_yesno | mb_iconexclamation );

The buttons have the following macros:
# Define mb_ OK                     0x00000000l
# Define mb_okcancel               0x00000001l
# Define mb_abortretryignore       0x00000002l
# Define mb_yesnocancel            0x00000003l
# Define mb_yesno                  0x00000004l
# Define mb_retrycancel            0x00000005l

Icon macros:
# Define mb_iconhand               0x00000010l
# Define mb_iconquestion           0x00000020l
# Define mb_iconexclamation        0x00000030l
# Define mb_iconasterisk           0x00000040l

The return values of MessageBox are:
# Define idok              1
# Define idcancel          2
# Define idabort           3
# Define idretry           4
# Define idignore          5
# Define idyes             6
# Define IDNO       

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.