GUI "SplitButton with Separators", PIXELS

ENUM
    ID_CUT
    ID_COPY
    ID_PASTE
    ID_DELETE
END ENUM

GLOBAL Form1      AS HWND
GLOBAL hSplitButt AS HWND


SUB FORMLOAD
    Form1 = BCX_FORM("SplitButton Demo", 0, 0, 350, 200)
    hSplitButt = BCX_SPLITBUTTON( "Cut", Form1, ID_CUT, 20, 20, 100, 28)

    BCX_SPLITBUTTON_ADDITEM(hSplitButt, "Cut",   ID_CUT)
    BCX_SPLITBUTTON_ADDITEM(hSplitButt, "Copy",  ID_COPY)
    BCX_SPLITBUTTON_ADDITEM(hSplitButt, "Paste", ID_PASTE)

    BCX_SPLITBUTTON_ADDSEPARATOR(hSplitButt)

    BCX_SPLITBUTTON_ADDITEM(hSplitButt, "Delete", ID_DELETE)

    CENTER(Form1)
    SHOW(Form1)
END SUB

BEGIN EVENTS
    SELECT CASE CBMSG
    CASE WM_COMMAND
        SELECT CASE CBCTL
        CASE ID_CUT    : MSGBOX "Cut clicked"
        CASE ID_COPY   : MSGBOX "Copy clicked"
        CASE ID_PASTE  : MSGBOX "Paste clicked"
        CASE ID_DELETE : MSGBOX "Delete clicked"
        END SELECT
    END SELECT
END EVENTS
