GUI "Form1"

ENUM
    SB_APPLES
    SB_BANANAS
    SB_GRAPES
    SB_ORANGES
    SB_CLICK
END ENUM

GLOBAL Form1 AS HWND
GLOBAL hSplitButt AS CONTROL

SUB FORMLOAD
    Form1 = BCX_FORM("Form1", 0, 0, 310, 260)

    hSplitButt = BCX_SPLITBUTTON("Apples", Form1,   SB_APPLES, 13, 37, 44, 20)

    BCX_SPLITBUTTON_ADDITEM(hSplitButt, "Apples",   SB_APPLES)
    BCX_SPLITBUTTON_ADDITEM(hSplitButt, "Bananas",  SB_BANANAS)
    BCX_SPLITBUTTON_ADDITEM(hSplitButt, "Grapes",   SB_GRAPES)
    BCX_SPLITBUTTON_ADDITEM(hSplitButt, "Oranges",  SB_ORANGES)

    CENTER(Form1)
    SHOW(Form1)
END SUB

BEGIN EVENTS
    SELECT CASE CBMSG
    CASE WM_COMMAND
        SELECT CASE CBCTL

        CASE SB_APPLES   :  MSGBOX "SB_APPLES"    
        CASE SB_BANANAS  :  MSGBOX "SB_BANANAS"   
        CASE SB_GRAPES   :  MSGBOX "SB_GRAPES"    
        CASE SB_ORANGES  :  MSGBOX "SB_ORANGES"   

        END SELECT
    END SELECT
END EVENTS


