GFSkinEngine/GFSkinEngine_MENUfrm.frm

VERSION 5.00
Begin VB.Form GFSkinEngine_MENUfrm
   Caption         =   "GFSkinEngine_MENUfrm"
   ClientHeight    =   3195
   ClientLeft      =   165
   ClientTop       =   855
   ClientWidth     =   4635
   LinkTopic       =   "Form1"
   MouseIcon       =   "GFSkinEngine_MENUfrm.frx":0000
   MousePointer    =   99 'Benutzerdefiniert
   ScaleHeight     =   3195
   ScaleWidth      =   4635
   StartUpPosition =   3 'Windows‑Standard
   Begin VB.PictureBox MENUBrowsePicture
      AutoSize        =   ‑1 'True
      Height          =   255
      Index           =   0
      Left            =   420
      Picture         =   "GFSkinEngine_MENUfrm.frx":030A
      ScaleHeight     =   195
      ScaleWidth      =   195
      TabIndex        =   10
      Top             =   1140
      Width           =   255
   End
   Begin VB.PictureBox MENUSkinInfoPicture
      AutoSize        =   ‑1 'True
      Height          =   255
      Index           =   0
      Left            =   420
      Picture         =   "GFSkinEngine_MENUfrm.frx":081C
      ScaleHeight     =   195
      ScaleWidth      =   195
      TabIndex        =   9
      Top             =   65
      Width           =   255
   End
   Begin VB.PictureBox MENUSkinImportPicture
      AutoSize        =   ‑1 'True
      Height          =   255
      Index           =   0
      Left            =   420
      Picture         =   "GFSkinEngine_MENUfrm.frx":0A66
      ScaleHeight     =   195
      ScaleWidth      =   195
      TabIndex        =   8
      Top             =   780
      Width           =   255
   End
   Begin VB.PictureBox MENUSkinExportPicture
      AutoSize        =   ‑1 'True
      Height          =   255
      Index           =   0
      Left            =   420
      Picture         =   "GFSkinEngine_MENUfrm.frx":0CB0
      ScaleHeight     =   195
      ScaleWidth      =   195
      TabIndex        =   7
      Top             =   420
      Width           =   255
   End
   Begin VB.PictureBox MENUTitleBarPicture
      AutoSize        =   ‑1 'True
      Height          =   255
      Index           =   0
      Left            =   65
      Picture         =   "GFSkinEngine_MENUfrm.frx":0EFA
      ScaleHeight     =   195
      ScaleWidth      =   195
      TabIndex        =   6
      Top             =   1495
      Width           =   255
   End
   Begin VB.PictureBox MENUPicturePicture2
      AutoSize        =   ‑1 'True
      Height          =   255
      Index           =   0
      Left            =   60
      Picture         =   "GFSkinEngine_MENUfrm.frx":1144
      ScaleHeight     =   195
      ScaleWidth      =   195
      TabIndex        =   5
      Top             =   1140
      Width           =   255
   End
   Begin VB.PictureBox MENUPicturePicture
      AutoSize        =   ‑1 'True
      Height          =   255
      Index           =   0
      Left            =   60
      Picture         =   "GFSkinEngine_MENUfrm.frx":138E
      ScaleHeight     =   195
      ScaleWidth      =   195
      TabIndex        =   4
      Top             =   780
      Width           =   255
   End
   Begin VB.PictureBox MENUPositionPicture
      AutoSize        =   ‑1 'True
      Height          =   255
      Index           =   0
      Left            =   60
      Picture         =   "GFSkinEngine_MENUfrm.frx":15D8
      ScaleHeight     =   195
      ScaleWidth      =   195
      TabIndex        =   3
      Top             =   2220
      Width           =   255
   End
   Begin VB.PictureBox MENUColorPicture
      AutoSize        =   ‑1 'True
      Height          =   255
      Index           =   0
      Left            =   60
      Picture         =   "GFSkinEngine_MENUfrm.frx":1822
      ScaleHeight     =   195
      ScaleWidth      =   195
      TabIndex        =   2
      Top             =   60
      Width           =   255
   End
   Begin VB.PictureBox MENURegionPicture
      AutoSize        =   ‑1 'True
      Height          =   255
      Index           =   0
      Left            =   60
      Picture         =   "GFSkinEngine_MENUfrm.frx":1A6C
      ScaleHeight     =   195
      ScaleWidth      =   195
      TabIndex        =   1
      Top             =   1860
      Width           =   255
   End
   Begin VB.PictureBox MENUFontPicture
      AutoSize        =   ‑1 'True
      Height          =   255
      Index           =   0
      Left            =   60
      Picture         =   "GFSkinEngine_MENUfrm.frx":1CB6
      ScaleHeight     =   195
      ScaleWidth      =   195
      TabIndex        =   0
      Top             =   420
      Width           =   255
   End
   Begin VB.Menu Menu1
      Caption         =   "[M1]"
      Begin VB.Menu M1
         Caption         =   "Colors"
         Index           =   1
         Begin VB.Menu M2
            Caption         =   "Set System Fore Color..."
            Index           =   1
            Shortcut        =   +^{F1}
         End
         Begin VB.Menu M2
            Caption         =   "Set System Back Color..."
            Index           =   2
            Shortcut        =   +^{F2}
         End
         Begin VB.Menu M2
            Caption         =   "‑"
            Index           =   3
         End
         Begin VB.Menu M2
            Caption         =   "Enable Color Scheme"
            Index           =   4
         End
         Begin VB.Menu M2
            Caption         =   "Disable Color Scheme"
            Index           =   5
         End
         Begin VB.Menu M2
            Caption         =   "Set Color Scheme Color..."
            Index           =   6
         End
      End
      Begin VB.Menu M1
         Caption         =   "Font"
         Index           =   2
         Begin VB.Menu M6
            Caption         =   "Select System Font..."
            Index           =   1
            Shortcut        =   +^{F3}
         End
         Begin VB.Menu M6
            Caption         =   "‑"
            Index           =   2
         End
         Begin VB.Menu M6
            Caption         =   "List fonts used..."
            Index           =   3
         End
      End
      Begin VB.Menu M1
         Caption         =   "Back Picture"
         Index           =   3
         Begin VB.Menu M5
            Caption         =   "Import Back Picture..."
            Index           =   1
         End
         Begin VB.Menu M5
            Caption         =   "Enable"
            Index           =   2
         End
         Begin VB.Menu M5
            Caption         =   "Disable"
            Index           =   3
         End
      End
      Begin VB.Menu M1
         Caption         =   "Title Bar Picture"
         Index           =   4
         Begin VB.Menu M12
            Caption         =   "Set title bar picture..."
            Index           =   1
         End
      End
      Begin VB.Menu M1
         Caption         =   "Region"
         Index           =   5
         Begin VB.Menu M4
            Caption         =   "Change..."
            Index           =   1
         End
         Begin VB.Menu M4
            Caption         =   "Enable"
            Index           =   2
         End
         Begin VB.Menu M4
            Caption         =   "Disable"
            Index           =   3
         End
      End
      Begin VB.Menu M1
         Caption         =   "Position"
         Index           =   6
         Begin VB.Menu M3
            Caption         =   "Enable UserMove"
            Index           =   1
            Shortcut        =   +^{F11}
         End
         Begin VB.Menu M3
            Caption         =   "Disable UserMove"
            Index           =   2
            Shortcut        =   +^{F12}
         End
         Begin VB.Menu M3
            Caption         =   "‑"
            Index           =   3
         End
         Begin VB.Menu M3
            Caption         =   "Use Grid"
            Index           =   4
         End
         Begin VB.Menu M3
            Caption         =   "Show Control Info"
            Index           =   5
         End
         Begin VB.Menu M3
            Caption         =   "‑"
            Index           =   6
         End
         Begin VB.Menu M3
            Caption         =   "Move Controls Into Visible Area"
            Index           =   7
         End
         Begin VB.Menu M3
            Caption         =   "Fit Control Height To Font Height"
            Index           =   8
         End
         Begin VB.Menu M3
            Caption         =   "Get Window Size"
            Index           =   9
         End
         Begin VB.Menu M3
            Caption         =   "‑"
            Index           =   10
         End
         Begin VB.Menu M3
            Caption         =   "Tools"
            Index           =   11
            Begin VB.Menu M13
               Caption         =   "Frame Maker"
               Index           =   1
            End
         End
      End
      Begin VB.Menu M1
         Caption         =   "Skins"
         Index           =   7
         Begin VB.Menu M7
            Caption         =   "Change Skin..."
            Index           =   1
            Shortcut        =   +^{F5}
         End
         Begin VB.Menu M7
            Caption         =   "Next Skin"
            Index           =   2
            Shortcut        =   ^{F2}
         End
         Begin VB.Menu M7
            Caption         =   "Previous Skin"
            Index           =   3
            Shortcut        =   ^{F1}
         End
         Begin VB.Menu M7
            Caption         =   "‑"
            Index           =   4
         End
         Begin VB.Menu M7
            Caption         =   "Info..."
            Index           =   5
            Shortcut        =   +^{F6}
         End
         Begin VB.Menu M7
            Caption         =   "Copy (Back Up)..."
            Index           =   6
            Shortcut        =   +^{F7}
         End
         Begin VB.Menu M7
            Caption         =   "Delete..."
            Index           =   7
            Shortcut        =   +^{F8}
         End
         Begin VB.Menu M7
            Caption         =   "Browse"
            Index           =   8
         End
         Begin VB.Menu M7
            Caption         =   "‑"
            Index           =   9
         End
         Begin VB.Menu M7
            Caption         =   "Options"
            Index           =   10
            Begin VB.Menu M9
               Caption         =   "Random Skin at Start Up"
               Index           =   1
            End
            Begin VB.Menu M9
               Caption         =   "Display Random Skin Name"
               Index           =   2
            End
            Begin VB.Menu M9
               Caption         =   "Allow Picture Import"
               Enabled         =   0 'False
               Index           =   3
               Visible         =   0 'False
            End
         End
         Begin VB.Menu M7
            Caption         =   "‑"
            Index           =   11
         End
         Begin VB.Menu M7
            Caption         =   "[...]"
            Index           =   12
         End
         Begin VB.Menu M7
            Caption         =   "‑"
            Index           =   13
         End
         Begin VB.Menu M7
            Caption         =   "Begin my own skin..."
            Index           =   14
         End
         Begin VB.Menu M7
            Caption         =   "Export my skin for a friend..."
            Index           =   15
         End
         Begin VB.Menu M7
            Caption         =   "Import a skin of a friend..."
            Index           =   16
         End
      End
   End
   Begin VB.Menu Menu8
      Caption         =   "[M8]"
      Begin VB.Menu M8
         Caption         =   "<Base Skin>"
         Index           =   0
      End
   End
   Begin VB.Menu Menu10
      Caption         =   "[M10]"
      Begin VB.Menu M10
         Caption         =   "back picture..."
         Index           =   1
      End
   End
   Begin VB.Menu Menu11
      Caption         =   "[M11]"
      Begin VB.Menu M11
         Caption         =   "Special fore color..."
         Index           =   1
      End
      Begin VB.Menu M11
         Caption         =   "Special back color..."
         Index           =   2
      End
      Begin VB.Menu M11
         Caption         =   "Special font..."
         Index           =   3
      End
      Begin VB.Menu M11
         Caption         =   "Disable special properties"
         Index           =   4
      End
      Begin VB.Menu M11
         Caption         =   "‑"
         Index           =   5
      End
      Begin VB.Menu M11
         Caption         =   "Up Picture..."
         Index           =   6
      End
      Begin VB.Menu M11
         Caption         =   "Down Picture..."
         Index           =   7
      End
      Begin VB.Menu M11
         Caption         =   "Move Over Picture..."
         Index           =   8
      End
      Begin VB.Menu M11
         Caption         =   "Disable pictures"
         Index           =   9
      End
      Begin VB.Menu M11
         Caption         =   "‑"
         Index           =   10
      End
      Begin VB.Menu M11
         Caption         =   "Back Picture..."
         Index           =   11
      End
      Begin VB.Menu M11
         Caption         =   "Disable Back Picture"
         Index           =   12
      End
      Begin VB.Menu M11
         Caption         =   "‑"
         Index           =   13
      End
      Begin VB.Menu M11
         Caption         =   "Set Caption"
         Index           =   14
      End
      Begin VB.Menu M11
         Caption         =   "Get Control Size"
         Index           =   15
      End
      Begin VB.Menu M11
         Caption         =   "‑"
         Index           =   16
      End
      Begin VB.Menu M11
         Caption         =   "Properties..."
         Index           =   17
      End
   End
   Begin VB.Menu Menu14
      Caption         =   "[M14]"
      Begin VB.Menu M14
         Caption         =   "Skin Engine Debug Menu"
         Index           =   1
      End
      Begin VB.Menu M14
         Caption         =   "‑"
         Index           =   2
      End
      Begin VB.Menu M14
         Caption         =   "Import Current Skin"
         Index           =   3
      End
      Begin VB.Menu M14
         Caption         =   "‑"
         Index           =   4
      End
      Begin VB.Menu M14
         Caption         =   "Decrypt ContextHelpFile"
         Index           =   5
      End
      Begin VB.Menu M14
         Caption         =   "Encrypt ContextHelpFile"
         Index           =   6
      End
      Begin VB.Menu M14
         Caption         =   "‑"
         Index           =   7
      End
      Begin VB.Menu M14
         Caption         =   "Decrypt Any File"
         Index           =   8
      End
      Begin VB.Menu M14
         Caption         =   "Encrypt Any File"
         Index           =   9
      End
   End
End
Attribute VB_Name = "GFSkinEngine_MENUfrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'(c)2001 by Louis (reviewed 2002).
'
'NOTE: 'Allow Picture Import' is disabled and hidden so
'that the user cannot enable this feature (did not work correctly).
'
'NOTE: Ctrl‑Shift‑F4 is reserved for displaying current skin,
'do not use this short cut within any SE menu.
'The Skin Engine itself does not display the current skin's name,
'but it sends a message to the target project which will do the displaying.
'Ctrl‑Shift‑d is reserved as debug short cut.
'
'SE_EnableMenuBitmaps
Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetSubMenu Lib "user32" (ByVal hMenu As LongByVal nPos As Long) As Long
Private Declare Function GetMenuItemID Lib "user32" (ByVal hMenu As LongByVal nPos As Long) As Long
Private Declare Function SetMenuItemBitmaps Lib "user32" (ByVal hMenu As LongByVal nPosition As LongByVal wFlags As LongByVal hBitmapUnchecked As LongByVal hBitmapChecked As Long) As Long
'SE_EnableMenuBitmaps
Private Type MENUITEMINFO
    cbSize As Long
    fMask As Long
    fType As Long
    fState As Long
    wID As Long
    hSubMenu As Long
    hbmpChecked As Long
    hbmpUnchecked As Long
    dwItemData As Long
    dwTypeData As String
    cch As Long
End Type
'SE_EnableMenuBitmaps
Const MF_BITMAP = &H4&

Private Sub Form_Load()
    'on error resume next
    Call SE_EnableMenuBitmaps
End Sub

Private Sub SE_EnableMenuBitmaps()
    'on error resume next
    Const PictureSetIndex As Integer = 0
    '
    'NOTE: if you want to display new pictures (related to the target project)
    'in the menu then copy and paste all picture boxes (indices will be changed automatically),
    'select new pictures and finally change the PictureSetIndex value above.
    'Note that the bitmap handle passed to the API function must be valid as long as the
    'menu is displayed (multiple picture boxes must be used).
    '
    Dim MenuHandle As Long
    Dim SubMenuHandle1 As Long
    Dim SubMenuHandle2 As Long
    Dim SubMenuItemID As Long
    'preset
    MenuHandle = GetMenu(Me.hwnd)
    'begin
    SubMenuHandle1 = GetSubMenu(MenuHandle, 0)
    SubMenuHandle2 = GetSubMenu(SubMenuHandle1, 0)
    SubMenuItemID = GetMenuItemID(SubMenuHandle2, 0)
    Call SetMenuItemBitmaps(MenuHandle, SubMenuItemID, MF_BITMAP, MENUColorPicture(PictureSetIndex).Picture.Handle, MENUColorPicture(PictureSetIndex).Picture.Handle)
    '
    SubMenuHandle1 = GetSubMenu(MenuHandle, 0)
    SubMenuHandle2 = GetSubMenu(SubMenuHandle1, 1)
    SubMenuItemID = GetMenuItemID(SubMenuHandle2, 0)
    Call SetMenuItemBitmaps(MenuHandle, SubMenuItemID, MF_BITMAP, MENUFontPicture(PictureSetIndex).Picture.Handle, MENUFontPicture(PictureSetIndex).Picture.Handle)
    '
    SubMenuHandle1 = GetSubMenu(MenuHandle, 0)
    SubMenuHandle2 = GetSubMenu(SubMenuHandle1, 2)
    SubMenuItemID = GetMenuItemID(SubMenuHandle2, 0)
    Call SetMenuItemBitmaps(MenuHandle, SubMenuItemID, MF_BITMAP, MENUPicturePicture(PictureSetIndex).Picture.Handle, MENUPicturePicture(PictureSetIndex).Picture.Handle)
    'Menu3
    SubMenuHandle1 = GetSubMenu(MenuHandle, 2)
    'SubMenuHandle2 = GetSubMenu(SubMenuHandle1, 0)
    SubMenuItemID = GetMenuItemID(SubMenuHandle1, 0) '1 instead of 2
    Call SetMenuItemBitmaps(MenuHandle, SubMenuItemID, MF_BITMAP, MENUPicturePicture2(PictureSetIndex).Picture.Handle, MENUPicturePicture2(PictureSetIndex).Picture.Handle)
    'Menu1 again
    '
    SubMenuHandle1 = GetSubMenu(MenuHandle, 0)
    SubMenuHandle2 = GetSubMenu(SubMenuHandle1, 3)
    SubMenuItemID = GetMenuItemID(SubMenuHandle2, 0)
    Call SetMenuItemBitmaps(MenuHandle, SubMenuItemID, MF_BITMAP, MENUTitleBarPicture(PictureSetIndex).Picture.Handle, MENUTitleBarPicture(PictureSetIndex).Picture.Handle)
    '
    SubMenuHandle1 = GetSubMenu(MenuHandle, 0)
    SubMenuHandle2 = GetSubMenu(SubMenuHandle1, 4)
    SubMenuItemID = GetMenuItemID(SubMenuHandle2, 0)
    Call SetMenuItemBitmaps(MenuHandle, SubMenuItemID, MF_BITMAP, MENURegionPicture(PictureSetIndex).Picture.Handle, MENURegionPicture(PictureSetIndex).Picture.Handle)
    '
    SubMenuHandle1 = GetSubMenu(MenuHandle, 0)
    SubMenuHandle2 = GetSubMenu(SubMenuHandle1, 5)
    SubMenuItemID = GetMenuItemID(SubMenuHandle2, 0)
    Call SetMenuItemBitmaps(MenuHandle, SubMenuItemID, MF_BITMAP, MENUPositionPicture(PictureSetIndex).Picture.Handle, MENUPositionPicture(PictureSetIndex).Picture.Handle)
    '
    SubMenuHandle1 = GetSubMenu(MenuHandle, 0)
    SubMenuHandle2 = GetSubMenu(SubMenuHandle1, 6)
    SubMenuItemID = GetMenuItemID(SubMenuHandle2, 4)
    Call SetMenuItemBitmaps(MenuHandle, SubMenuItemID, MF_BITMAP, MENUSkinInfoPicture(PictureSetIndex).Picture.Handle, MENUSkinInfoPicture(PictureSetIndex).Picture.Handle)
    '
    SubMenuHandle1 = GetSubMenu(MenuHandle, 0)
    SubMenuHandle2 = GetSubMenu(SubMenuHandle1, 6)
    SubMenuItemID = GetMenuItemID(SubMenuHandle2, 7)
    Call SetMenuItemBitmaps(MenuHandle, SubMenuItemID, MF_BITMAP, MENUBrowsePicture(PictureSetIndex).Picture.Handle, MENUBrowsePicture(PictureSetIndex).Picture.Handle)
    '
    SubMenuHandle1 = GetSubMenu(MenuHandle, 0)
    SubMenuHandle2 = GetSubMenu(SubMenuHandle1, 6)
    SubMenuItemID = GetMenuItemID(SubMenuHandle2, 14)
    Call SetMenuItemBitmaps(MenuHandle, SubMenuItemID, MF_BITMAP, MENUSkinExportPicture(PictureSetIndex).Picture.Handle, MENUSkinExportPicture(PictureSetIndex).Picture.Handle)
    '
    SubMenuHandle1 = GetSubMenu(MenuHandle, 0)
    SubMenuHandle2 = GetSubMenu(SubMenuHandle1, 6)
    SubMenuItemID = GetMenuItemID(SubMenuHandle2, 15)
    Call SetMenuItemBitmaps(MenuHandle, SubMenuItemID, MF_BITMAP, MENUSkinImportPicture(PictureSetIndex).Picture.Handle, MENUSkinImportPicture(PictureSetIndex).Picture.Handle)
End Sub

Private Sub M2_Click(Index As Integer)
    'On Error Resume Next
    Call SE_ReceivePopUpMenu_Click(2, Index)
End Sub

Private Sub M3_Click(Index As Integer)
    'On Error Resume Next
    Call SE_ReceivePopUpMenu_Click(3, Index)
End Sub

Private Sub M4_Click(Index As Integer)
    'On Error Resume Next
    Call SE_ReceivePopUpMenu_Click(4, Index)
End Sub

Private Sub M5_Click(Index As Integer)
    'On Error Resume Next
    Call SE_ReceivePopUpMenu_Click(5, Index)
End Sub

Private Sub M6_Click(Index As Integer)
    'On Error Resume Next
    Call SE_ReceivePopUpMenu_Click(6, Index)
End Sub

Private Sub M7_Click(Index As Integer)
    'On Error Resume Next
    Call SE_ReceivePopUpMenu_Click(7, Index)
End Sub

Private Sub M8_Click(Index As Integer)
    'On Error Resume Next
    Call SE_ReceivePopUpMenu_Click(8, Index)
End Sub

Private Sub M9_Click(Index As Integer)
    'On Error Resume Next
    Call SE_ReceivePopUpMenu_Click(9, Index)
End Sub

Private Sub M10_Click(Index As Integer)
    'On Error Resume Next
    SE_FormMenuStructVar.ForcePopUpMenuClickProcessingFlag = True
    Call SE_ReceivePopUpMenu_Click(10, Index)
    SE_FormMenuStructVar.ForcePopUpMenuClickProcessingFlag = False 'reset
End Sub

Private Sub M11_Click(Index As Integer)
    'On Error Resume Next
    Call SE_ReceivePopUpMenu_Click(11, Index)
End Sub

Private Sub M12_Click(Index As Integer)
    'On Error Resume Next
    Call SE_ReceivePopUpMenu_Click(12, Index)
End Sub

Private Sub M13_Click(Index As Integer)
    'on error resume next
    Call SE_ReceivePopUpMenu_Click(13, Index)
End Sub

Private Sub M14_Click(Index As Integer)
    'on error resume next
    Call SE_ReceivePopUpMenu_Click(14, Index)
End Sub


[END OF FILE]