Buchempfehlung
Mikrocomputertechnik mit Controllern der Atmel AVR-RISC-Familie
Mikrocomputertechnik mit Controllern der Atmel AVR-RISC-Familie
Umfassend, aber leicht verständlich führt dieses Buch in die Programmierung von ATMEL AVR Mikrocontrollern ein. [Mehr Infos...]
FreeBASIC-Chat
Es sind Benutzer im FreeBASIC-Chat online.
(Stand:  )
FreeBASIC bei Twitter
Twitter FreeBASIC-Nachrichten jetzt auch über Twitter erhalten. Follow us!

fb:porticula NoPaste

Info
Info / Hilfe
Liste
Übersicht / Liste
Neu
Datei hochladen
Suche
Quellcode suchen
Download
Dateidownload

bla

Uploader:MitgliedThePuppetMaster
Datum/Zeit:01.07.2009 00:38:04

'###################################################################################################################################
Private Type EWH_Control
    V_WinID                                         as UInteger
    V_ControlID                                     as UInteger

    Declare Function    Control_Create              (V_Type as EWH_Control_Enum, V_Width as UInteger, V_Height as UInteger, V_PosX as Integer, V_PosY as Integer, V_Visible as UByte = 1, V_Text as String = "", V_Callback as EWH_Callback_Type = EWH_INT_Callback_Empty) as EWH_Control
    Declare Sub         SetEvent                    (V_Event as EWH_Event_Enum, V_EventPtr as Any Ptr)

    Declare Property    Width                       () as UInteger
    Declare Property    Width                       (V_Value as UInteger)
    Declare Property    Height                      () as UInteger
    Declare Property    Height                      (V_Value as UInteger)

    Declare Property    Top                         () as Integer
    Declare Property    Top                         (V_Value as Integer)
    Declare Property    Left                        () as Integer
    Declare Property    Left                        (V_Value as Integer)
    Declare Sub         Move                        (V_Left as Integer, V_Top as Integer)

    Declare Sub         SetFocus                    ()
    Declare Property    Visible                     () as UByte
    Declare Property    Visible                     (V_Value as UByte)

    Declare  Property   Color_Background            () as UInteger
    Declare  Property   Color_Background            (V_Value as UInteger)
    Declare  Property   Color_Foreground            () as UInteger
    Declare  Property   Color_Foreground            (V_Value as UInteger)
    Declare  Property   Color_Disable_Foreground    () as UInteger
    Declare  Property   Color_Disable_Foreground    (V_Value as UInteger)

    Declare Sub         CLS                         ()

    Declare Property    Value                       () as Integer
    Declare Property    Value                       (V_Value as Integer)
    Declare Property    Max                         () as Integer
    Declare Property    Max                         (V_Value as Integer)
    Declare Property    Text                        () as String
    Declare Property    Text                        (V_Value as String)
    Declare Property    ShowValue                   () as UByte
    Declare Property    ShowValue                   (V_Value as UByte)
End Type

'-----------------------------------------------------------------------------------------------------------------------------------
Private Type EWH_Window
    V_WinID                                         as UInteger

    Declare Function    Control_Create              (V_Type as EWH_Control_Enum, V_Width as UInteger, V_Height as UInteger, V_PosX as Integer, V_PosY as Integer, V_Visible as UByte = 1, V_Text as String = "", V_Callback as EWH_Callback_Type = EWH_INT_Callback_Empty) as EWH_Control

    Declare Property    Width                       () as UInteger
    Declare Property    Width                       (V_Value as UInteger)
    Declare Property    Height                      () as UInteger
    Declare Property    Height                      (V_Value as UInteger)
    Declare Property    WinWidth                    () as UInteger
    Declare Property    WinWidth                    (V_Value as UInteger)
    Declare Property    WinHeight                   () as UInteger
    Declare Property    WinHeight                   (V_Value as UInteger)

    Declare Property    Top                         () as Integer
    Declare Property    Top                         (V_Value as Integer)
    Declare Property    Left                        () as Integer
    Declare Property    Left                        (V_Value as Integer)
    Declare Sub         Move                        (V_Left as Integer, V_Top as Integer)
    Declare Sub         CenterWindow                ()

    Declare Sub         UnLoadMe                    ()
    Declare Sub         Show                        ()
    Declare Sub         Hide                        ()
    Declare Sub         SetFocus                    ()
    Declare Property    Visible                     () as UByte
    Declare Property    Visible                     (V_Value as UByte)
    Declare Property    Maximize                    () as UByte
    Declare Property    Maximize                    (V_Value as UByte)

    Declare  Property   Color_Background            () as UInteger
    Declare  Property   Color_Background            (V_Value as UInteger)
    Declare  Property   Color_Foreground            () as UInteger
    Declare  Property   Color_Foreground            (V_Value as UInteger)
    Declare  Property   Color_Disable_Foreground    () as UInteger
    Declare  Property   Color_Disable_Foreground    (V_Value as UInteger)

    Declare Sub         CLS                         ()

    Declare Function    Menu_Add                    (V_Caption as String, V_EventClick as Any Ptr) as EWH_Menu
    Declare Function    Menu_SubAdd                 (V_Menu as EWH_Menu, V_Caption as String, V_Disabled as UByte = 0, V_EventClick as Any Ptr) as EWH_Menu

End Type








'###################################################################################################################################
'### E W H - Extendet Window Handel
'###################################################################################################################################
'###################################################################################################################################
'### Date of Idea:  2008.11.14 - 03:45:09
'### Autor:         DeltaLab's Germany [Experimental Computing]
'###                Martin Wiemann
'### Contact:       Admin@MLN.ath.cx   /   IRC://MLN.ath.cx/#deltalab
'###################################################################################################################################



'###################################################################################################################################
Private Property EWH_Control.Width() as UInteger
Dim as UInteger XW, XH
Print This.V_ControlID
Print EWH_INT_Control_GetSize(This.V_ControlID, XW, XH)
Return XW
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Control.Width(V_Value as UInteger)
Dim as UInteger XW, XH
EWH_INT_Control_GetSize(This.V_ControlID, XW, XH)
EWH_INT_Control_SetSize(This.V_ControlID, V_Value, XH)
End Property

'-----------------------------------------------------------------------------------------------------------------------------------
Private Property EWH_Control.Height() as UInteger
Dim as UInteger XW, XH
EWH_INT_Control_GetSize(This.V_ControlID, XW, XH)
Return XH
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Control.Height(V_Value as UInteger)
Dim as UInteger XW, XH
EWH_INT_Control_GetSize(This.V_ControlID, XW, XH)
EWH_INT_Control_SetSize(This.V_ControlID, XW, V_Value)
End Property



'###################################################################################################################################
Private Property EWH_Control.Left() as Integer
Dim as Integer XL, XT
'EWH_INT_Win_GetPos(This.V_ControlID, XL, XT)
Return XL
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Control.Left(V_Value as Integer)
Dim as Integer XL, XT
'EWH_INT_Win_GetPos(This.V_ControlID, XL, XT)
'EWH_INT_Win_SetPos(This.V_ControlID, V_Value, XT)
End Property

'-----------------------------------------------------------------------------------------------------------------------------------
Private Property EWH_Control.Top() as Integer
Dim as Integer XL, XT
'EWH_INT_Win_GetPos(This.V_ControlID, XL, XT)
Return XT
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Control.Top(V_Value as Integer)
Dim as Integer XL, XT
'EWH_INT_Win_GetPos(This.V_ControlID, XL, XT)
'EWH_INT_Win_SetPos(This.V_ControlID, XL, V_Value)
End Property



'###################################################################################################################################
Private Property EWH_Control.Visible() as UByte
Dim XV as UByte
'EWH_INT_Win_GetVisible(This.V_ControlID, XV)
Return XV
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Control.Visible(V_Value as UByte)
If V_Value = 0 Then
'   EWH_INT_Win_Hide(This.V_ControlID)
'Else: EWH_INT_Win_Show(This.V_ControlID)
End If
End Property



'###################################################################################################################################
Private Sub EWH_Control.Move(V_Left as Integer, V_Top as Integer)
'EWH_INT_Win_SetPos(This.V_ControlID, V_Left, V_Top)
End Sub



'###################################################################################################################################
Private Sub EWH_Control.CLS()
'EWH_INT_Win_CLS(This.V_ControlID)
End Sub



'###################################################################################################################################
Private Property EWH_Control.Color_Background() as UInteger
Dim XV as UInteger
'EWH_INT_Win_GetColor(This.V_ControlID, EWH_INT_Color_SYS_DefaultBack, XV)
Return XV
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Control.Color_Background(V_Value as UInteger)
'EWH_INT_Win_SetColor(This.V_ControlID, EWH_INT_Color_SYS_DefaultBack, V_Value)
End Property

'-----------------------------------------------------------------------------------------------------------------------------------
Private Property EWH_Control.Color_Foreground() as UInteger
Dim XV as UInteger
'EWH_INT_Win_GetColor(This.V_ControlID, EWH_INT_Color_SYS_DefaultFore, XV)
Return XV
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Control.Color_Foreground(V_Value as UInteger)
'EWH_INT_Win_SetColor(This.V_ControlID, EWH_INT_Color_SYS_DefaultFore, V_Value)
End Property

'-----------------------------------------------------------------------------------------------------------------------------------
Private Property EWH_Control.Color_Disable_Foreground() as UInteger
Dim XV as UInteger
'EWH_INT_Win_GetColor(This.V_ControlID, EWH_INT_Color_SYS_DisableFore, XV)
Return XV
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Control.Color_Disable_Foreground(V_Value as UInteger)
'EWH_INT_Win_SetColor(This.V_ControlID, EWH_INT_Color_SYS_DisableFore, V_Value)
End Property



'###################################################################################################################################
Private Sub EWH_Control.SetFocus()
'EWH_INT_Win_SetFocus(This.V_ControlID)
End Sub



'###################################################################################################################################
Private Property EWH_Control.Value() as Integer
Dim XV as Integer
EWH_INT_Control_Get_Value(This.V_ControlID, XV)
Return XV
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Control.Value(V_Value as Integer)
EWH_INT_Control_Set_Value(This.V_ControlID, V_Value)
End Property

'-----------------------------------------------------------------------------------------------------------------------------------
Private Property EWH_Control.Max() as Integer
Dim XV as Integer
EWH_INT_Control_Get_Max(This.V_ControlID, XV)
Return XV
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Control.Max(V_Value as Integer)
EWH_INT_Control_Set_Max(This.V_ControlID, V_Value)
End Property

'-----------------------------------------------------------------------------------------------------------------------------------
Private Property EWH_Control.Text() as String
Dim XV as String
EWH_INT_Control_Get_Text(This.V_ControlID, XV)
Return XV
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Control.Text(V_Value as String)
EWH_INT_Control_Set_Text(This.V_ControlID, V_Value)
End Property

'-----------------------------------------------------------------------------------------------------------------------------------
Private Property EWH_Control.ShowValue() as UByte
Dim XV as UByte
EWH_INT_Control_Get_ShowValue(This.V_ControlID, XV)
Return XV
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Control.ShowValue(V_Value as UByte)
EWH_INT_Control_Set_ShowValue(This.V_ControlID, V_Value)
End Property



'###################################################################################################################################
Private Sub EWH_Control.SetEvent(V_Event as EWH_Event_Enum, V_EventPtr as Any Ptr)
EWH_INT_Control_SetEvent(This.V_ControlID, V_Event, V_EventPtr)
End Sub



'###################################################################################################################################
Private Function EWH_Control.Control_Create(V_Type as EWH_Control_Enum, V_Width as UInteger, V_Height as UInteger, V_PosX as Integer, V_PosY as Integer, V_Visible as UByte = 1, V_Text as String = "", V_Callback as EWH_Callback_Type = EWH_INT_Callback_Empty) as EWH_Control
Dim TEWHC as EWH_Control
With TEWHC
    .V_WinID = This.V_WinID
'   .V_ControlID = EWH_INT_Win_Control_Create(.V_WinID, V_Type, V_PosX, V_PosY, V_Width, V_Height, V_Visible, V_Text, V_Callback)
End With
Return TEWHC
End Function

'-----------------------------------------------------------------------------------------------------------------------------------
'Private Function EWH_Window.W_Control_Destroy(V_EWH_Control as EWH_Control) as Integer
'Return EWH_INT_Win_Destroy(V_EWH_Window.V_WinID)
'End Function









'###################################################################################################################################
'### E W H - Extendet Window Handel
'###################################################################################################################################
'###################################################################################################################################
'### Date of Idea:  2008.11.14 - 03:45:09
'### Autor:         DeltaLab's Germany [Experimental Computing]
'###                Martin Wiemann
'### Contact:       Admin@MLN.ath.cx   /   IRC://MLN.ath.cx/#deltalab
'###################################################################################################################################



'###################################################################################################################################
Private Property EWH_Window.Width() as UInteger
Dim as UInteger XW, XH
EWH_INT_Win_GetSize(This.V_WinID, XW, XH)
Return XW
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Window.Width(V_Value as UInteger)
Dim as UInteger XW, XH
EWH_INT_Win_GetSize(This.V_WinID, XW, XH)
EWH_INT_Win_SetSize(This.V_WinID, V_Value, XH)
End Property

'-----------------------------------------------------------------------------------------------------------------------------------
Private Property EWH_Window.Height() as UInteger
Dim as UInteger XW, XH
EWH_INT_Win_GetSize(This.V_WinID, XW, XH)
Return XH
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Window.Height(V_Value as UInteger)
Dim as UInteger XW, XH
EWH_INT_Win_GetSize(This.V_WinID, XW, XH)
EWH_INT_Win_SetSize(This.V_WinID, XW, V_Value)
End Property



'###################################################################################################################################
Private Property EWH_Window.WinWidth() as UInteger
Dim as UInteger XW, XH
'EWH_INT_Win_GetSize(This.V_WinID, XW, XH)
Return XW
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Window.WinWidth(V_Value as UInteger)
Dim as UInteger XW, XH
'EWH_INT_Win_GetSize(This.V_WinID, XW, XH)
'EWH_INT_Win_SetSize(This.V_WinID, V_Value, XH)
End Property

'-----------------------------------------------------------------------------------------------------------------------------------
Private Property EWH_Window.WinHeight() as UInteger
Dim as UInteger XW, XH
'EWH_INT_Win_GetSize(This.V_WinID, XW, XH)
Return XH
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Window.WinHeight(V_Value as UInteger)
Dim as UInteger XW, XH
'EWH_INT_Win_GetSize(This.V_WinID, XW, XH)
'EWH_INT_Win_SetSize(This.V_WinID, XW, V_Value)
End Property



'###################################################################################################################################
Private Property EWH_Window.Left() as Integer
Dim as Integer XL, XT
EWH_INT_Win_GetPos(This.V_WinID, XL, XT)
Return XL
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Window.Left(V_Value as Integer)
Dim as Integer XL, XT
EWH_INT_Win_GetPos(This.V_WinID, XL, XT)
EWH_INT_Win_SetPos(This.V_WinID, V_Value, XT)
End Property

'-----------------------------------------------------------------------------------------------------------------------------------
Private Property EWH_Window.Top() as Integer
Dim as Integer XL, XT
EWH_INT_Win_GetPos(This.V_WinID, XL, XT)
Return XT
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Window.Top(V_Value as Integer)
Dim as Integer XL, XT
EWH_INT_Win_GetPos(This.V_WinID, XL, XT)
EWH_INT_Win_SetPos(This.V_WinID, XL, V_Value)
End Property



'###################################################################################################################################
Private Sub EWH_Window.UnLoadMe()
EWH_INT_Win_Destroy(This.V_WinID)
End Sub

'-----------------------------------------------------------------------------------------------------------------------------------
Private Sub EWH_Window.Show()
EWH_INT_Win_Show(This.V_WinID)
End Sub

'-----------------------------------------------------------------------------------------------------------------------------------
Private Sub EWH_Window.Hide()
EWH_INT_Win_Hide(This.V_WinID)
End Sub

'-----------------------------------------------------------------------------------------------------------------------------------
Private Property EWH_Window.Visible() as UByte
Dim XV as UByte
EWH_INT_Win_GetVisible(This.V_WinID, XV)
Return XV
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Window.Visible(V_Value as UByte)
If V_Value = 0 Then
    EWH_INT_Win_Hide(This.V_WinID)
Else: EWH_INT_Win_Show(This.V_WinID)
End If
End Property

'-----------------------------------------------------------------------------------------------------------------------------------
Private Property EWH_Window.Maximize() as UByte
Dim XV as UByte
EWH_INT_Win_GetMaximize(This.V_WinID, XV)
Return XV
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Window.Maximize(V_Value as UByte)
If V_Value = 0 Then
    EWH_INT_Win_Maximize(This.V_WinID)
Else: EWH_INT_Win_UnMaximize(This.V_WinID)
End If
End Property



'###################################################################################################################################
Private Sub EWH_Window.Move(V_Left as Integer, V_Top as Integer)
EWH_INT_Win_SetPos(This.V_WinID, V_Left, V_Top)
End Sub

'-----------------------------------------------------------------------------------------------------------------------------------
Private Sub EWH_Window.CenterWindow()
EWH_INT_Win_Center(This.V_WinID)
End Sub



'###################################################################################################################################
Private Sub EWH_Window.CLS()
EWH_INT_Win_CLS(This.V_WinID)
End Sub



'###################################################################################################################################
Private Property EWH_Window.Color_Background() as UInteger
Dim XV as UInteger
EWH_INT_Win_GetColor(This.V_WinID, EWH_INT_Color_SYS_DefaultBack, XV)
Return XV
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Window.Color_Background(V_Value as UInteger)
EWH_INT_Win_SetColor(This.V_WinID, EWH_INT_Color_SYS_DefaultBack, V_Value)
End Property

'-----------------------------------------------------------------------------------------------------------------------------------
Private Property EWH_Window.Color_Foreground() as UInteger
Dim XV as UInteger
EWH_INT_Win_GetColor(This.V_WinID, EWH_INT_Color_SYS_DefaultFore, XV)
Return XV
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Window.Color_Foreground(V_Value as UInteger)
EWH_INT_Win_SetColor(This.V_WinID, EWH_INT_Color_SYS_DefaultFore, V_Value)
End Property

'-----------------------------------------------------------------------------------------------------------------------------------
Private Property EWH_Window.Color_Disable_Foreground() as UInteger
Dim XV as UInteger
EWH_INT_Win_GetColor(This.V_WinID, EWH_INT_Color_SYS_DisableFore, XV)
Return XV
End Property
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Private Property EWH_Window.Color_Disable_Foreground(V_Value as UInteger)
EWH_INT_Win_SetColor(This.V_WinID, EWH_INT_Color_SYS_DisableFore, V_Value)
End Property



'###################################################################################################################################
Private Sub EWH_Window.SetFocus()
EWH_INT_Win_SetFocus(This.V_WinID)
End Sub



'###################################################################################################################################
Private Function EWH_Window.Control_Create(V_Type as EWH_Control_Enum, V_Width as UInteger, V_Height as UInteger, V_PosX as Integer, V_PosY as Integer, V_Visible as UByte = 1, V_Text as String = "", V_Callback as EWH_Callback_Type = EWH_INT_Callback_Empty) as EWH_Control
Dim TEWHC as EWH_Control
With TEWHC
    .V_WinID = This.V_WinID
    .V_ControlID = EWH_INT_Win_Control_Create(.V_WinID, V_Type, V_PosX, V_PosY, V_Width, V_Height, V_Visible, V_Text, V_Callback)
End With
Return TEWHC
End Function

'-----------------------------------------------------------------------------------------------------------------------------------
'Private Function EWH_Window.W_Control_Destroy(V_EWH_Control as EWH_Control) as Integer
'Return EWH_INT_Win_Destroy(V_EWH_Window.V_WinID)
'End Function



'###################################################################################################################################
Private Function EWH_Window.Menu_Add(V_Caption as String, V_EventClick as Any Ptr) as EWH_Menu
Dim TEWHC as EWH_Menu
With TEWHC
    .V_WinID = This.V_WinID
    EWH_INT_Win_Menu_Add(.V_WinID, V_Caption, EWH_Callback(, , , , , , , , , V_EventClick), .V_MenuPtr)
End With
Return TEWHC
End Function

'-----------------------------------------------------------------------------------------------------------------------------------
Private Function EWH_Window.Menu_SubAdd(V_Menu as EWH_Menu, V_Caption as String, V_Disabled as UByte = 0, V_EventClick as Any Ptr) as EWH_Menu
Dim TEWHC as EWH_Menu
With TEWHC
    .V_WinID = This.V_WinID
    EWH_INT_Win_Menu_SubAdd(V_Menu.V_MenuPtr, V_Caption, V_Disabled, EWH_Callback(, , , , , , , , , V_EventClick), .V_MenuPtr)
End With
Return TEWHC
End Function










'###################################################################################################################################
Public Function EWH_Win_CreateX(V_Title as String, V_Width as UInteger, V_Height as UInteger, V_PosX as Integer = 0, V_PosY as Integer = 0, V_Visible as UByte = 1, V_Callback as EWH_Callback_Type = EWH_INT_Callback_Empty, V_NoMove as UByte = 0) as EWH_Window
Dim TEWHW as EWH_Window
TEWHW.V_WinID = EWH_INT_Win_Create(V_Title, V_Width, V_Height, V_PosX, V_PosY, V_Visible, V_Callback, , V_NoMove)
If TEWHW.V_WinID <= 0 Then TEWHW.V_WinID = 0
Return TEWHW
End Function

'-----------------------------------------------------------------------------------------------------------------------------------
Public Function EWH_Win_Create(V_Title as String, V_Width as UInteger, V_Height as UInteger, V_PosX as Integer = 0, V_PosY as Integer = 0, V_Visible as UByte = 1, V_Callback as EWH_Callback_Type = EWH_INT_Callback_Empty) as EWH_Window
Dim TEWHW as EWH_Window
TEWHW.V_WinID = EWH_INT_Win_Create(V_Title, V_Width, V_Height, V_PosX, V_PosY, V_Visible, V_Callback)
If TEWHW.V_WinID <= 0 Then TEWHW.V_WinID = 0
Return TEWHW
End Function

'-----------------------------------------------------------------------------------------------------------------------------------
Public Function EWH_Win_Destroy(V_EWH_Window as EWH_Window) as Integer
Return EWH_INT_Win_Destroy(V_EWH_Window.V_WinID)
End Function

'-----------------------------------------------------------------------------------------------------------------------------------
Public Function EWH_Win_Exist(V_EWH_Window as EWH_Window) as UByte
If EWH_INT_Win_Exist(V_EWH_Window.V_WinID) = EWH_NoError Then Return 1
Return 0
End Function