Help Center

AfxMsgfunction

Displays an application modal message box.

WindowsfunctionAfxWin.incdocumented

Syntax

FUNCTION AfxMsg (BYREF wszText AS WSTRING, BYREF wszCaption AS WSTRING = "Message", BYVAL uType AS DWORD = 0) AS LONG
FUNCTION AfxMsg (BYVAL pwszText AS WSTRING PTR, BYREF wszCaption AS WSTRING = "Message", BYVAL uType AS DWORD = 0) AS LONG
FUNCTION AfxMsg (BYVAL hWin AS HWND, BYREF wszText AS WSTRING, BYREF wszCaption AS WSTRING = "Message", BYVAL uType AS DWORD = 0) AS LONG
FUNCTION AfxMsg (BYVAL hWin AS HWND, BYVAL pwszText AS WSTRING PTR, BYREF wszCaption AS WSTRING = "Message", BYVAL uType AS DWORD = 0) AS LONG

Parameters

NameDescription
wszTextAny string data type or a literal.
pwszTextPointer to a WSTRING.
wszCaptionOptional. The message box caption. Default title is "Message".
uTypeOptional. For a list of available types, see the Microsoft documentation for the MessageBoxW function. The MB_APPLMODAL type is always added.

Description

Displays an application modal message box. Can be used with any string data type or literal.It is a quick shortcur for the MessageBoxW API function.

Reference

  • Include file AfxWin.inc
  • Defined in AfxNova/AfxWin.inc:92
  • Documented in Windows/Windows Procedures.md
  • Topic: Windows Procedures