' gui_constants.pb — GUI window style constants simulation
#COMPILE EXE
#DIM ALL

FUNCTION PBMAIN() AS LONG
    LOCAL styleFlags AS LONG
    LOCAL exStyleFlags AS LONG
    LOCAL windowType AS LONG
    LOCAL controlType AS LONG
    LOCAL msgID AS LONG
    LOCAL wParam AS LONG
    LOCAL lParam AS LONG
    LOCAL i AS LONG
    LOCAL j AS LONG
    LOCAL totalWindows AS LONG
    LOCAL styleStr AS STRING
    LOCAL exStyleStr AS STRING
    LOCAL msgStr AS STRING
    LOCAL iter AS LONG
    LOCAL numWindows AS LONG
    LOCAL wndID AS LONG
    LOCAL result AS LONG

    numWindows = 8

    PRINT "=== GUI Window Constants ==="

    FOR totalWindows = 1 TO numWindows
        wndID = totalWindows
        styleFlags = 0
        exStyleFlags = 0
        controlType = 0

        IF wndID = 1 THEN
            windowType = 0
            styleFlags = 13565952
            exStyleFlags = 0
            PRINT "  Main Window: WS_OVERLAPPEDWINDOW"
        END IF

        IF wndID = 2 THEN
            windowType = 1
            styleFlags = 872448256
            exStyleFlags = 256
            PRINT "  Dialog: WS_POPUP | WS_CAPTION | WS_SYSMENU"
        END IF

        IF wndID = 3 THEN
            windowType = 2
            styleFlags = 50331648
            exStyleFlags = 512
            PRINT "  Child: WS_CHILD | WS_BORDER"
        END IF

        IF wndID = 4 THEN
            controlType = 1
            styleFlags = 1258291200
            PRINT "  Button: BS_PUSHBUTTON | WS_CHILD"
        END IF

        IF wndID = 5 THEN
            controlType = 2
            styleFlags = 201326592
            PRINT "  Edit: ES_LEFT | WS_CHILD | WS_BORDER"
        END IF

        IF wndID = 6 THEN
            controlType = 3
            styleFlags = 304087040
            PRINT "  ListBox: LBS_STANDARD | WS_CHILD"
        END IF

        IF wndID = 7 THEN
            controlType = 4
            styleFlags = 570425344
            PRINT "  ComboBox: CBS_DROPDOWN | WS_CHILD"
        END IF

        IF wndID = 8 THEN
            controlType = 5
            styleFlags = 100663296
            PRINT "  Static: SS_LEFT | WS_CHILD"
        END IF

        PRINT "    Style: " + STR$(styleFlags) + " ExStyle: " + STR$(exStyleFlags)
    NEXT totalWindows

    PRINT "--- Window Messages ---"
    FOR msgID = 1 TO 6
        IF msgID = 1 THEN msgStr = "WM_CREATE"
        IF msgID = 2 THEN msgStr = "WM_DESTROY"
        IF msgID = 3 THEN msgStr = "WM_PAINT"
        IF msgID = 4 THEN msgStr = "WM_SIZE"
        IF msgID = 5 THEN msgStr = "WM_COMMAND"
        IF msgID = 6 THEN msgStr = "WM_CLOSE"
        wParam = msgID * 100
        lParam = msgID * 200
        PRINT "  " + msgStr + " wParam=" + STR$(wParam) + " lParam=" + STR$(lParam)
    NEXT msgID

    PRINT "=== End GUI Constants ==="
    FUNCTION = 0
END FUNCTION
