' Common Win32 API Constants as % equates
#COMPILE EXE
#DIM ALL

%WM_DESTROY = &H0002
%WM_SIZE = &H0005
%WM_MOVE = &H0003
%WM_CLOSE = &H0010
%WM_QUIT = &H0012
%WM_PAINT = &H000F
%WM_CREATE = &H0001
%WM_COMMAND = &H0111
%WM_LBUTTONDOWN = &H0201
%WM_LBUTTONUP = &H0202
%WM_RBUTTONDOWN = &H0204
%WM_RBUTTONUP = &H0205
%WM_MOUSEMOVE = &H0200
%WM_KEYDOWN = &H0100
%WM_KEYUP = &H0101
%WM_CHAR = &H0102
%WM_TIMER = &H0113
%WM_USER = &H0400

%WS_OVERLAPPED = &H00000000
%WS_POPUP = &H80000000
%WS_CHILD = &H40000000
%WS_MINIMIZE = &H20000000
%WS_VISIBLE = &H10000000
%WS_DISABLED = &H08000000
%WS_CLIPSIBLINGS = &H04000000
%WS_CLIPCHILDREN = &H02000000
%WS_MAXIMIZE = &H01000000
%WS_CAPTION = &H00C00000
%WS_BORDER = &H00800000
%WS_DLGFRAME = &H00400000
%WS_VSCROLL = &H00200000
%WS_HSCROLL = &H00100000
%WS_SYSMENU = &H00080000
%WS_THICKFRAME = &H00040000
%WS_MINIMIZEBOX = &H00020000
%WS_MAXIMIZEBOX = &H00010000

%WS_OVERLAPPEDWINDOW = %WS_OVERLAPPED OR %WS_CAPTION OR %WS_SYSMENU OR %WS_THICKFRAME OR %WS_MINIMIZEBOX OR %WS_MAXIMIZEBOX
%WS_POPUPWINDOW = %WS_POPUP OR %WS_BORDER OR %WS_SYSMENU

%SW_HIDE = 0
%SW_SHOWNORMAL = 1
%SW_SHOWMINIMIZED = 2
%SW_SHOWMAXIMIZED = 3
%SW_SHOWNOACTIVATE = 4
%SW_SHOW = 5
%SW_RESTORE = 9

%MB_OK = 0
%MB_OKCANCEL = 1
%MB_YESNO = 4
%MB_YESNOCANCEL = 3
%MB_RETRYCANCEL = 5
%MB_ICONERROR = 16
%MB_ICONQUESTION = 32
%MB_ICONWARNING = 48
%MB_ICONINFORMATION = 64
%MB_DEFBUTTON1 = 0
%MB_DEFBUTTON2 = 256
%MB_DEFBUTTON3 = 512

%IDOK = 1
%IDCANCEL = 2
%IDABORT = 3
%IDRETRY = 4
%IDIGNORE = 5
%IDYES = 6
%IDNO = 7

%CW_USEDEFAULT = &H80000000

%COLOR_WINDOW = 5
%COLOR_BTNFACE = 15
%COLOR_HIGHLIGHT = 13
%COLOR_WINDOWTEXT = 8

%GENERIC_READ = &H80000000
%GENERIC_WRITE = &H40000000
%FILE_SHARE_READ = 1
%FILE_SHARE_WRITE = 2
%OPEN_EXISTING = 3
%CREATE_ALWAYS = 2
%OPEN_ALWAYS = 4
%INVALID_HANDLE_VALUE = -1

FUNCTION PBMAIN() AS LONG
    PRINT "Win32 API Constants Reference"
    PRINT "============================"
    PRINT ""
    PRINT "Window Messages:"
    PRINT "  WM_DESTROY = "; HEX$(%WM_DESTROY, 4)
    PRINT "  WM_CREATE = "; HEX$(%WM_CREATE, 4)
    PRINT "  WM_PAINT = "; HEX$(%WM_PAINT, 4)
    PRINT "  WM_CLOSE = "; HEX$(%WM_CLOSE, 4)
    PRINT "  WM_COMMAND = "; HEX$(%WM_COMMAND, 4)
    PRINT ""
    PRINT "Window Styles:"
    PRINT "  WS_OVERLAPPED = "; HEX$(%WS_OVERLAPPED, 8)
    PRINT "  WS_CAPTION = "; HEX$(%WS_CAPTION, 8)
    PRINT "  WS_SYSMENU = "; HEX$(%WS_SYSMENU, 8)
    PRINT "  WS_OVERLAPPEDWINDOW = "; HEX$(%WS_OVERLAPPEDWINDOW, 8)
    PRINT ""
    PRINT "Message Box:"
    PRINT "  MB_OK = "; %MB_OK
    PRINT "  MB_YESNO = "; %MB_YESNO
    PRINT "  MB_ICONERROR = "; %MB_ICONERROR
    PRINT "  MB_ICONINFORMATION = "; %MB_ICONINFORMATION
    PRINT ""
    PRINT "ShowWindow:"
    PRINT "  SW_SHOW = "; %SW_SHOW
    PRINT "  SW_HIDE = "; %SW_HIDE
    PRINT "  SW_RESTORE = "; %SW_RESTORE
    PRINT ""
    PRINT "Constants loaded successfully."

    FUNCTION = 0
END FUNCTION
