'==============================================================================
' Test #2: MessageBox with User32 API
' Tests MessageBoxA declare and MB_ constants
'==============================================================================
#COMPILE EXE
#DIM ALL
#INCLUDE "Core/Windows.inc"

FUNCTION PBMAIN() AS LONG
    LOCAL result AS LONG
    LOCAL msg AS STRING
    LOCAL title AS STRING

    msg = "Hello from PBXA64 Compiler!"
    title = "PBXA64 WinAPI Test"

    result = MessageBoxA(%NULL, STRPTR(msg), STRPTR(title), %MB_ICONINFORMATION OR %MB_OK)

    IF result = %IDOK THEN
        PRINT "User clicked OK"
    END IF

    PRINT "Test #2 PASSED: MessageBoxA works"
    FUNCTION = 0
END FUNCTION
