' Modal Dialog via Win32 DECLARE — CreateWindow, DialogBox
#COMPILE EXE
#DIM ALL

DECLARE FUNCTION MessageBox LIB "USER32.DLL" ALIAS "MessageBoxA" (BYVAL hWnd AS LONG, BYVAL lpText AS ASCIIZ, BYVAL lpCaption AS ASCIIZ, BYVAL uType AS LONG) AS LONG
DECLARE FUNCTION DialogBoxParam LIB "USER32.DLL" ALIAS "DialogBoxParamA" (BYVAL hInstance AS LONG, BYVAL lpTemplateName AS ASCIIZ, BYVAL hWndParent AS LONG, BYVAL lpDialogFunc AS LONG, BYVAL dwInitParam AS LONG) AS LONG

FUNCTION PBMAIN() AS LONG
    PRINT "Modal Dialog via Win32 API:"
    PRINT "Use DialogBoxParam with dialog template"
    PRINT "Controls: CreateWindow with CONTROL class"
    PRINT "See dialog_events.pb for callback pattern"
    FUNCTION = 0
END FUNCTION
