-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCSTOREMENU.CLS
51 lines (46 loc) · 1.23 KB
/
CSTOREMENU.CLS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "cStoreMenu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Private m_tMI() As tMenuItem
Private m_iMenuCount As Long
Private m_sKey As String
Private m_hMenu As Long
Friend Property Get hMenu() As Long
hMenu = m_hMenu
End Property
Friend Property Let hMenu(ByVal l As Long)
m_hMenu = l
End Property
Friend Property Get Key() As String
Key = m_sKey
End Property
Friend Property Let Key(ByVal sKey As String)
m_sKey = sKey
End Property
Friend Sub Store(ByRef tMI() As tMenuItem, ByVal iMenuCount As Long)
Dim iItem As Long
m_iMenuCount = iMenuCount
If (m_iMenuCount > 0) Then
ReDim m_tMI(1 To m_iMenuCount) As tMenuItem
For iItem = 1 To m_iMenuCount
LSet m_tMI(iItem) = tMI(iItem)
Next iItem
Else
Erase m_tMI
End If
End Sub
Friend Sub Restore(ByRef tMI() As tMenuItem, ByRef iMenuCount As Long)
Dim iItem As Long
iMenuCount = m_iMenuCount
ReDim tMI(1 To m_iMenuCount) As tMenuItem
For iItem = 1 To m_iMenuCount
LSet tMI(iItem) = m_tMI(iItem)
Next iItem
End Sub