home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "Module1"
- Option Explicit
-
- Public Const RT_CURSOR = 1&
- Public Const RT_BITMAP = 2&
- Public Const RT_ICON = 3&
- Public Const RT_MENU = 4&
- Public Const RT_DIALOG = 5&
- Public Const RT_STRING = 6&
- Public Const RT_FONTDIR = 7&
- Public Const RT_FONT = 8&
- Public Const RT_ACCELERATOR = 9&
- Public Const RT_RCDATA = 10&
- Public Const RT_MESSAGETABLE = 11
- Public Const RT_GROUP_CURSOR = 12
- Public Const RT_GROUP_ICON = 14
- Public Const RT_VERSION = 16
- Public Const RT_DLGINCLUDE = 17
- Public Const RT_PLUGPLAY = 19
- Public Const RT_VXD = 20
-
- ' This callback represents the EnumResourceTypes callback
- ' hmod is the module handle.
- ' restype is the type.
- ' userdef is user defined.
- Public Function Callback1_cbxLLL(ByVal hmod As Long, ByVal restype As Long, ByVal userdef As Long) As Long
- ' If the high word is zero, this is a standard
- ' resource type.
- If (restype And &HFFFF0000) = 0 Then
- Select Case restype
- Case RT_CURSOR
- frmResource.lstTypes.AddItem "Cursors"
- Case RT_BITMAP
- frmResource.lstTypes.AddItem "Bitmaps"
- Case RT_ICON
- frmResource.lstTypes.AddItem "Icons"
- Case RT_MENU
- frmResource.lstTypes.AddItem "Menu"
- Case RT_DIALOG
- frmResource.lstTypes.AddItem "Dialog"
- Case RT_STRING
- frmResource.lstTypes.AddItem "String"
- Case RT_FONTDIR
- frmResource.lstTypes.AddItem "Font Directory"
- Case RT_FONT
- frmResource.lstTypes.AddItem "Font"
- Case RT_ACCELERATOR
- frmResource.lstTypes.AddItem "Accelerator"
- Case RT_RCDATA
- frmResource.lstTypes.AddItem "RCData"
- Case RT_MESSAGETABLE
- frmResource.lstTypes.AddItem "Message Table"
- Case RT_GROUP_CURSOR
- frmResource.lstTypes.AddItem "Cursor (hardware independent)"
- Case RT_GROUP_ICON
- frmResource.lstTypes.AddItem "Icon (hardware independent)"
- Case RT_VERSION
- frmResource.lstTypes.AddItem "Version"
- Case RT_PLUGPLAY
- frmResource.lstTypes.AddItem "Plug & Play Info"
- Case Else
- frmResource.lstTypes.AddItem Hex$(restype)
- End Select
- frmResource.lstTypes.ItemData(frmResource.lstTypes.NewIndex) = restype
- Else ' The resource type is defined by a string
- frmResource.lstTypes.AddItem agGetStringFromPointer(restype)
- frmResource.lstTypes.ItemData(frmResource.lstTypes.NewIndex) = 0
- End If
- Callback1_cbxLLL = True
- End Function
-
-
- ' The cbkNames callback is used for EnumResourceNames
- ' hmod is the module handle
- ' restype is the resource type
- ' resid is the resource name or id
- ' userdef is user defined
- Public Function cbkNames_cbxLLLL(ByVal hmod As Long, ByVal restype As Long, ByVal resid As Long, ByVal userdef As Long) As Long
- ' The resource has a name or identifier depending on whether
- ' the high word is zero.
- If (resid And &HFFFF0000) <> 0 Then
- ' Show the resource name
- frmResource.lstNames.AddItem agGetStringFromPointer(resid)
- Else
- ' Show the resource Identifier
- frmResource.lstNames.AddItem Hex$(resid)
- End If
- cbkNames_cbxLLLL = True
- End Function
-
-