$INCLUDE "Darkmode.Inc"
$INCLUDE "Dpi_Aware.Inc"

GUI "Form1"

ENUM
    ID_Grp1, ID_Stc1, ID_Spl1
END ENUM

GLOBAL Form1 AS HWND
GLOBAL AS CONTROL hGrp1, hStc1, hSpl1


SUB FORMLOAD()
    Form1 = BCX_FORM("SplitButton Darkmode Demo", 0, 0, 179, 112)
    hGrp1 = BCX_GROUP("Group", Form1, ID_Grp1, 4, 3, 111, 90)
    hStc1 = BCX_LABEL("Testing 1,2,3", Form1, ID_Stc1, 126, 5, 37, 32)
    hSpl1 = BCX_SPLITBUTTON("Cut", Form1, 111, 10, 15, 50, 20)

    BCX_SPLITBUTTON_ADDITEM(hSpl1, "Cut",   111)
    BCX_SPLITBUTTON_ADDITEM(hSpl1, "Copy",  222)
    BCX_SPLITBUTTON_ADDITEM(hSpl1, "Paste", 333)
    BCX_SPLITBUTTON_ADDITEM(hSpl1, "Delete", 444)

    CALL DPI_Init
    CALL DPI_Add_Form(Form1)

    CALL DarkMode_Init
    CALL DarkMode_Add_Form(Form1)

    CENTER(Form1)
    SHOW(Form1)
END SUB

BEGIN EVENTS
    SELECT CASE CBMSG
    CASE WM_COMMAND
        SELECT CASE CBCTL
        CASE 111 : MSGBOX "Cut clicked"
        CASE 222 : MSGBOX "Copy clicked"
        CASE 333 : MSGBOX "Paste clicked"
        CASE 444 : MSGBOX "Delete clicked"
        END SELECT
    END SELECT
END EVENTS

