Initial commit: ROW Client source code

Game client codebase including:
- CharacterActionControl: Character and creature management
- GlobalScript: Network, items, skills, quests, utilities
- RYLClient: Main client application with GUI and event handlers
- Engine: 3D rendering engine (RYLGL)
- MemoryManager: Custom memory allocation
- Library: Third-party dependencies (DirectX, boost, etc.)
- Tools: Development utilities

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-29 16:24:34 +09:00
commit e067522598
5135 changed files with 1745744 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
Type=Exe
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINNT\System32\stdole2.tlb#OLE Automation
Reference=*\G{78530B68-61F9-11D2-8CAD-00A024580902}#1.0#0#C:\WINNT\System32\qedit.dll#Dexter 1.0 Type Library
Reference=*\G{56A868B0-0AD4-11CE-B03A-0020AF0BA770}#1.0#0#C:\WINNT\System32\quartz.dll#ActiveMovie control type library
Reference=*\G{4E6CDE29-C0C4-11D0-8FF1-00C04FD9189D}#1.0#0#C:\WINNT\System32\amstream.dll#DirectShowStream 1.0 Type Library
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; comdlg32.ocx
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
Object={38911DA0-E448-11D0-84A3-00DD01104159}#1.1#0; COMCT332.OCX
Form=frmAbout.frm
Form=frmClip.frm
Form=frmTransitions.frm
Form=frmTimeline.frm
Form=frmGroup.frm
Form=frmComp.frm
Form=frmEffect.frm
Form=frmTrack.frm
Module=modGeneral; modGeneral.bas
Form=frmMain.frm
Module=modRegistry; modRegistry.bas
Module=modDexter; modDexter.bas
Module=modGlobalData; modGlobalData.bas
Class=VBQuartzHelper; QuartzHelper.cls
Module=modDisposable; modDisposable.bas
RelatedDoc=resources\doc\DexterVB.doc
IconForm="frmMain"
Startup="Sub Main"
HelpFile=""
Title="DexterVB"
ExeName32="VB_Dexter.exe"
Path32=""
Command32=""
Name="DexterVB"
HelpContextID="0"
Description="Microsoft Directshow Editing Services DexterVB Sample Application"
CompatibleMode="0"
MajorVer=8
MinorVer=1
RevisionVer=156
AutoIncrementVer=1
ServerSupportFiles=0
VersionCompanyName="Microsoft Corporation"
VersionFileDescription="Microsoft Directshow Editing Services DexterVB Sample Application"
VersionLegalCopyright="Copyright (C) 1999-2001 Microsoft Corporation."
VersionProductName="DexterVB"
CompilationType=0
OptimizationType=0
FavorPentiumPro(tm)=0
CodeViewDebugInfo=0
NoAliasing=0
BoundsCheck=0
OverflowCheck=0
FlPointCheck=0
FDIVCheck=0
UnroundedFP=0
StartMode=0
Unattended=0
Retained=0
ThreadPerObject=0
MaxNumberOfThreads=1
DebugStartupOption=0
[MS Transaction Server]
AutoRefresh=1

View File

@@ -0,0 +1,15 @@
frmAbout = 340, 249, 1217, 931, C, 220, 220, 749, 696, C
frmClip = 265, 261, 1204, 926, C, 277, 77, 731, 549, C
frmTransitions = 66, 66, 917, 842, C, 106, 16, 735, 677, C
frmTimeline = 90, 118, 1028, 845, C, 111, -2, 729, 545, C
frmGroup = 92, 139, 997, 793, C, 198, 198, 727, 674, C
frmComp = 154, 154, 1111, 760, C, 91, 75, 606, 398, C
frmEffect = 148, 135, 1064, 771, C, 22, 22, 551, 498, C
frmTrack = 184, 71, 977, 766, C, 44, 44, 573, 520, C
modGeneral = 192, 234, 890, 831,
frmMain = 209, 188, 789, 806, C, 0, 0, 0, 0, C
modRegistry = 211, 136, 1205, 862, C
modDexter = 151, 186, 917, 816, C
modGlobalData = 124, 98, 849, 788, C
VBQuartzHelper = 255, 142, 1233, 780,
modDisposable = 196, 276, 1118, 902, C

View File

@@ -0,0 +1,336 @@
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "VBQuartzHelper"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
'*******************************************************************************
'* This is a part of the Microsoft DXSDK Code Samples.
'* Copyright (C) 1999-2001 Microsoft Corporation.
'* All rights reserved.
'* This source code is only intended as a supplement to
'* Microsoft Development Tools and/or SDK documentation.
'* See these sources for detailed information regarding the
'* Microsoft samples programs.
'*******************************************************************************
Option Explicit
Option Base 0
Option Compare Text
'IMediaControl is used for async rendering & control;
'It is a derivitive interface of the FilterGraph Manager.
Private m_objFilterGraphManager As IMediaControl
' **************************************************************************************************************************************
' * PUBLIC INTERFACE- ENUMERATIONS
' *
' *
Public Enum QTZSynchronicityConstants
QTZSynchronous = 0 'Synchronous execution
QTZAsynchronous = 1 'Asynchronous execution
End Enum
Public Enum QTZStatusConstants
QTZStatusStopped = 0 'State Stopped
QTZStatusPaused = 1 'State Paused
QTZStatusPlaying = 2 'State Playing
End Enum
' **************************************************************************************************************************************
' * PUBLIC INTERFACE- PROPERTIES
' *
' *
' ******************************************************************************************************************************
' * procedure name: FilterGraph
' * procedure description: Allows the client to get the encapsulated graph as a FilterGraph object
' *
' ******************************************************************************************************************************
Public Property Get FilterGraph() As FilgraphManager
Attribute FilterGraph.VB_UserMemId = 0
Attribute FilterGraph.VB_MemberFlags = "200"
On Local Error GoTo ErrLine
If Not m_objFilterGraphManager Is Nothing Then
Set FilterGraph = m_objFilterGraphManager
End If
Exit Property
ErrLine:
Err.Clear
Exit Property
End Property
' ******************************************************************************************************************************
' * procedure name: FilterGraph
' * procedure description: Allows the client to set a constructed FilterGraph object for which to render and control.
' *
' ******************************************************************************************************************************
Public Property Set FilterGraph(RHS As FilgraphManager)
On Local Error GoTo ErrLine
If Not RHS Is Nothing Then
Set m_objFilterGraphManager = RHS
End If
Exit Property
ErrLine:
Err.Clear
Exit Property
End Property
' ******************************************************************************************************************************
' * procedure name: Position
' * procedure description: Allows the client to get the current position within the context of the media.
' *
' ******************************************************************************************************************************
Public Property Get Position() As Double
Dim objPosition As IMediaPosition
On Local Error GoTo ErrLine
If Not m_objFilterGraphManager Is Nothing Then
'derive the position control interface
Set objPosition = m_objFilterGraphManager
'set the current position using this interface
Position = CDbl(objPosition.CurrentPosition)
End If
Exit Property
ErrLine:
Err.Clear
Exit Property
End Property
' ******************************************************************************************************************************
' * procedure name: Position
' * procedure description: Allows the client to set the current position within the context of the media.
' *
' ******************************************************************************************************************************
Public Property Let Position(RHS As Double)
Dim objPosition As IMediaPosition
On Local Error GoTo ErrLine
If Not m_objFilterGraphManager Is Nothing Then
'derive the position control interface
Set objPosition = m_objFilterGraphManager
'set the current position using this interface
objPosition.CurrentPosition = RHS
End If
Exit Property
ErrLine:
Err.Clear
Exit Property
End Property
' ******************************************************************************************************************************
' * procedure name: Position
' * procedure description: Allows the client to get the current state of the playback.
' *
' ******************************************************************************************************************************
Public Property Get State(Optional Timeout As Long = 1000) As QTZStatusConstants
Dim nResultant As Long
Dim objControl As IMediaControl
On Local Error GoTo ErrLine
If Not m_objFilterGraphManager Is Nothing Then
'derive the position control interface
Set objControl = m_objFilterGraphManager
'get the current state using this interface
Call objControl.GetState(Timeout, nResultant)
'return to client
State = nResultant
End If
Exit Property
ErrLine:
Err.Clear
Exit Property
End Property
' ******************************************************************************************************************************
' * procedure name: Duration
' * procedure description: Allows the client to get the media's duration.
' *
' ******************************************************************************************************************************
Public Property Get Duration() As Double
Dim objPosition As IMediaPosition
On Local Error GoTo ErrLine
If Not m_objFilterGraphManager Is Nothing Then
Set objPosition = m_objFilterGraphManager
Duration = CDbl(objPosition.Duration)
End If
Exit Property
ErrLine:
Err.Clear
Exit Property
End Property
' ******************************************************************************************************************************
' * procedure name: FPS
' * procedure description: Allows the client to get the media's playback rate, in frames per second.
' *
' ******************************************************************************************************************************
Public Property Get FPS() As Double
Dim objPosition As IMediaPosition
On Local Error GoTo ErrLine
If Not m_objFilterGraphManager Is Nothing Then
Set objPosition = m_objFilterGraphManager
FPS = CDbl(objPosition.Rate)
End If
Exit Property
ErrLine:
Err.Clear
Exit Property
End Property
' ******************************************************************************************************************************
' * procedure name: StopTime
' * procedure description: Allows the client to get the media's StopTime (when the media will hault playback)
' *
' ******************************************************************************************************************************
Public Property Get StopTime() As Double
Dim objPosition As IMediaPosition
On Local Error GoTo ErrLine
If Not m_objFilterGraphManager Is Nothing Then
Set objPosition = m_objFilterGraphManager
StopTime = CDbl(objPosition.StopTime)
End If
Exit Property
ErrLine:
Err.Clear
Exit Property
End Property
' **************************************************************************************************************************************
' * PUBLIC INTERFACE- METHODS
' *
' *
' ******************************************************************************************************************************
' * procedure name: StopGraph
' * procedure description: Stop the rendering/playback of the graph.
' *
' ******************************************************************************************************************************
Public Sub StopGraph()
On Local Error GoTo ErrLine
If Not m_objFilterGraphManager Is Nothing Then
Call m_objFilterGraphManager.Stop
End If
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: PauseGraph
' * procedure description: Pauses the rendering/playback of the graph.
' *
' ******************************************************************************************************************************
Public Sub PauseGraph()
On Local Error GoTo ErrLine
If Not m_objFilterGraphManager Is Nothing Then
Call m_objFilterGraphManager.Pause
End If
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: RunGraph
' * procedure description: Renders the graph.
' *
' ******************************************************************************************************************************
Public Sub RunGraph(Optional Synchronicity As QTZSynchronicityConstants = QTZAsynchronous)
Dim objPosition As IMediaPosition
Dim objControl As IMediaControl
On Local Error GoTo ErrLine
If Not m_objFilterGraphManager Is Nothing Then
Select Case Synchronicity
Case QTZSynchronicityConstants.QTZSynchronous
'run the graph
Call m_objFilterGraphManager.Run
'obtain the position of audio/video
Set objPosition = m_objFilterGraphManager
'loop with events
Do: DoEvents
If objPosition.CurrentPosition = objPosition.StopTime Then
Call m_objFilterGraphManager.Stop
Exit Do
End If
Loop
Case QTZSynchronicityConstants.QTZAsynchronous
'the client desires to run the graph asynchronously
Call m_objFilterGraphManager.Run
End Select
End If
'clean-up & dereference
If Not objPosition Is Nothing Then Set objPosition = Nothing
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' **************************************************************************************************************************************
' * PUBLIC INTERFACE- METHODS
' *
' *
' ******************************************************************************************************************************
' * procedure name: Class_Initialize
' * procedure description: fired intrinsically by visual basic, occurs when this class initalizes
' *
' ******************************************************************************************************************************
Private Sub Class_Initialize()
On Local Error GoTo ErrLine
Set m_objFilterGraphManager = New FilgraphManager
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: Class_Terminate
' * procedure description: fired intrinsically by visual basic, occurs when this class terminates
' *
' ******************************************************************************************************************************
Private Sub Class_Terminate()
On Local Error GoTo ErrLine
If Not m_objFilterGraphManager Is Nothing Then Set m_objFilterGraphManager = Nothing
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub

View File

@@ -0,0 +1,236 @@
VERSION 5.00
Begin VB.Form frmAbout
BorderStyle = 3 'Fixed Dialog
Caption = "About Dexter VB Sample"
ClientHeight = 3555
ClientLeft = 60
ClientTop = 345
ClientWidth = 5730
ClipControls = 0 'False
Icon = "frmAbout.frx":0000
LinkTopic = "Form2"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2453.724
ScaleMode = 0 'User
ScaleWidth = 5380.766
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.PictureBox picIcon
AutoSize = -1 'True
ClipControls = 0 'False
Height = 540
Left = 240
Picture = "frmAbout.frx":030A
ScaleHeight = 337.12
ScaleMode = 0 'User
ScaleWidth = 337.12
TabIndex = 1
Top = 240
Width = 540
End
Begin VB.CommandButton cmdOK
Cancel = -1 'True
Caption = "OK"
Default = -1 'True
Height = 345
Left = 4245
TabIndex = 0
Top = 2625
Width = 1260
End
Begin VB.CommandButton cmdSysInfo
Caption = "&System Info..."
Height = 345
Left = 4260
TabIndex = 2
Top = 3075
Width = 1245
End
Begin VB.Line Line1
BorderColor = &H00808080&
BorderStyle = 6 'Inside Solid
Index = 1
X1 = 84.515
X2 = 5309.398
Y1 = 1687.583
Y2 = 1687.583
End
Begin VB.Label lblDescription
Caption = "Copyright (C) 1999-2001 Microsoft Corporation"
ForeColor = &H00000000&
Height = 1170
Left = 1050
TabIndex = 3
Top = 825
Width = 3885
End
Begin VB.Label lblTitle
Caption = "VB Dexter Sample Application"
ForeColor = &H00000000&
Height = 255
Left = 1050
TabIndex = 5
Top = 240
Width = 3885
End
Begin VB.Line Line1
BorderColor = &H00FFFFFF&
BorderWidth = 2
Index = 0
X1 = 98.6
X2 = 5309.398
Y1 = 1697.936
Y2 = 1697.936
End
Begin VB.Label lblVersion
Caption = "Version 1.0"
Height = 225
Left = 1050
TabIndex = 6
Top = 525
Width = 3885
End
Begin VB.Label lblDisclaimer
Caption = "Warning: You must have DX8 or newer."
ForeColor = &H00000000&
Height = 825
Left = 255
TabIndex = 4
Top = 2625
Width = 3870
End
End
Attribute VB_Name = "frmAbout"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*******************************************************************************
'* This is a part of the Microsoft DXSDK Code Samples.
'* Copyright (C) 1999-2001 Microsoft Corporation.
'* All rights reserved.
'* This source code is only intended as a supplement to
'* Microsoft Development Tools and/or SDK documentation.
'* See these sources for detailed information regarding the
'* Microsoft samples programs.
'*******************************************************************************
Option Explicit
Option Base 0
Option Compare Text
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- FORM EVENT HANDLERS
' *
' *
' ******************************************************************************************************************************
' * procedure name: Form_Load
' * procedure description: Occurs when a form is loaded.
' *
' ******************************************************************************************************************************
Private Sub Form_Load()
On Local Error GoTo ErrLine
Me.Caption = "About " & App.Title: lblTitle.Caption = App.Title
lblVersion.Caption = "Version " & CStr(App.Major) & "." & CStr(App.Minor) & "." & CStr(App.Revision)
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: Form_QueryUnload
' * procedure description: Occurs before a form or application closes.
' *
' ******************************************************************************************************************************
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
On Local Error GoTo ErrLine
Select Case UnloadMode
Case vbFormControlMenu
'0 The user chose the Close command from the Control menu on the form.
Case vbFormCode
'1 The Unload statement is invoked from code.
Case vbAppWindows
'2 The current Microsoft Windows operating environment session is ending.
Case vbAppTaskManager
'3 The Microsoft Windows Task Manager is closing the application.
End
Case vbFormMDIForm
'4 An MDI child form is closing because the MDI form is closing.
Case vbFormOwner
'5 A form is closing because its owner is closing
End Select
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: Form_Unload
' * procedure description: Occurs when a form is about to be removed from the screen.
' *
' ******************************************************************************************************************************
Private Sub Form_Unload(Cancel As Integer)
On Local Error GoTo ErrLine
With Me
.Move 0 - (Screen.Width * 8), 0 - (Screen.Height * 8): .Visible = False
End With
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- CONTROL EVENT HANDLERS
' *
' *
' ******************************************************************************************************************************
' * procedure name: cmdSysInfo_Click
' * procedure description: occures when the 'System Information' command button is pressed
' *
' ******************************************************************************************************************************
Private Sub cmdSysInfo_Click()
Dim bstrSysInfoPath As String
On Local Error GoTo ErrLine
'query the registry for a path to msinfo.exe, and execute the application for the user
If Registry_DoesKeyExist(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Shared Tools\MSINFO") Then
bstrSysInfoPath = Registry_QueryEntryValue(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Shared Tools\MSINFO", "Path", vbNullString)
Call Shell(bstrSysInfoPath, vbNormalFocus)
End If
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: cmdOK_Click
' * procedure description: occures when the 'ok' command button is pressed
' *
' ******************************************************************************************************************************
Private Sub cmdOk_Click()
On Local Error GoTo ErrLine
Unload Me
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub

View File

@@ -0,0 +1,544 @@
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Begin VB.Form frmClip
Caption = "Clip Menu"
ClientHeight = 5715
ClientLeft = 60
ClientTop = 345
ClientWidth = 7005
Icon = "frmClip.frx":0000
LinkTopic = "Form2"
LockControls = -1 'True
ScaleHeight = 5715
ScaleWidth = 7005
StartUpPosition = 1 'CenterOwner
Begin VB.CommandButton cmdOK
Caption = "OK"
Default = -1 'True
Height = 340
Left = 4500
TabIndex = 11
Top = 5325
Width = 1095
End
Begin VB.CommandButton cmdCancel
Caption = "Cancel"
Height = 340
Left = 5700
TabIndex = 12
Top = 5325
Width = 1215
End
Begin VB.Frame fraFixture
Height = 5190
Left = 75
TabIndex = 13
Top = 0
Width = 6840
Begin VB.TextBox txtMediaName
Height = 375
Left = 1470
Locked = -1 'True
TabIndex = 0
Top = 300
Width = 3975
End
Begin VB.TextBox txtMStart
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1470
TabIndex = 2
Top = 780
Width = 3975
End
Begin VB.TextBox txtMStop
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1470
TabIndex = 3
Top = 1260
Width = 3975
End
Begin VB.TextBox txtTStart
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1470
TabIndex = 4
Top = 1740
Width = 3975
End
Begin VB.TextBox txtTStop
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1470
TabIndex = 5
Top = 2220
Width = 3975
End
Begin VB.TextBox txtMediaLength
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1470
TabIndex = 6
Top = 2700
Width = 3975
End
Begin VB.TextBox txtStreamNumber
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1470
TabIndex = 7
Top = 3180
Width = 3975
End
Begin VB.TextBox txtFPS
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1470
TabIndex = 8
Top = 3660
Width = 3975
End
Begin VB.TextBox txtStretchMode
BeginProperty DataFormat
Type = 5
Format = ""
HaveTrueFalseNull= 1
TrueValue = "1"
FalseValue = "0"
NullValue = ""
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 7
EndProperty
Height = 375
Left = 1470
TabIndex = 9
Top = 4140
Width = 3975
End
Begin VB.TextBox txtMuted
BeginProperty DataFormat
Type = 5
Format = ""
HaveTrueFalseNull= 1
TrueValue = "1"
FalseValue = "0"
NullValue = ""
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 7
EndProperty
Height = 375
Left = 1470
TabIndex = 10
Top = 4620
Width = 3975
End
Begin VB.CommandButton cmdBrowse
Caption = "Browse"
Height = 375
Left = 5670
TabIndex = 1
Top = 300
Width = 975
End
Begin VB.Label lblMediaName
Caption = "MediaName"
Height = 255
Left = 150
TabIndex = 23
Top = 420
Width = 1095
End
Begin VB.Label lblMStart
Caption = "MStart"
Height = 255
Left = 150
TabIndex = 22
Top = 900
Width = 735
End
Begin VB.Label lblMStop
Caption = "MStop"
Height = 255
Left = 150
TabIndex = 21
Top = 1380
Width = 615
End
Begin VB.Label lblTStart
Caption = "TStart"
Height = 255
Left = 150
TabIndex = 20
Top = 1860
Width = 615
End
Begin VB.Label lblTStop
Caption = "TStop"
Height = 255
Left = 150
TabIndex = 19
Top = 2340
Width = 615
End
Begin VB.Label lblMediaLength
Caption = "MediaLength"
Height = 255
Left = 150
TabIndex = 18
Top = 2820
Width = 975
End
Begin VB.Label lblStreamNumber
Caption = "StreamNumber"
Height = 255
Left = 150
TabIndex = 17
Top = 3300
Width = 1215
End
Begin VB.Label lblFPS
Caption = "FPS"
Height = 255
Left = 150
TabIndex = 16
Top = 3780
Width = 375
End
Begin VB.Label lblStretchMode
Caption = "StretchMode"
Height = 255
Left = 150
TabIndex = 15
Top = 4260
Width = 975
End
Begin VB.Label lblMuted
Caption = "Muted"
Height = 255
Left = 150
TabIndex = 14
Top = 4740
Width = 495
End
End
Begin MSComDlg.CommonDialog dlgCommonDialog2
Left = 75
Top = 5250
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
End
Attribute VB_Name = "frmClip"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*******************************************************************************
'* This is a part of the Microsoft DXSDK Code Samples.
'* Copyright (C) 1999-2001 Microsoft Corporation.
'* All rights reserved.
'* This source code is only intended as a supplement to
'* Microsoft Development Tools and/or SDK documentation.
'* See these sources for detailed information regarding the
'* Microsoft samples programs.
'*******************************************************************************
Option Explicit
Option Base 0
Option Compare Text
Private m_intUnloadMode As Integer
Private Const DIALOG_TITLE = "Clip Help"
' **************************************************************************************************************************************
' * PUBLIC INTERFACE- PROPERTIES
' *
' *
' ******************************************************************************************************************************
' * procedure name: UnloadMode
' * procedure description: Returns an integer specifying the method from which this dialog was last unloaded
' *
' ******************************************************************************************************************************
Public Property Get UnloadMode() As Integer
On Local Error GoTo ErrLine
'return the value to the client
UnloadMode = m_intUnloadMode
Exit Property
ErrLine:
Err.Clear
Exit Property
End Property
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- FORM EVENT HANDLERS
' *
' *
' ******************************************************************************************************************************
' * procedure name: Form_Load
' * procedure description: Occurs when a form is loaded.
' *
' ******************************************************************************************************************************
Private Sub Form_Load()
On Local Error GoTo ErrLine
'set default value(s)
With Me
.txtMediaName.Text = vbNullString
.txtMStart.Text = vbNullString
.txtMStop.Text = vbNullString
.txtTStart.Text = vbNullString
.txtTStop.Text = vbNullString
.txtMediaLength.Text = vbNullString
.txtStreamNumber.Text = vbNullString
.txtFPS.Text = vbNullString
.txtStretchMode.Text = vbNullString
.txtMuted.Text = vbNullString
End With
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: Form_QueryUnload
' * procedure description: Occurs before a form or application closes.
' *
' ******************************************************************************************************************************
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
On Local Error GoTo ErrLine
Select Case UnloadMode
Case vbFormControlMenu
'0 The user chose the Close command from the Control menu on the form.
Cancel = 1: Me.Visible = False
Case vbFormCode
'1 The Unload statement is invoked from code.
Case vbAppWindows
'2 The current Microsoft Windows operating environment session is ending.
Case vbAppTaskManager
'3 The Microsoft Windows Task Manager is closing the application.
End
Case vbFormMDIForm
'4 An MDI child form is closing because the MDI form is closing.
Case vbFormOwner
'5 A form is closing because its owner is closing
End Select
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: Form_Unload
' * procedure description: Occurs when a form is about to be removed from the screen.
' *
' ******************************************************************************************************************************
Private Sub Form_Unload(Cancel As Integer)
On Local Error GoTo ErrLine
With Me
.Move 0 - (Screen.Width * 8), 0 - (Screen.Height * 8): .Visible = False
End With
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- CONTROL EVENT HANDLERS
' *
' *
' ******************************************************************************************************************************
' * procedure name: cmdOk_Click
' * procedure description: occures when the 'Ok' command button is pressed; proceed to validate user input
' *
' ******************************************************************************************************************************
Private Sub cmdOk_Click()
Dim nResultant As VbMsgBoxResult
On Local Error GoTo ErrLine
'validation code
If Me.txtMediaName.Text = vbNullString Then
nResultant = MsgBox("You Must Select A File Name", , DIALOG_TITLE)
Me.txtMediaName.SetFocus
Exit Sub
End If
If Me.txtMStart.Text = vbNullString Then
nResultant = MsgBox("You Must Set MStart", , DIALOG_TITLE)
Me.txtMStart.SetFocus
Exit Sub
End If
If Me.txtMStop.Text = vbNullString Then
nResultant = MsgBox("You Must Set MStop", , DIALOG_TITLE)
Me.txtMStop.SetFocus
Exit Sub
End If
If Me.txtTStart.Text = vbNullString Then
nResultant = MsgBox("You Must Set TStart", , DIALOG_TITLE)
Me.txtTStart.SetFocus
Exit Sub
End If
If Me.txtTStop.Text = vbNullString Then
nResultant = MsgBox("You Must Set TStop", , DIALOG_TITLE)
Me.txtTStop.SetFocus
Exit Sub
End If
If Me.txtMediaLength.Text = vbNullString Then
nResultant = MsgBox("You Must Set MediaLength", , DIALOG_TITLE)
Me.txtMediaLength.SetFocus
Exit Sub
End If
If Me.txtStreamNumber.Text = vbNullString Then
nResultant = MsgBox("You Must Set StreamNumber", , DIALOG_TITLE)
Me.txtStreamNumber.SetFocus
Exit Sub
End If
If Me.txtFPS.Text = vbNullString Then
nResultant = MsgBox("You Must Set FPS", , DIALOG_TITLE)
Me.txtFPS.SetFocus
Exit Sub
End If
If Me.txtStretchMode.Text = vbNullString Then
nResultant = MsgBox("You Must Set StretchMode", , DIALOG_TITLE)
Me.txtStretchMode.SetFocus
Exit Sub
End If
If Me.txtMuted.Text = vbNullString Then
nResultant = MsgBox("You Must Set Muted", , DIALOG_TITLE)
Me.txtMuted.SetFocus
Exit Sub
End If
If CLng(Me.txtMStart.Text) > CLng(Me.txtMStop.Text) Then
nResultant = MsgBox("MStart Must Be Lower Then MStop", , DIALOG_TITLE)
Me.txtMStart.SetFocus
Exit Sub
End If
If CLng(Me.txtTStart.Text) > CLng(Me.txtTStop.Text) Then
nResultant = MsgBox("TStart Must Be Lower Then TStop", , DIALOG_TITLE)
Me.txtTStart.SetFocus
Exit Sub
End If
'hide the dialog
Me.Visible = False
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: cmdCancel_Click
' * procedure description: occures when the 'Cancel' command button is pressed
' *
' ******************************************************************************************************************************
Private Sub cmdCancel_Click()
On Local Error GoTo ErrLine
'hide the dialog
Me.Visible = False
m_intUnloadMode = 1
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: cmdBrowse_Click
' * procedure description: occures when the 'Browse' command button is pressed
' *
' ******************************************************************************************************************************
Private Sub cmdBrowse_Click()
Dim bstrFilename As String
On Local Error GoTo ErrLine
'request a filename from the user..
bstrFilename = ShowCommonDlgOpen(, vbNullString, "Media Files(*.asf, *.avi, *.au, *.mpeg, *.mpg, *.wav)")
'validate the user's input from the common dialog
If Len(bstrFilename) = 0 Then
Exit Sub
Else: Me.txtMediaName.Text = bstrFilename
End If
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub

View File

@@ -0,0 +1,293 @@
VERSION 5.00
Begin VB.Form frmComp
Caption = "Composite Menu"
ClientHeight = 2505
ClientLeft = 60
ClientTop = 345
ClientWidth = 5790
Icon = "frmComp.frx":0000
LinkTopic = "Form2"
LockControls = -1 'True
ScaleHeight = 2505
ScaleWidth = 5790
StartUpPosition = 1 'CenterOwner
Begin VB.Frame fraFixture
Height = 1965
Left = 75
TabIndex = 5
Top = 0
Width = 5640
Begin VB.TextBox txtPriority
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1470
TabIndex = 0
Top = 300
Width = 3975
End
Begin VB.TextBox txtStartTime
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1470
TabIndex = 1
Top = 780
Width = 3975
End
Begin VB.TextBox txtStopTime
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1470
TabIndex = 2
Top = 1260
Width = 3975
End
Begin VB.Label lblPriority
Caption = "Priority"
Height = 255
Left = 150
TabIndex = 8
Top = 420
Width = 1095
End
Begin VB.Label lblStart
Caption = "Start"
Height = 255
Left = 150
TabIndex = 7
Top = 900
Width = 1095
End
Begin VB.Label lblStop
Caption = "Stop"
Height = 255
Left = 150
TabIndex = 6
Top = 1380
Width = 615
End
End
Begin VB.CommandButton cmdOk
Caption = "OK"
Default = -1 'True
Height = 340
Left = 3270
TabIndex = 3
Top = 2070
Width = 1095
End
Begin VB.CommandButton cmdCancel
Caption = "Cancel"
Height = 340
Left = 4470
TabIndex = 4
Top = 2070
Width = 1215
End
End
Attribute VB_Name = "frmComp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*******************************************************************************
'* This is a part of the Microsoft DXSDK Code Samples.
'* Copyright (C) 1999-2001 Microsoft Corporation.
'* All rights reserved.
'* This source code is only intended as a supplement to
'* Microsoft Development Tools and/or SDK documentation.
'* See these sources for detailed information regarding the
'* Microsoft samples programs.
'*******************************************************************************
Option Explicit
Option Base 0
Option Compare Text
Private m_intUnloadMode As Integer
Private Const DIALOG_TITLE = "Composition Help"
' **************************************************************************************************************************************
' * PUBLIC INTERFACE- PROPERTIES
' *
' *
' ******************************************************************************************************************************
' * procedure name: UnloadMode
' * procedure description: Returns an integer specifying the method from which this dialog was last unloaded
' *
' ******************************************************************************************************************************
Public Property Get UnloadMode() As Integer
On Local Error GoTo ErrLine
'return the value to the client
UnloadMode = m_intUnloadMode
Exit Property
ErrLine:
Err.Clear
Exit Property
End Property
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- FORM EVENT HANDLERS
' *
' *
' ******************************************************************************************************************************
' * procedure name: Form_Load
' * procedure description: Occurs when a form is loaded.
' *
' ******************************************************************************************************************************
Private Sub Form_Load()
On Local Error GoTo ErrLine
'set default value(s)
With Me
.txtPriority.Text = vbNullString
.txtStartTime.Text = vbNullString
.txtStopTime.Text = vbNullString
End With
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: Form_QueryUnload
' * procedure description: Occurs before a form or application closes.
' *
' ******************************************************************************************************************************
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
On Local Error GoTo ErrLine
Select Case UnloadMode
Case vbFormControlMenu
'0 The user chose the Close command from the Control menu on the form.
Cancel = 1: Me.Visible = False
Case vbFormCode
'1 The Unload statement is invoked from code.
Case vbAppWindows
'2 The current Microsoft Windows operating environment session is ending.
Case vbAppTaskManager
'3 The Microsoft Windows Task Manager is closing the application.
End
Case vbFormMDIForm
'4 An MDI child form is closing because the MDI form is closing.
Case vbFormOwner
'5 A form is closing because its owner is closing
End Select
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: Form_Unload
' * procedure description: Occurs when a form is about to be removed from the screen.
' *
' ******************************************************************************************************************************
Private Sub Form_Unload(Cancel As Integer)
On Local Error GoTo ErrLine
With Me
.Move 0 - (Screen.Width * 8), 0 - (Screen.Height * 8): .Visible = False
End With
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- CONTROL EVENT HANDLERS
' *
' *
' ******************************************************************************************************************************
' * procedure name: cmdOK_Click
' * procedure description: occures when the user clicks the 'Ok' command button
' *
' ******************************************************************************************************************************
Private Sub cmdOk_Click()
Dim nResultant As VbMsgBoxResult
On Local Error GoTo ErrLine
'validation code
If frmComp.txtPriority.Text = vbNullString Then
nResultant = MsgBox("You Must Set Priority", , DIALOG_TITLE)
frmComp.txtPriority.SetFocus
Exit Sub
End If
If frmComp.txtStartTime.Text = vbNullString Then
nResultant = MsgBox("You Must Set Start", , DIALOG_TITLE)
frmComp.txtStartTime.SetFocus
Exit Sub
End If
If frmComp.txtStopTime.Text = vbNullString Then
nResultant = MsgBox("You Must Set Stop", , DIALOG_TITLE)
frmComp.txtStopTime.SetFocus
Exit Sub
End If
If IsNumeric(frmComp.txtStartTime.Text) And IsNumeric(frmComp.txtStopTime.Text) Then
If CLng(frmComp.txtStartTime.Text) > CLng(frmComp.txtStopTime.Text) Then
nResultant = MsgBox("Start Must Be Lower Than Stop", , DIALOG_TITLE)
frmComp.txtStartTime.SetFocus
Exit Sub
End If
End If
'hide the dialog
Me.Visible = False
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: cmdCancel_Click
' * procedure description: occures when the user clicks the 'Cancel' command button
' *
' ******************************************************************************************************************************
Private Sub cmdCancel_Click()
On Local Error GoTo ErrLine
'hide the dialog
Me.Visible = False
m_intUnloadMode = 1
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub

View File

@@ -0,0 +1,272 @@
VERSION 5.00
Begin VB.Form frmEffect
Caption = "Effect Form"
ClientHeight = 2640
ClientLeft = 60
ClientTop = 345
ClientWidth = 6045
Icon = "frmEffect.frx":0000
LinkTopic = "Form2"
LockControls = -1 'True
ScaleHeight = 2640
ScaleWidth = 6045
StartUpPosition = 1 'CenterOwner
Begin VB.Frame fraFixture
Height = 2115
Left = 75
TabIndex = 7
Top = 0
Width = 5865
Begin VB.TextBox txtStartTime
Height = 375
Left = 1710
TabIndex = 1
Top = 695
Width = 3975
End
Begin VB.TextBox txtStopTime
Height = 375
Left = 1710
TabIndex = 2
Top = 1140
Width = 3975
End
Begin VB.ComboBox cmbEffect
Height = 315
Left = 1710
Sorted = -1 'True
TabIndex = 0
Top = 300
Width = 3975
End
Begin VB.TextBox txtPriority
Height = 375
Left = 1710
TabIndex = 3
ToolTipText = "-1"
Top = 1600
Width = 3975
End
Begin VB.Label lblEffect
Caption = "Effect"
Height = 255
Left = 150
TabIndex = 11
Top = 300
Width = 1695
End
Begin VB.Label lblStart
Caption = "Start"
Height = 255
Left = 150
TabIndex = 10
Top = 780
Width = 1095
End
Begin VB.Label lblStop
Caption = "Stop"
Height = 255
Left = 150
TabIndex = 9
Top = 1260
Width = 615
End
Begin VB.Label lblPriority
Caption = "Priority"
Height = 255
Left = 150
TabIndex = 8
Top = 1740
Width = 615
End
End
Begin VB.CommandButton cmdOk
Caption = "OK"
Default = -1 'True
Height = 340
Left = 3540
TabIndex = 4
Top = 2220
Width = 1095
End
Begin VB.CommandButton cmdCancel
Caption = "Cancel"
Height = 340
Left = 4740
TabIndex = 5
Top = 2220
Width = 1215
End
Begin VB.TextBox GetSubObjectGUIDB
Height = 375
Left = 4650
TabIndex = 6
Top = 2775
Visible = 0 'False
Width = 1335
End
End
Attribute VB_Name = "frmEffect"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*******************************************************************************
'* This is a part of the Microsoft DXSDK Code Samples.
'* Copyright (C) 1999-2001 Microsoft Corporation.
'* All rights reserved.
'* This source code is only intended as a supplement to
'* Microsoft Development Tools and/or SDK documentation.
'* See these sources for detailed information regarding the
'* Microsoft samples programs.
'*******************************************************************************
Option Explicit
Option Base 0
Option Compare Text
Private m_intUnloadMode As Integer
Private Const DIALOG_TITLE = "Effect Help"
' **************************************************************************************************************************************
' * PUBLIC INTERFACE- PROPERTIES
' *
' *
' ******************************************************************************************************************************
' * procedure name: UnloadMode
' * procedure description: Returns an integer specifying the method from which this dialog was last unloaded
' *
' ******************************************************************************************************************************
Public Property Get UnloadMode() As Integer
On Local Error GoTo ErrLine
'return the value to the client
UnloadMode = m_intUnloadMode
Exit Property
ErrLine:
Err.Clear
Exit Property
End Property
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- FORM EVENT HANDLERS
' *
' *
' ******************************************************************************************************************************
' * procedure name: Form_Load
' * procedure description: Occurs when a form is loaded.
' *
' ******************************************************************************************************************************
Private Sub Form_Load()
On Local Error GoTo ErrLine
'set default value(s)
With cmbEffect
.AddItem "BasicImage"
.AddItem "Blur"
.AddItem "Chroma"
.AddItem "DropShadow"
.AddItem "Emboss"
.AddItem "Engrave"
.AddItem "Fade"
.AddItem "Pixelate"
End With
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: Form_QueryUnload
' * procedure description: Occurs before a form or application closes.
' *
' ******************************************************************************************************************************
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
On Local Error GoTo ErrLine
Select Case UnloadMode
Case vbFormControlMenu
'0 The user chose the Close command from the Control menu on the form.
Cancel = 1: Me.Visible = False
Case vbFormCode
'1 The Unload statement is invoked from code.
Case vbAppWindows
'2 The current Microsoft Windows operating environment session is ending.
Case vbAppTaskManager
'3 The Microsoft Windows Task Manager is closing the application.
End
Case vbFormMDIForm
'4 An MDI child form is closing because the MDI form is closing.
Case vbFormOwner
'5 A form is closing because its owner is closing
End Select
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: Form_Unload
' * procedure description: Occurs when a form is about to be removed from the screen.
' *
' ******************************************************************************************************************************
Private Sub Form_Unload(Cancel As Integer)
On Local Error GoTo ErrLine
With Me
.Move 0 - (Screen.Width * 8), 0 - (Screen.Height * 8): .Visible = False
End With
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- CONTROL EVENT HANDLERS
' *
' *
' ******************************************************************************************************************************
' * procedure name: cmdOk_Click
' * procedure description: occures when the 'Ok' command button is pressed
' *
' ******************************************************************************************************************************
Private Sub cmdOk_Click()
On Local Error GoTo ErrLine
'hide the dialog
Me.Visible = False
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: cmdCancel_Click
' * procedure description: occures when the 'Cancel' command button is pressed
' *
' ******************************************************************************************************************************
Private Sub cmdCancel_Click()
On Local Error GoTo ErrLine
'hide the dialog
Me.Visible = False
m_intUnloadMode = 1
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub

View File

@@ -0,0 +1,373 @@
VERSION 5.00
Begin VB.Form frmGroup
Caption = "Group Menu"
ClientHeight = 3675
ClientLeft = 60
ClientTop = 345
ClientWidth = 5805
Icon = "frmGroup.frx":0000
LinkTopic = "Form2"
LockControls = -1 'True
ScaleHeight = 3675
ScaleWidth = 5805
StartUpPosition = 1 'CenterOwner
Begin VB.Frame fraFixture
Height = 3165
Left = 75
TabIndex = 8
Top = 0
Width = 5640
Begin VB.TextBox txtBuffering
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1470
TabIndex = 5
Top = 2625
Width = 3975
End
Begin VB.TextBox txtPreviewMode
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1470
TabIndex = 4
Top = 2145
Width = 3975
End
Begin VB.TextBox txtOutputFPS
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1470
TabIndex = 3
Top = 1665
Width = 3975
End
Begin VB.TextBox txtPriority
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1470
TabIndex = 2
Top = 1185
Width = 3975
End
Begin VB.TextBox txtMediaType
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1470
TabIndex = 1
ToolTipText = "0 - Video / 1 - Audio"
Top = 705
Width = 3975
End
Begin VB.TextBox txtGroupName
Height = 375
Left = 1470
TabIndex = 0
Top = 225
Width = 3975
End
Begin VB.Label lblBuffering
Caption = "Buffering"
Height = 255
Left = 150
TabIndex = 14
Top = 2745
Width = 975
End
Begin VB.Label lblPreviewMode
Caption = "PreviewMode"
Height = 255
Left = 150
TabIndex = 13
Top = 2265
Width = 1215
End
Begin VB.Label lblOutputFPS
Caption = "OutputFPS"
Height = 255
Left = 150
TabIndex = 12
Top = 1785
Width = 1215
End
Begin VB.Label lblPriority
Caption = "Priority"
Height = 255
Left = 150
TabIndex = 11
Top = 1305
Width = 615
End
Begin VB.Label lblMediaType
Caption = "MediaType"
Height = 255
Left = 150
TabIndex = 10
ToolTipText = "0 - Video / 1 - Audio"
Top = 825
Width = 1095
End
Begin VB.Label lblGroupName
Caption = "GroupName"
Height = 255
Left = 150
TabIndex = 9
Top = 345
Width = 1095
End
End
Begin VB.CommandButton cmdCancel
Caption = "Cancel"
Height = 340
Left = 4500
TabIndex = 7
Top = 3255
Width = 1215
End
Begin VB.CommandButton cmdOk
Caption = "OK"
Default = -1 'True
Height = 340
Left = 3300
TabIndex = 6
Top = 3255
Width = 1095
End
End
Attribute VB_Name = "frmGroup"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*******************************************************************************
'* This is a part of the Microsoft DXSDK Code Samples.
'* Copyright (C) 1999-2001 Microsoft Corporation.
'* All rights reserved.
'* This source code is only intended as a supplement to
'* Microsoft Development Tools and/or SDK documentation.
'* See these sources for detailed information regarding the
'* Microsoft samples programs.
'*******************************************************************************
Option Explicit
Option Base 0
Option Compare Text
Private m_intUnloadMode As Integer
Private Const DIALOG_TITLE = "Group Help"
' **************************************************************************************************************************************
' * PUBLIC INTERFACE- PROPERTIES
' *
' *
' ******************************************************************************************************************************
' * procedure name: UnloadMode
' * procedure description: Returns an integer specifying the method from which this dialog was last unloaded
' *
' ******************************************************************************************************************************
Public Property Get UnloadMode() As Integer
On Local Error GoTo ErrLine
'return the value to the client
UnloadMode = m_intUnloadMode
Exit Property
ErrLine:
Err.Clear
Exit Property
End Property
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- FORM EVENT HANDLERS
' *
' *
' ******************************************************************************************************************************
' * procedure name: Form_Load
' * procedure description: Occurs when a form is loaded.
' *
' ******************************************************************************************************************************
Private Sub Form_Load()
On Local Error GoTo ErrLine
'set default value(s)
With Me
.txtGroupName.Text = vbNullString
.txtMediaType.Text = vbNullString
.txtPriority.Text = vbNullString
.txtOutputFPS.Text = vbNullString
.txtPreviewMode.Text = vbNullString
.txtBuffering.Text = vbNullString
End With
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: Form_QueryUnload
' * procedure description: Occurs before a form or application closes.
' *
' ******************************************************************************************************************************
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
On Local Error GoTo ErrLine
Select Case UnloadMode
Case vbFormControlMenu
'0 The user chose the Close command from the Control menu on the form.
Cancel = 1: Me.Visible = False
Case vbFormCode
'1 The Unload statement is invoked from code.
Case vbAppWindows
'2 The current Microsoft Windows operating environment session is ending.
Case vbAppTaskManager
'3 The Microsoft Windows Task Manager is closing the application.
End
Case vbFormMDIForm
'4 An MDI child form is closing because the MDI form is closing.
Case vbFormOwner
'5 A form is closing because its owner is closing
End Select
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: Form_Unload
' * procedure description: Occurs when a form is about to be removed from the screen.
' *
' ******************************************************************************************************************************
Private Sub Form_Unload(Cancel As Integer)
On Local Error GoTo ErrLine
With Me
.Move 0 - (Screen.Width * 8), 0 - (Screen.Height * 8): .Visible = False
End With
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- CONTROL EVENT HANDLERS
' *
' *
' ******************************************************************************************************************************
' * procedure name: cmdOk_Click
' * procedure description: occures when the user presses the "Ok" button
' *
' ******************************************************************************************************************************
Private Sub cmdOk_Click()
Dim nResultant As VbMsgBoxResult
On Local Error GoTo ErrLine
'validation code
If frmGroup.txtGroupName.Text = vbNullString Then
nResultant = MsgBox("You Must Set GroupName", , DIALOG_TITLE)
frmGroup.txtGroupName.SetFocus
Exit Sub
End If
If frmGroup.txtMediaType.Text = vbNullString Then
nResultant = MsgBox("You Must Set MediaType", , DIALOG_TITLE)
frmGroup.txtMediaType.SetFocus
Exit Sub
End If
If frmGroup.txtPriority.Text = vbNullString Then
nResultant = MsgBox("You Must Set Priority", , DIALOG_TITLE)
frmGroup.txtPriority.SetFocus
Exit Sub
End If
If frmGroup.txtOutputFPS.Text = vbNullString Then
nResultant = MsgBox("You Must Set OutputFPS", , DIALOG_TITLE)
frmGroup.txtOutputFPS.SetFocus
Exit Sub
End If
If frmGroup.txtPreviewMode.Text = vbNullString Then
nResultant = MsgBox("You Must Set PreviewMode", , DIALOG_TITLE)
frmGroup.txtPreviewMode.SetFocus
Exit Sub
End If
If frmGroup.txtBuffering.Text = vbNullString Then
nResultant = MsgBox("You Must Set Buffering", , DIALOG_TITLE)
frmGroup.txtBuffering.SetFocus
Exit Sub
End If
'hide the dialog
Me.Visible = False
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: cmdCancel_Click
' * procedure description: occures when the user presses the "Cancel" button
' *
' ******************************************************************************************************************************
Private Sub cmdCancel_Click()
On Local Error GoTo ErrLine
'hide the dialog
Me.Visible = False
m_intUnloadMode = 1
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,504 @@
VERSION 5.00
Begin VB.Form frmTimeline
Caption = "TimeLine Menu"
ClientHeight = 4605
ClientLeft = 60
ClientTop = 345
ClientWidth = 6015
Icon = "frmTimeline.frx":0000
LinkTopic = "Form2"
LockControls = -1 'True
ScaleHeight = 4605
ScaleWidth = 6015
StartUpPosition = 1 'CenterOwner
Begin VB.Frame fraFixture
Height = 4065
Left = 75
TabIndex = 12
Top = 0
Width = 5865
Begin VB.TextBox txtDirty
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1710
TabIndex = 5
ToolTipText = "Not Setable By User / read Only"
Top = 2625
Width = 3975
End
Begin VB.TextBox txtDefaultFPS
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1710
TabIndex = 4
ToolTipText = "Default Frames Per Second"
Top = 2145
Width = 3975
End
Begin VB.TextBox txtDuration
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1710
TabIndex = 3
ToolTipText = "Not Setable By User / read Only"
Top = 1665
Width = 3975
End
Begin VB.TextBox txtEffectsEnabled
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1710
TabIndex = 2
ToolTipText = "0 Disabled / 1 Enabled"
Top = 1185
Width = 3975
End
Begin VB.TextBox txtTransitionsEnabled
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1710
TabIndex = 1
ToolTipText = "0 Disabled / 1 Enabled"
Top = 705
Width = 3975
End
Begin VB.TextBox txtInsertMode
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1710
TabIndex = 0
ToolTipText = "1 Insert / 2 Overlay"
Top = 225
Width = 3975
End
Begin VB.ComboBox cmbDefaultTransition
Height = 315
Left = 1710
Sorted = -1 'True
TabIndex = 6
Top = 3105
Width = 3975
End
Begin VB.ComboBox cmbDefaultEffect
Height = 315
Left = 1710
Sorted = -1 'True
TabIndex = 7
Top = 3585
Width = 3975
End
Begin VB.Label lblDefaultEffect
Caption = "DefaultEffect"
Height = 255
Left = 150
TabIndex = 20
Top = 3705
Width = 1095
End
Begin VB.Label lblDefaultTransition
Caption = "DefaultTransition"
Height = 255
Left = 150
TabIndex = 19
Top = 3225
Width = 1455
End
Begin VB.Label lblDirty
Caption = "Dirty"
Height = 255
Left = 150
TabIndex = 18
Top = 2745
Width = 975
End
Begin VB.Label lblDefaultFPS
Caption = "DefaultFPS"
Height = 255
Left = 150
TabIndex = 17
Top = 2265
Width = 1575
End
Begin VB.Label lblDuration
Caption = "Duration"
Height = 255
Left = 150
TabIndex = 16
Top = 1785
Width = 615
End
Begin VB.Label lblEffectsEnable
Caption = "EffectsEnable"
Height = 255
Left = 150
TabIndex = 15
Top = 1305
Width = 1935
End
Begin VB.Label lblTransitionsEnable
Caption = "TransitionsEnable"
Height = 255
Left = 150
TabIndex = 14
Top = 825
Width = 1575
End
Begin VB.Label lblInsertMode
Caption = "InsertMode"
Height = 255
Left = 150
TabIndex = 13
Top = 345
Width = 1095
End
End
Begin VB.CommandButton cmdCancel
Caption = "Cancel"
Height = 340
Left = 4695
TabIndex = 9
Top = 4170
Width = 1215
End
Begin VB.CommandButton cmdOk
Caption = "OK"
Default = -1 'True
Height = 340
Left = 3495
TabIndex = 8
Top = 4170
Width = 1095
End
Begin VB.TextBox DefaultTransition
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 7200
TabIndex = 10
TabStop = 0 'False
Top = 150
Visible = 0 'False
Width = 975
End
Begin VB.TextBox DefaultEffect
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 7200
TabIndex = 11
TabStop = 0 'False
Top = 600
Visible = 0 'False
Width = 975
End
End
Attribute VB_Name = "frmTimeline"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*******************************************************************************
'* This is a part of the Microsoft DXSDK Code Samples.
'* Copyright (C) 1999-2001 Microsoft Corporation.
'* All rights reserved.
'* This source code is only intended as a supplement to
'* Microsoft Development Tools and/or SDK documentation.
'* See these sources for detailed information regarding the
'* Microsoft samples programs.
'*******************************************************************************
Option Explicit
Option Base 0
Option Compare Text
Private m_intUnloadMode As Integer
Private Const DIALOG_TITLE = "Timeline Help"
' **************************************************************************************************************************************
' * PUBLIC INTERFACE- PROPERTIES
' *
' *
' ******************************************************************************************************************************
' * procedure name: UnloadMode
' * procedure description: Returns an integer specifying the method from which this dialog was last unloaded
' *
' ******************************************************************************************************************************
Public Property Get UnloadMode() As Integer
On Local Error GoTo ErrLine
'return the value to the client
UnloadMode = m_intUnloadMode
Exit Property
ErrLine:
Err.Clear
Exit Property
End Property
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- FORM EVENT HANDLERS
' *
' *
' ******************************************************************************************************************************
' * procedure name: Form_Load
' * procedure description: Occurs when a form is loaded.
' *
' ******************************************************************************************************************************
Private Sub Form_Load()
On Local Error GoTo ErrLine
'set default value(s)
With Me
.txtInsertMode.Text = vbNullString
.txtTransitionsEnabled.Text = vbNullString
.txtEffectsEnabled.Text = vbNullString
.txtDuration.Text = vbNullString
.txtDefaultFPS.Text = vbNullString
.txtDirty.Text = vbNullString
.cmbDefaultTransition.Text = vbNullString
.cmbDefaultEffect.Text = vbNullString
End With
With cmbDefaultTransition
.AddItem "Barn"
.AddItem "Blinds"
.AddItem "BurnFilm"
.AddItem "CenterCurls"
.AddItem "ColorFade"
.AddItem "Compositor"
.AddItem "Curls"
.AddItem "Curtains"
.AddItem "Fade"
.AddItem "FadeWhite"
.AddItem "FlowMotion"
.AddItem "GlassBlock"
.AddItem "Grid"
.AddItem "Inset"
.AddItem "Iris"
.AddItem "Jaws"
.AddItem "Lens"
.AddItem "LightWipe"
.AddItem "Liquid"
.AddItem "PageCurl"
.AddItem "PeelABCD"
.AddItem "Pixelate"
.AddItem "RadialWipe"
.AddItem "Ripple"
.AddItem "RollDown"
.AddItem "Slide"
.AddItem "SMPTE Wipe"
.AddItem "Spiral"
.AddItem "Stretch"
.AddItem "Threshold"
.AddItem "Twister"
.AddItem "Vacuum"
.AddItem "Water"
.AddItem "Wheel"
.AddItem "Wipe"
.AddItem "WormHole"
.AddItem "Zigzag"
End With
With cmbDefaultEffect
.AddItem "BasicImage"
.AddItem "Blur"
.AddItem "Chroma"
.AddItem "DropShadow"
.AddItem "Emboss"
.AddItem "Engrave"
.AddItem "Fade"
.AddItem "Pixelate"
End With
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: Form_QueryUnload
' * procedure description: Occurs before a form or application closes.
' *
' ******************************************************************************************************************************
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
On Local Error GoTo ErrLine
Select Case UnloadMode
Case vbFormControlMenu
'0 The user chose the Close command from the Control menu on the form.
Cancel = 1: Me.Visible = False
Case vbFormCode
'1 The Unload statement is invoked from code.
Case vbAppWindows
'2 The current Microsoft Windows operating environment session is ending.
Case vbAppTaskManager
'3 The Microsoft Windows Task Manager is closing the application.
End
Case vbFormMDIForm
'4 An MDI child form is closing because the MDI form is closing.
Case vbFormOwner
'5 A form is closing because its owner is closing
End Select
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: Form_Unload
' * procedure description: Occurs when a form is about to be removed from the screen.
' *
' ******************************************************************************************************************************
Private Sub Form_Unload(Cancel As Integer)
On Local Error GoTo ErrLine
With Me
.Move 0 - (Screen.Width * 8), 0 - (Screen.Height * 8): .Visible = False
End With
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- CONTROL EVENT HANDLERS
' *
' *
' ******************************************************************************************************************************
' * procedure name: cmdOk_Click
' * procedure description: fired intrinsically when this form is loaded
' *
' ******************************************************************************************************************************
Private Sub cmdOk_Click()
Dim nResultant As VbMsgBoxResult
On Local Error GoTo ErrLine
'validation code
If frmTimeline.txtInsertMode.Text = vbNullString Then
nResultant = MsgBox("You Must Set txtInsertMode", , DIALOG_TITLE)
frmTimeline.txtInsertMode.SetFocus
Exit Sub
End If
If frmTimeline.txtTransitionsEnabled.Text = vbNullString Then
nResultant = MsgBox("You Must Set txtTransitionsEnabled", , DIALOG_TITLE)
frmTimeline.txtTransitionsEnabled.SetFocus
Exit Sub
End If
If frmTimeline.txtEffectsEnabled.Text = vbNullString Then
nResultant = MsgBox("You Must Set txtEffectsEnabled", , DIALOG_TITLE)
frmTimeline.txtEffectsEnabled.SetFocus
Exit Sub
End If
If frmTimeline.txtDefaultFPS.Text = vbNullString Then
nResultant = MsgBox("You Must Set txtDefaultFPS", , DIALOG_TITLE)
frmTimeline.txtDefaultFPS.SetFocus
Exit Sub
End If
If frmTimeline.cmbDefaultTransition.Text = vbNullString Then
nResultant = MsgBox("You Must Set cmbDefaultTransition", , DIALOG_TITLE)
frmTimeline.cmbDefaultTransition.SetFocus
Exit Sub
End If
If frmTimeline.cmbDefaultEffect.Text = vbNullString Then
nResultant = MsgBox("You Must Set cmbDefaultEffect", , DIALOG_TITLE)
frmTimeline.cmbDefaultEffect.SetFocus
Exit Sub
End If
'hide the dialog
Me.Visible = False
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: cmdCancel_Click
' * procedure description: occures when the user presses the 'Cancel' command button
' *
' ******************************************************************************************************************************
Private Sub cmdCancel_Click()
On Local Error GoTo ErrLine
'hide the dialog
Me.Visible = False
m_intUnloadMode = 1
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub

View File

@@ -0,0 +1,357 @@
VERSION 5.00
Begin VB.Form frmTrack
Caption = "Track Menu"
ClientHeight = 3270
ClientLeft = 60
ClientTop = 345
ClientWidth = 5805
Icon = "frmTrack.frx":0000
LinkTopic = "Form2"
LockControls = -1 'True
ScaleHeight = 3270
ScaleWidth = 5805
StartUpPosition = 1 'CenterOwner
Begin VB.Frame fraFixture
Height = 2715
Left = 75
TabIndex = 7
Top = 0
Width = 5640
Begin VB.TextBox txtPriority
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1470
TabIndex = 0
Top = 225
Width = 3975
End
Begin VB.TextBox txtBlank
BeginProperty DataFormat
Type = 5
Format = "0"
HaveTrueFalseNull= 1
TrueValue = "1"
FalseValue = "0"
NullValue = ""
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 7
EndProperty
Height = 375
Left = 1470
TabIndex = 1
Top = 705
Width = 3975
End
Begin VB.TextBox txtMuted
BeginProperty DataFormat
Type = 5
Format = "0"
HaveTrueFalseNull= 1
TrueValue = "1"
FalseValue = "0"
NullValue = ""
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 7
EndProperty
Height = 375
Left = 1470
TabIndex = 2
Top = 1185
Width = 3975
End
Begin VB.TextBox txtStartTime
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1470
TabIndex = 3
Top = 1665
Width = 3975
End
Begin VB.TextBox txtStopTime
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 1
EndProperty
Height = 375
Left = 1470
TabIndex = 4
Top = 2145
Width = 3975
End
Begin VB.Label lblPriority
Caption = "Priority"
Height = 255
Left = 150
TabIndex = 12
Top = 345
Width = 1095
End
Begin VB.Label lblBlank
Caption = "Blank"
Height = 255
Left = 150
TabIndex = 11
Top = 825
Width = 1095
End
Begin VB.Label lblMuted
Caption = "Muted"
Height = 255
Left = 150
TabIndex = 10
Top = 1305
Width = 615
End
Begin VB.Label lblStart
Caption = "Start"
Height = 255
Left = 150
TabIndex = 9
Top = 1785
Width = 1215
End
Begin VB.Label lblStop
Caption = "Stop"
Height = 255
Left = 150
TabIndex = 8
Top = 2265
Width = 1215
End
End
Begin VB.CommandButton cmdOk
Caption = "OK"
Default = -1 'True
Height = 340
Left = 3300
TabIndex = 5
Top = 2850
Width = 1095
End
Begin VB.CommandButton cmdCancel
Caption = "Cancel"
Height = 340
Left = 4500
TabIndex = 6
Top = 2850
Width = 1215
End
End
Attribute VB_Name = "frmTrack"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*******************************************************************************
'* This is a part of the Microsoft DXSDK Code Samples.
'* Copyright (C) 1999-2001 Microsoft Corporation.
'* All rights reserved.
'* This source code is only intended as a supplement to
'* Microsoft Development Tools and/or SDK documentation.
'* See these sources for detailed information regarding the
'* Microsoft samples programs.
'*******************************************************************************
Option Explicit
Option Base 0
Option Compare Text
Private m_intUnloadMode As Integer
Private Const DIALOG_TITLE = "Track Help"
' **************************************************************************************************************************************
' * PUBLIC INTERFACE- PROPERTIES
' *
' *
' ******************************************************************************************************************************
' * procedure name: UnloadMode
' * procedure description: Returns an integer specifying the method from which this dialog was last unloaded
' *
' ******************************************************************************************************************************
Public Property Get UnloadMode() As Integer
On Local Error GoTo ErrLine
'return the value to the client
UnloadMode = m_intUnloadMode
Exit Property
ErrLine:
Err.Clear
Exit Property
End Property
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- FORM EVENT HANDLERS
' *
' *
' ******************************************************************************************************************************
' * procedure name: Form_Load
' * procedure description: Occurs when a form is loaded.
' *
' ******************************************************************************************************************************
Private Sub Form_Load()
On Local Error GoTo ErrLine
'set default value(s)
With Me
.txtPriority.Text = vbNullString
.txtBlank.Text = vbNullString
.txtMuted.Text = vbNullString
.txtStartTime.Text = vbNullString
.txtStopTime.Text = vbNullString
End With
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: Form_QueryUnload
' * procedure description: Occurs before a form or application closes.
' *
' ******************************************************************************************************************************
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
On Local Error GoTo ErrLine
Select Case UnloadMode
Case vbFormControlMenu
'0 The user chose the Close command from the Control menu on the form.
Cancel = 1: Me.Visible = False
Case vbFormCode
'1 The Unload statement is invoked from code.
Case vbAppWindows
'2 The current Microsoft Windows operating environment session is ending.
Case vbAppTaskManager
'3 The Microsoft Windows Task Manager is closing the application.
End
Case vbFormMDIForm
'4 An MDI child form is closing because the MDI form is closing.
Case vbFormOwner
'5 A form is closing because its owner is closing
End Select
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: Form_Unload
' * procedure description: Occurs when a form is about to be removed from the screen.
' *
' ******************************************************************************************************************************
Private Sub Form_Unload(Cancel As Integer)
On Local Error GoTo ErrLine
With Me
.Move 0 - (Screen.Width * 8), 0 - (Screen.Height * 8): .Visible = False
End With
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- CONTROL EVENT HANDLERS
' *
' *
' ******************************************************************************************************************************
' * procedure name: cmdOk_Click
' * procedure description: occures when the 'Ok' command button is pressed
' *
' ******************************************************************************************************************************
Private Sub cmdOk_Click()
Dim nResultant As VbMsgBoxResult
On Local Error GoTo ErrLine
'validation code
If frmTrack.txtPriority.Text = vbNullString Then
nResultant = MsgBox("You Must Set Priority", , DIALOG_TITLE)
frmTrack.txtPriority.SetFocus
Exit Sub
End If
If frmTrack.txtBlank.Text = vbNullString Then
nResultant = MsgBox("You Must Set Blank", , DIALOG_TITLE)
frmTrack.txtBlank.SetFocus
Exit Sub
End If
If frmTrack.txtMuted.Text = vbNullString Then
nResultant = MsgBox("You Must Set Muted", , DIALOG_TITLE)
frmTrack.txtMuted.SetFocus
Exit Sub
End If
If frmTrack.txtStartTime.Text = vbNullString Then
nResultant = MsgBox("You Must Set Start", , DIALOG_TITLE)
frmTrack.txtStartTime.SetFocus
Exit Sub
End If
If frmTrack.txtStopTime.Text = vbNullString Then
nResultant = MsgBox("You Must Set Stop", , DIALOG_TITLE)
frmTrack.txtStopTime.SetFocus
Exit Sub
End If
If CLng(frmTrack.txtStartTime.Text) > CLng(frmTrack.txtStopTime.Text) Then
nResultant = MsgBox("Start Must Be Lower Than Stop", , DIALOG_TITLE)
frmTrack.txtStartTime.SetFocus
End If
'hide the dialog
Me.Visible = False
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: cmdCancel_Click
' * procedure description: occures when the user presses the "Cancel" button
' *
' ******************************************************************************************************************************
Private Sub cmdCancel_Click()
On Local Error GoTo ErrLine
'hide the dialog
Me.Visible = False
m_intUnloadMode = 1
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub

View File

@@ -0,0 +1,17 @@
VERSION 5.00
Begin VB.Form frmTrans
Caption = "Transition Menu"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form2"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 'Windows Default
End
Attribute VB_Name = "frmTrans"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

View File

@@ -0,0 +1,328 @@
VERSION 5.00
Begin VB.Form frmTransitions
Caption = "Transitions Menu"
ClientHeight = 3660
ClientLeft = 60
ClientTop = 345
ClientWidth = 6120
Icon = "frmTransitions.frx":0000
LinkTopic = "Form2"
LockControls = -1 'True
ScaleHeight = 3660
ScaleWidth = 6120
StartUpPosition = 1 'CenterOwner
Begin VB.Frame fraFixture
Height = 3165
Left = 75
TabIndex = 9
Top = 0
Width = 5940
Begin VB.TextBox txtSwapInputs
Height = 375
Left = 1830
TabIndex = 5
Top = 2625
Width = 3975
End
Begin VB.TextBox txtCutsOnly
Height = 375
Left = 1830
TabIndex = 4
Top = 2145
Width = 3975
End
Begin VB.TextBox txtCutpoint
Height = 375
Left = 1830
TabIndex = 3
Top = 1665
Width = 3975
End
Begin VB.TextBox txtStopTime
Height = 375
Left = 1830
TabIndex = 2
Top = 1185
Width = 3975
End
Begin VB.TextBox txtStartTime
Height = 375
Left = 1830
TabIndex = 1
Top = 705
Width = 3975
End
Begin VB.ComboBox cmbTransition
Height = 315
Left = 1830
Sorted = -1 'True
TabIndex = 0
Top = 225
Width = 3975
End
Begin VB.Label lblSwapInputs
Caption = "Swap Inputs"
Height = 255
Left = 150
TabIndex = 15
Top = 2745
Width = 975
End
Begin VB.Label lblCutsOnly
Caption = "Cuts Only"
Height = 255
Left = 150
TabIndex = 14
Top = 2265
Width = 1095
End
Begin VB.Label lblCutpoint
Caption = "Cutpoint"
Height = 255
Left = 150
TabIndex = 13
Top = 1785
Width = 1335
End
Begin VB.Label lblStop
Caption = "Stop"
Height = 255
Left = 150
TabIndex = 12
Top = 1305
Width = 615
End
Begin VB.Label lblStart
Caption = "Start"
Height = 255
Left = 150
TabIndex = 11
Top = 825
Width = 735
End
Begin VB.Label lblTransition
Caption = "Transition"
Height = 255
Left = 150
TabIndex = 10
Top = 345
Width = 1695
End
End
Begin VB.CommandButton cmdOk
Caption = "OK"
Default = -1 'True
Height = 340
Left = 3615
TabIndex = 6
Top = 3255
Width = 1095
End
Begin VB.CommandButton cmdCancel
Caption = "Cancel"
Height = 340
Left = 4815
TabIndex = 7
Top = 3255
Width = 1215
End
Begin VB.TextBox GetSubObjectGUIDB
Height = 420
Left = 6300
TabIndex = 8
Top = 75
Visible = 0 'False
Width = 915
End
End
Attribute VB_Name = "frmTransitions"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*******************************************************************************
'* This is a part of the Microsoft DXSDK Code Samples.
'* Copyright (C) 1999-2001 Microsoft Corporation.
'* All rights reserved.
'* This source code is only intended as a supplement to
'* Microsoft Development Tools and/or SDK documentation.
'* See these sources for detailed information regarding the
'* Microsoft samples programs.
'*******************************************************************************
Option Explicit
Option Base 0
Option Compare Text
Private m_intUnloadMode As Integer
Private Const DIALOG_TITLE = "Transition Help"
' **************************************************************************************************************************************
' * PUBLIC INTERFACE- PROPERTIES
' *
' *
' ******************************************************************************************************************************
' * procedure name: UnloadMode
' * procedure description: Returns an integer specifying the method from which this dialog was last unloaded
' *
' ******************************************************************************************************************************
Public Property Get UnloadMode() As Integer
On Local Error GoTo ErrLine
'return the value to the client
UnloadMode = m_intUnloadMode
Exit Property
ErrLine:
Err.Clear
Exit Property
End Property
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- FORM EVENT HANDLERS
' *
' *
' ******************************************************************************************************************************
' * procedure name: Form_Load
' * procedure description: Occurs when a form is loaded.
' *
' ******************************************************************************************************************************
Private Sub Form_Load()
On Local Error GoTo ErrLine
'set default value(s)
With cmbTransition
.AddItem "Barn"
.AddItem "Blinds"
.AddItem "BurnFilm"
.AddItem "CenterCurls"
.AddItem "ColorFade"
.AddItem "Compositor"
.AddItem "Curls"
.AddItem "Curtains"
.AddItem "Fade"
.AddItem "FadeWhite"
.AddItem "FlowMotion"
.AddItem "GlassBlock"
.AddItem "Grid"
.AddItem "Inset"
.AddItem "Iris"
.AddItem "Jaws"
.AddItem "Lens"
.AddItem "LightWipe"
.AddItem "Liquid"
.AddItem "PageCurl"
.AddItem "PeelABCD"
.AddItem "Pixelate"
.AddItem "RadialWipe"
.AddItem "Ripple"
.AddItem "RollDown"
.AddItem "Slide"
.AddItem "SMPTE Wipe"
.AddItem "Spiral"
.AddItem "Stretch"
.AddItem "Threshold"
.AddItem "Twister"
.AddItem "Vacuum"
.AddItem "Water"
.AddItem "Wheel"
.AddItem "Wipe"
.AddItem "WormHole"
.AddItem "Zigzag"
End With
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: Form_QueryUnload
' * procedure description: Occurs before a form or application closes.
' *
' ******************************************************************************************************************************
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
On Local Error GoTo ErrLine
Select Case UnloadMode
Case vbFormControlMenu
'0 The user chose the Close command from the Control menu on the form.
Cancel = 1: Me.Visible = False
Case vbFormCode
'1 The Unload statement is invoked from code.
Case vbAppWindows
'2 The current Microsoft Windows operating environment session is ending.
Case vbAppTaskManager
'3 The Microsoft Windows Task Manager is closing the application.
End
Case vbFormMDIForm
'4 An MDI child form is closing because the MDI form is closing.
Case vbFormOwner
'5 A form is closing because its owner is closing
End Select
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: Form_Unload
' * procedure description: Occurs when a form is about to be removed from the screen.
' *
' ******************************************************************************************************************************
Private Sub Form_Unload(Cancel As Integer)
On Local Error GoTo ErrLine
With Me
.Move 0 - (Screen.Width * 8), 0 - (Screen.Height * 8): .Visible = False
End With
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- CONTROL EVENT HANDLERS
' *
' *
' ******************************************************************************************************************************
' * procedure name: cmdOk_Click
' * procedure description: occures when the user presses the 'Ok' button
' *
' ******************************************************************************************************************************
Private Sub cmdOk_Click()
On Local Error GoTo ErrLine
'hide dialog
Me.Visible = False
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: cmdOk_Click
' * procedure description: occures when the user presses the 'Cancel' button
' *
' ******************************************************************************************************************************
Private Sub cmdCancel_Click()
On Local Error GoTo ErrLine
'hide dialog
Me.Visible = False
m_intUnloadMode = 1
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub

View File

@@ -0,0 +1,768 @@
Attribute VB_Name = "modDisposable"
'*******************************************************************************
'* This is a part of the Microsoft DXSDK Code Samples.
'* Copyright (C) 1999-2001 Microsoft Corporation.
'* All rights reserved.
'* This source code is only intended as a supplement to
'* Microsoft Development Tools and/or SDK documentation.
'* See these sources for detailed information regarding the
'* Microsoft samples programs.
'*******************************************************************************
Option Explicit
Option Base 0
Option Compare Text
' **************************************************************************************************************************************
' * PUBLIC INTERFACE- GENERAL PROCEDURES
' *
' *
' ******************************************************************************************************************************
' * procedure name: GetTimelineDirect
' * procedure description: Populate the treeview control by walking the Timeline via Dexter API's
' *
' ******************************************************************************************************************************
Public Sub GetTimelineDirect(ctrlTreeView As TreeView, objTimeline As AMTimeline, Optional colDataStore As Collection)
Dim nCount As Long
Dim objNode As node
Dim nGroupCount As Long
Dim bstrRootGUID As String
Dim bstrGroupGUID As String
Dim objGroup As AMTimelineGroup
Dim objTimelineObject As AMTimelineObj
On Local Error GoTo ErrLine
'Ensure the treeview control's nodes are cleared
If Not ctrlTreeView Is Nothing Then
If ctrlTreeView.Nodes.Count <> 0 Then
ctrlTreeView.Nodes.Clear
End If
End If
'clear the collection
If Not colDataStore Is Nothing Then
Do Until colDataStore.Count = 0
colDataStore.Remove 1
Loop
End If
'get a guid for a key
bstrRootGUID = GetGUID
'Insert the root timeline node
Set objNode = ctrlTreeView.Nodes.Add(, , bstrRootGUID, "TimeLine 1", 1)
objNode.Tag = "AMTimeline"
'append to datastore (optional)
If Not colDataStore Is Nothing Then colDataStore.Add objTimeline, bstrRootGUID
'Obtain the number of groups to populate with
nGroupCount = GetGroupCount(objTimeline)
While nCount < nGroupCount: DoEvents
'get the group
objTimeline.GetGroup objTimelineObject, nCount
'instantiate the local copy
Set objGroup = objTimelineObject
'get a guid for a key
bstrGroupGUID = GetGUID
'Insert the group timeline node
Set objNode = ctrlTreeView.Nodes.Add(1, 4, bstrGroupGUID, "Group" + CStr(nCount) & Chr(32), 2)
objNode.Tag = "AMTimelineGroup"
'append to datastore (optional)
If Not colDataStore Is Nothing Then colDataStore.Add objGroup, bstrGroupGUID
'append all tracks
AddTracks ctrlTreeView, bstrGroupGUID, objTimelineObject, colDataStore
'append all effects
AddEffects ctrlTreeView, bstrGroupGUID, objTimelineObject, colDataStore
'append all transitions
AddTransitions ctrlTreeView, bstrGroupGUID, objTimelineObject, colDataStore
'append compositions
AddComposites ctrlTreeView, bstrGroupGUID, objTimelineObject, colDataStore
'dereference & clean-up
If Not objGroup Is Nothing Then Set objGroup = Nothing
If Not objTimelineObject Is Nothing Then Set objTimelineObject = Nothing
'increment the group count by a factor of one
nCount = nCount + 1
Wend
'expand all items in the treeview control
For nCount = 1 To ctrlTreeView.Nodes.Count
ctrlTreeView.Nodes(nCount).Expanded = True
Next
'clean-up & dereference
If Not objGroup Is Nothing Then Set objGroup = Nothing
If Not objTimelineObject Is Nothing Then Set objTimelineObject = Nothing
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: RefreshListView
' * procedure description: Updates the listview
' *
' ******************************************************************************************************************************
Public Sub RefreshListView(ctrlListView As ListView, bstrType As String, bstrKey As String)
Dim objListItem As ListItem
On Local Error GoTo ErrLine
'setup listview
If ctrlListView.View <> lvwReport Then ctrlListView.View = lvwReport
If ctrlListView.ListItems.Count <> 0 Then Call ctrlListView.ListItems.Clear
If ctrlListView.ColumnHeaders.Count = 0 Then
ctrlListView.ColumnHeaders.Add , "Parameter", "Parameter", (ctrlListView.Width / 2) - 50
ctrlListView.ColumnHeaders.Add , "Value", "Value", (ctrlListView.Width / 2) - 50
End If
'append items to the listview
Set objListItem = ctrlListView.ListItems.Add(1, "Type", "Type")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = bstrType
Set objListItem = ctrlListView.ListItems.Add(2, "Key Name", "Key Name")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = bstrKey
Set objListItem = ctrlListView.ListItems.Add(3, Space(1), Space(1))
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = Space(1)
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' **************************************************************************************************************************************
' * PUBLIC INTERFACE- ADD PROCEDURES (PROCEDURES ADD GIVEN ITEMS TO THE TREEVIEW)
' *
' *
' ******************************************************************************************************************************
' * procedure name: AddComposites
' * procedure description: appends all composites on to the treeview
' *
' ******************************************************************************************************************************
Public Sub AddComposites(ctrlTreeView As TreeView, bstrParent As String, objTimelineObject As AMTimelineObj, Optional colDataStore As Collection)
Dim nType As Long
Dim objNode As node
Dim nPriority As Long
Dim bstrGUID As String
Dim nTrackCount As Long
Dim nTotalVirtualTracks As Long
Dim objComp As AMTimelineComp
Dim objLocalTimelineObject As AMTimelineObj
Dim objCompVirtualTrack As IAMTimelineVirtualTrack
On Local Error GoTo ErrLine
'derive composition
Set objComp = objTimelineObject
'obtain track count
objComp.VTrackGetCount nTotalVirtualTracks
'loop through the tracks
While nTrackCount < nTotalVirtualTracks: DoEvents
'get the object
objComp.GetVTrack objLocalTimelineObject, nTrackCount
'obtain the timeline type
objLocalTimelineObject.GetTimelineType nType
If nType = TIMELINE_MAJOR_TYPE_COMPOSITE Then
'obtain the comp
Set objCompVirtualTrack = objLocalTimelineObject
'obtain the Priority
objCompVirtualTrack.TrackGetPriority nPriority
'get a guid for a key
bstrGUID = GetGUID
'Insert the root timeline node
Set objNode = ctrlTreeView.Nodes.Add(bstrParent, 4, bstrGUID, "Comp" & CStr(nPriority) & Chr(32), 2)
objNode.Tag = "AMTimelineComp"
'append to datastore (optional)
If Not colDataStore Is Nothing Then colDataStore.Add objCompVirtualTrack, bstrGUID
'recursive call of dependent children
Call AddEffects(ctrlTreeView, bstrGUID, objLocalTimelineObject, colDataStore)
Call AddTransitions(ctrlTreeView, bstrGUID, objLocalTimelineObject, colDataStore)
Call AddComposites(ctrlTreeView, bstrGUID, objLocalTimelineObject, colDataStore)
ElseIf nType = TIMELINE_MAJOR_TYPE_TRACK Then
'recursive call of dependent children
AddTracks ctrlTreeView, bstrParent, objLocalTimelineObject, colDataStore
End If
'clean-up & dereference
If Not objCompVirtualTrack Is Nothing Then Set objCompVirtualTrack = Nothing
If Not objLocalTimelineObject Is Nothing Then Set objLocalTimelineObject = Nothing
'increment track counter
nTrackCount = nTrackCount + 1
Wend
'clean-up & dereference
If Not objNode Is Nothing Then Set objNode = Nothing
If Not objComp Is Nothing Then Set objComp = Nothing
If Not objCompVirtualTrack Is Nothing Then Set objCompVirtualTrack = Nothing
If Not objLocalTimelineObject Is Nothing Then Set objLocalTimelineObject = Nothing
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: AddEffects
' * procedure description: appends all effects on to the treeview
' *
' ******************************************************************************************************************************
Public Sub AddEffects(ctrlTreeView As TreeView, bstrParent As String, objTimelineObject As AMTimelineObj, Optional colDataStore As Collection)
Dim objNode As node
Dim bstrGUID As String
Dim nEffectCount As Long
Dim nTotalEffects As Long
Dim objEffect As AMTimelineEffect
Dim objLocalTimelineObject As AMTimelineObj
Dim objEffectable As IAMTimelineEffectable
On Local Error GoTo ErrLine
Set objEffectable = objTimelineObject
objEffectable.EffectGetCount nTotalEffects
While nEffectCount < nTotalEffects: DoEvents
'get the timeline object
objEffectable.GetEffect objLocalTimelineObject, nEffectCount
'get the effect from the timeline object
Set objEffect = objLocalTimelineObject
'get a guid for a key
bstrGUID = GetGUID
'Insert the effect timeline node
Set objNode = ctrlTreeView.Nodes.Add(bstrParent, 4, bstrGUID, "Effect" & CStr(nEffectCount) & Chr(32), 2)
objNode.Tag = "AMTimelineEffect"
'append to datastore (optional)
If Not colDataStore Is Nothing Then colDataStore.Add objEffect, bstrGUID
'clean-up & dereference
If Not objEffect Is Nothing Then Set objEffect = Nothing
If Not objLocalTimelineObject Is Nothing Then Set objLocalTimelineObject = Nothing
'increment the count
nEffectCount = nEffectCount + 1
Wend
'clean-up & dereference
If Not objNode Is Nothing Then Set objNode = Nothing
If Not objEffect Is Nothing Then Set objEffect = Nothing
If Not objEffectable Is Nothing Then Set objEffectable = Nothing
If Not objLocalTimelineObject Is Nothing Then Set objLocalTimelineObject = Nothing
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: AddTracks
' * procedure description: appends all tracks on to the treeview; objTimelineObject evaluates to a virtual track
' *
' ******************************************************************************************************************************
Public Sub AddTracks(ctrlTreeView As TreeView, bstrParent As String, objTimelineObject As AMTimelineObj, Optional colDataStore As Collection)
Dim objNode As node
Dim nPriority As Long
Dim bstrGUID As String
Dim objTrack As AMTimelineTrack
Dim objVirtualTrack As IAMTimelineVirtualTrack
On Local Error GoTo ErrLine
'get the track object
Set objTrack = objTimelineObject
'get the virtual track object
Set objVirtualTrack = objTrack
'get the virtual track priority
objVirtualTrack.TrackGetPriority nPriority
'get a guid for a key
bstrGUID = GetGUID
'Insert the root timeline node
Set objNode = ctrlTreeView.Nodes.Add(bstrParent, 4, bstrGUID, "Track" & CStr(nPriority) & Chr(32), 2)
objNode.Tag = "AMTimelineTrack"
'append to datastore (optional)
If Not colDataStore Is Nothing Then colDataStore.Add objTrack, bstrGUID
'recursive call of dependent children
Call AddSources(ctrlTreeView, bstrGUID, objTimelineObject, colDataStore)
Call AddEffects(ctrlTreeView, bstrGUID, objTimelineObject, colDataStore)
Call AddTransitions(ctrlTreeView, bstrGUID, objTimelineObject, colDataStore)
'clean-up & dereference
If Not objNode Is Nothing Then Set objNode = Nothing
If Not objTrack Is Nothing Then Set objTrack = Nothing
If Not objVirtualTrack Is Nothing Then Set objVirtualTrack = Nothing
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: AddSources
' * procedure description: appends all sources on to the treeview
' *
' ******************************************************************************************************************************
Public Sub AddSources(ctrlTreeView As TreeView, bstrParent As String, objTimelineObject As AMTimelineObj, Optional colDataStore As Collection)
Dim objNode As node
Dim dblStart As Double
Dim bstrGUID As String
Dim nSourceCount As Long
Dim nTotalSources As Long
Dim objSource As AMTimelineSrc
Dim objTrack As AMTimelineTrack
Dim objLocalTimelineObject As AMTimelineObj
On Local Error GoTo ErrLine
'get a track
Set objTrack = objTimelineObject
'get the number of sources
objTrack.GetSourcesCount nTotalSources
While nSourceCount < nTotalSources: DoEvents
'get the timeline object
objTrack.GetNextSrc2 objLocalTimelineObject, dblStart
'derive the source object from the timeline object
Set objSource = objLocalTimelineObject
'get a guid for a key
bstrGUID = GetGUID
'Insert the root timeline node
Set objNode = ctrlTreeView.Nodes.Add(bstrParent, 4, bstrGUID, "Clip" & CStr(nSourceCount) & Chr(32), 2)
objNode.Tag = "AMTimelineSrc"
'append to datastore (optional)
If Not colDataStore Is Nothing Then colDataStore.Add objSource, bstrGUID
'dereference & clean-up
If Not objSource Is Nothing Then Set objSource = Nothing
If Not objLocalTimelineObject Is Nothing Then Set objLocalTimelineObject = Nothing
'increment the source counter
nSourceCount = nSourceCount + 1
Wend
'dereference & clean-up
If Not objNode Is Nothing Then Set objNode = Nothing
If Not objTrack Is Nothing Then Set objTrack = Nothing
If Not objSource Is Nothing Then Set objSource = Nothing
If Not objLocalTimelineObject Is Nothing Then Set objLocalTimelineObject = Nothing
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: AddTransitions
' * procedure description: appends an all the transitions on to the treeview
' *
' ******************************************************************************************************************************
Public Sub AddTransitions(ctrlTreeView As TreeView, bstrParent As String, objTimelineObject As AMTimelineObj, Optional colDataStore As Collection)
Dim objNode As node
Dim bstrGUID As String
Dim nTransitionCount As Long
Dim nTotalTransitions As Long
Dim dblReferenceTime As Double
Dim objTransition As AMTimelineTrans
Dim objTransable As IAMTimelineTransable
Dim objLocalTimelineObject As AMTimelineObj
On Local Error GoTo ErrLine
'get the transable
Set objTransable = objTimelineObject
'get the transition count
objTransable.TransGetCount nTotalTransitions
While nTransitionCount < nTotalTransitions: DoEvents
'get the next transition into a timeline object
objTransable.GetNextTrans2 objLocalTimelineObject, dblReferenceTime
'get the transition object from the timeline object
Set objTransition = objLocalTimelineObject
'get a guid for a key
bstrGUID = GetGUID
'Insert the root timeline node
Set objNode = ctrlTreeView.Nodes.Add(bstrParent, 4, bstrGUID, "Transition" & CStr(nTransitionCount) & Chr(32), 2)
objNode.Tag = "AMTimelineTrans"
'append to datastore (optional)
If Not colDataStore Is Nothing Then colDataStore.Add objTransition, bstrGUID
'clean-up & dereference
If Not objTransition Is Nothing Then Set objTransition = Nothing
If Not objLocalTimelineObject Is Nothing Then Set objLocalTimelineObject = Nothing
'increment the transition count
nTransitionCount = nTransitionCount + 1
Wend
'clean-up & dereference
If Not objNode Is Nothing Then Set objNode = Nothing
If Not objTransable Is Nothing Then Set objTransable = Nothing
If Not objTransition Is Nothing Then Set objTransition = Nothing
If Not objLocalTimelineObject Is Nothing Then Set objLocalTimelineObject = Nothing
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' **************************************************************************************************************************************
' * PUBLIC INTERFACE- VIEW PROCEDURES (PROCEDURES GET INFO FROM A TIMELINE OBJECT & DISPLAY IN LISTVIEW)
' *
' *
' ******************************************************************************************************************************
' * procedure name: ViewTimelineInfo
' * procedure description: updates the ide/listview to display the given objTimeline information
' *
' ******************************************************************************************************************************
Public Sub ViewTimelineInfo(ctrlListView As ListView, objTimeline As AMTimeline)
Dim nDirty As Long
Dim nInsertMode As Long
Dim dblDuration As Double
Dim objListItem As ListItem
Dim nEffectsEnabled As Long
Dim dblDefaultFPS As Double
Dim bstrDefaultEffect As String
Dim nTransitionsEnabled As Long
Dim bstrDefaultTransition As String
On Local Error GoTo ErrLine
'obtain property value(s)
objTimeline.GetInsertMode nInsertMode
objTimeline.TransitionsEnabled nTransitionsEnabled
objTimeline.EffectsEnabled nEffectsEnabled
objTimeline.GetDefaultFPS dblDefaultFPS
objTimeline.IsDirty nDirty
bstrDefaultTransition = objTimeline.GetDefaultTransitionB
bstrDefaultEffect = objTimeline.GetDefaultEffectB
'append timeline's information to the listview
Set objListItem = ctrlListView.ListItems.Add(4, "InsertMode", "InsertMode")
If nInsertMode = 2 Then
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = "INSERT"
Else: objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = "OVERLAY"
End If
Set objListItem = ctrlListView.ListItems.Add(5, "TransitionsEnabled", "TransitionsEnabled")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(nTransitionsEnabled)
Set objListItem = ctrlListView.ListItems.Add(6, "EffectsEnabled", "EffectsEnabled")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(nEffectsEnabled)
Set objListItem = ctrlListView.ListItems.Add(7, "Duration", "Duration")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(dblDuration)
Set objListItem = ctrlListView.ListItems.Add(8, "DefaultFPS", "DefaultFPS")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(dblDefaultFPS)
Set objListItem = ctrlListView.ListItems.Add(9, "Dirty", "Dirty")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(nDirty)
Set objListItem = ctrlListView.ListItems.Add(10, "DefaultTransition", "DefaultTransition")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = bstrDefaultTransition
Set objListItem = ctrlListView.ListItems.Add(11, "DefaultEffect", "DefaultEffect")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = bstrDefaultEffect
'clean-up & dereference
If Not objListItem Is Nothing Then Set objListItem = Nothing
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: ViewGroupInfo
' * procedure description: updates the ide/listview to display the given group information
' *
' ******************************************************************************************************************************
Public Sub ViewGroupInfo(ctrlListView As ListView, objTimelineObject As AMTimelineObj)
Dim nPriority As Long
Dim nMediaType As Long
Dim objListItem As ListItem
Dim nPreviewMode As Long
Dim dblOutputFPS As Double
Dim bstrGroupName As String
Dim nOutputBuffering As Long
Dim objGroup As AMTimelineGroup
On Local Error GoTo ErrLine
'obtain group from timeline object
Set objGroup = objTimelineObject
'obtain property value(s)
objGroup.GetPriority nPriority
objGroup.GetOutputFPS dblOutputFPS
objGroup.GetPreviewMode nPreviewMode
objGroup.GetOutputBuffering nOutputBuffering
'append the timeline's information to the listview control
Set objListItem = ctrlListView.ListItems.Add(4, "GroupName", "GroupName")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(bstrGroupName)
Set objListItem = ctrlListView.ListItems.Add(5, "MediaType", "MediaType")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(nMediaType)
Set objListItem = ctrlListView.ListItems.Add(6, "Priority", "Priority")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(nPriority)
Set objListItem = ctrlListView.ListItems.Add(7, "OutputFPS", "OutputFPS")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(dblOutputFPS)
Set objListItem = ctrlListView.ListItems.Add(8, "PreviewMode", "PreviewMode")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(nPreviewMode)
Set objListItem = ctrlListView.ListItems.Add(9, "Buffering", "Buffering")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(nOutputBuffering)
'clean-up & dereference
If Not objGroup Is Nothing Then Set objGroup = Nothing
If Not objListItem Is Nothing Then Set objListItem = Nothing
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: ViewCompositeInfo
' * procedure description: updates the ide/listview to display the given composition information
' *
' ******************************************************************************************************************************
Public Sub ViewCompositeInfo(ctrlListView As ListView, objTimelineObject As AMTimelineObj)
Dim nPriority As Long
Dim objListItem As ListItem
Dim dblStartTime As Double
Dim dblStopTime As Double
Dim objVirtualTrack As IAMTimelineVirtualTrack
On Local Error GoTo ErrLine
'obtain the virtual track from the timeline object
Set objVirtualTrack = objTimelineObject
'obtain property value(s)
objVirtualTrack.TrackGetPriority nPriority
objTimelineObject.GetStartStop2 dblStartTime, dblStopTime
'append the composite's information to the listview control
Set objListItem = ctrlListView.ListItems.Add(4, "Priority", "Priority")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(nPriority)
Set objListItem = ctrlListView.ListItems.Add(5, "Start", "Start")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(dblStartTime)
Set objListItem = ctrlListView.ListItems.Add(6, "Stop", "Stop")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(dblStopTime)
'clean-up & dereference
If Not objListItem Is Nothing Then Set objListItem = Nothing
If Not objVirtualTrack Is Nothing Then Set objVirtualTrack = Nothing
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: ViewTransitionInfo
' * procedure description: updates the ide/listview to display the given transition information
' *
' ******************************************************************************************************************************
Public Sub ViewTransitionInfo(ctrlListView As ListView, objTimelineObject As AMTimelineObj)
Dim nCutsOnly As Long
Dim nSwapInputs As Long
Dim dblCutpoint As Double
Dim objListItem As ListItem
Dim dblStartTime As Double
Dim dblStopTime As Double
Dim objTransition As AMTimelineTrans
On Local Error GoTo ErrLine
'obtain transition from given timeline object
Set objTransition = objTimelineObject
'obtain property values
objTimelineObject.GetStartStop2 dblStartTime, dblStopTime
objTransition.GetCutPoint2 dblCutpoint
objTransition.GetCutsOnly nCutsOnly
objTransition.GetSwapInputs nSwapInputs
'append transition's information to the listview control
Set objListItem = ctrlListView.ListItems.Add(4, "CLSID", "CLSID")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(objTimelineObject.GetSubObjectGUIDB)
Set objListItem = ctrlListView.ListItems.Add(5, "Start", "Start")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(dblStartTime)
Set objListItem = ctrlListView.ListItems.Add(6, "Stop", "Stop")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(dblStopTime)
Set objListItem = ctrlListView.ListItems.Add(7, "CutPoint", "CutPoint")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(dblCutpoint)
Set objListItem = ctrlListView.ListItems.Add(8, "CutsOnly", "CutsOnly")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(nCutsOnly)
Set objListItem = ctrlListView.ListItems.Add(9, "SwapIputs", "SwapIputs")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(nSwapInputs)
'clean-up & dereference
If Not objTransition Is Nothing Then Set objTransition = Nothing
If Not objListItem Is Nothing Then Set objListItem = Nothing
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: ViewEffectInfo
' * procedure description: updates the ide/listview to display the given effect information
' *
' ******************************************************************************************************************************
Public Sub ViewEffectInfo(ctrlListView As ListView, objTimelineObject As AMTimelineObj)
Dim nPriority As Long
Dim objListItem As ListItem
Dim dblStartTime As Double
Dim dblStopTime As Double
Dim objEffect As AMTimelineEffect
On Local Error GoTo ErrLine
'obtain effect object from timeline object
Set objEffect = objTimelineObject
'obtain property values
objEffect.EffectGetPriority nPriority
objTimelineObject.GetStartStop2 dblStartTime, dblStopTime
'append the effect's information to the listview control
Set objListItem = ctrlListView.ListItems.Add(4, "CLSID", "CLSID")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(objTimelineObject.GetSubObjectGUIDB)
Set objListItem = ctrlListView.ListItems.Add(5, "Start", "Start")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(dblStartTime)
Set objListItem = ctrlListView.ListItems.Add(6, "Stop", "Stop")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(dblStopTime)
'clean-up & dereference
If Not objEffect Is Nothing Then Set objEffect = Nothing
If Not objListItem Is Nothing Then Set objListItem = Nothing
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: ViewTrackInfo
' * procedure description: updates the ide/listview to display the given track information
' *
' ******************************************************************************************************************************
Public Sub ViewTrackInfo(ctrlListView As ListView, objTimelineObject As AMTimelineObj)
Dim nBlank As Long
Dim nPriority As Long
Dim nMuted As Long
Dim dblStartTime As Double
Dim dblStopTime As Double
Dim objListItem As ListItem
Dim objTimelineTrack As AMTimelineTrack
Dim objTimelineVirtualTrack As IAMTimelineVirtualTrack
On Local Error GoTo ErrLine
'obtain timeline track from given timeline object
Set objTimelineTrack = objTimelineObject
'obtain virtual timeline track from given timeline object
Set objTimelineVirtualTrack = objTimelineTrack
'get track property values
objTimelineTrack.AreYouBlank nBlank
objTimelineObject.GetMuted nMuted
objTimelineObject.GetStartStop2 dblStartTime, dblStopTime
objTimelineVirtualTrack.TrackGetPriority nPriority
'append the track's information to the listview control
Set objListItem = ctrlListView.ListItems.Add(4, "Priority", "Priority")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(nPriority)
Set objListItem = ctrlListView.ListItems.Add(5, "Blank", "Blank")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(nBlank)
Set objListItem = ctrlListView.ListItems.Add(6, "Muted", "Muted")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(nMuted)
Set objListItem = ctrlListView.ListItems.Add(7, "Start", "Start")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(dblStartTime)
Set objListItem = ctrlListView.ListItems.Add(8, "Stop", "Stop")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(dblStopTime)
'dereference & clean-up
If Not objListItem Is Nothing Then Set objListItem = Nothing
If Not objTimelineTrack Is Nothing Then Set objTimelineTrack = Nothing
If Not objTimelineVirtualTrack Is Nothing Then Set objTimelineVirtualTrack = Nothing
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub
' ******************************************************************************************************************************
' * procedure name: ViewSourceInfo
' * procedure description: updates the ide/listview to display the given source information
' *
' ******************************************************************************************************************************
Public Sub ViewSourceInfo(ctrlListView As ListView, objTimelineObject As AMTimelineObj)
Dim nMuted As Long
Dim dblTStart As Double
Dim dblTStop As Double
Dim nStretchMode As Long
Dim objListItem As ListItem
Dim dblStartTime As Double
Dim nStreamNumber As Long
Dim dblDefaultFPS As Double
Dim bstrMediaName As String
Dim dblMediaLength As Double
Dim dblMediaStartTime As Double
Dim dblMediaStopTime As Double
Dim objTimelineSource As AMTimelineSrc
On Local Error GoTo ErrLine
'obtain source from given timeline object
Set objTimelineSource = objTimelineObject
'obtain property values given the source object
bstrMediaName = objTimelineSource.GetMediaName
objTimelineSource.GetMediaTimes2 dblMediaStartTime, dblMediaStopTime
objTimelineObject.GetStartStop2 dblTStart, dblTStop
objTimelineSource.GetDefaultFPS dblDefaultFPS
objTimelineSource.GetStreamNumber nStreamNumber
objTimelineSource.GetStretchMode nStretchMode
objTimelineObject.GetMuted nMuted
'append source information on to the listview control
Set objListItem = ctrlListView.ListItems.Add(4, "MediaName", "MediaName")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(bstrMediaName)
Set objListItem = ctrlListView.ListItems.Add(5, "MStart", "MStart")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(dblMediaStartTime)
Set objListItem = ctrlListView.ListItems.Add(6, "MStop", "MStop")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(dblMediaStopTime)
Set objListItem = ctrlListView.ListItems.Add(7, "TStart", "TStart")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(dblTStart)
Set objListItem = ctrlListView.ListItems.Add(8, "TStop", "TStop")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(dblTStop)
Set objListItem = ctrlListView.ListItems.Add(9, "MediaLength", "MediaLength")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(dblMediaLength)
Set objListItem = ctrlListView.ListItems.Add(10, "StreamNumber", "StreamNumber")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(nStreamNumber)
Set objListItem = ctrlListView.ListItems.Add(11, "FPS", "FPS")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(dblDefaultFPS)
Set objListItem = ctrlListView.ListItems.Add(12, "StretchMode", "StretchMode")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(nStretchMode)
Set objListItem = ctrlListView.ListItems.Add(13, "Muted", "Muted")
objListItem.SubItems(ctrlListView.ColumnHeaders("Value").SubItemIndex) = CStr(nMuted)
'clean-up & dereference
If Not objListItem Is Nothing Then Set objListItem = Nothing
If Not objTimelineSource Is Nothing Then Set objTimelineSource = Nothing
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub

View File

@@ -0,0 +1,197 @@
Attribute VB_Name = "modGeneral"
'*******************************************************************************
'* This is a part of the Microsoft DXSDK Code Samples.
'* Copyright (C) 1999-2001 Microsoft Corporation.
'* All rights reserved.
'* This source code is only intended as a supplement to
'* Microsoft Development Tools and/or SDK documentation.
'* See these sources for detailed information regarding the
'* Microsoft samples programs.
'*******************************************************************************
Option Explicit
Option Base 0
Option Compare Text
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- CONSTANTS
' *
' *
Private Const MAX_PATH = 255
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- DATA STRUCTURES
' *
' *
Private Type GUID
Guid1 As Long
Guid2 As Long
Guid3 As Long
Guid4(0 To 7) As Byte
End Type
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- DECLARATIONS
' *
' *
Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Private Declare Function GetComputerNameW Lib "kernel32" (lpBuffer As Any, nSize As Long) As Long
Private Declare Function CoCreateGuid Lib "OLE32.DLL" (pGUID As GUID) As Long
Private Declare Function StringFromGUID2 Lib "OLE32.DLL" (pGUID As GUID, ByVal PointerToString As Long, ByVal MaxLength As Long) As Long
' **************************************************************************************************************************************
' * PUBLIC INTERFACE- PROCEDURES
' *
' *
' ******************************************************************************************************************************
' * procedure name: Buffer_ParseEx
' * procedure description: Parse's a fixed length string buffer of all vbNullCharacters AND vbNullStrings.
' * Argument bstrBuffer evaluates to either an ANSII or Unicode BSTR string buffer.
' * (bstrBuffer is almost always the output from a windows api call which needs parsed)
' *
' ******************************************************************************************************************************
Public Function Buffer_ParseEx(bstrBuffer As String) As String
Dim iCount As Long, bstrChar As String, bstrReturn As String
On Local Error GoTo ErrLine
For iCount = 1 To Len(bstrBuffer) 'set up a loop to remove the vbNullChar's from the buffer.
bstrChar = Strings.Mid(bstrBuffer, iCount, 1)
If bstrChar <> vbNullChar And bstrChar <> vbNullString Then bstrReturn = (bstrReturn + bstrChar)
Next
Buffer_ParseEx = bstrReturn
Exit Function
ErrLine:
Err.Clear
Exit Function
End Function
' ******************************************************************************************************************************
' * procedure name: System_GetComputerName
' * procedure description: Returns the name associated with the local system.
' *
' ******************************************************************************************************************************
Public Function System_GetComputerName() As String
Dim bstrBuffer As String * MAX_PATH, bstrReturn As String
On Local Error GoTo ErrLine
'obtain the computer name via the win32 api
GetComputerName bstrBuffer, Len(bstrBuffer) + 1
'assign the fixed length buffer to a variable length string
bstrReturn = bstrBuffer
'return the value to the client
System_GetComputerName = Buffer_ParseEx(bstrReturn)
Exit Function
ErrLine:
Err.Clear
Exit Function
End Function
' ******************************************************************************************************************************
' * procedure name: ShowCommonDlgOpen
' * procedure description:
' *
' ******************************************************************************************************************************
Public Function ShowCommonDlgOpen(Optional bstrCurrentDirectory As String, Optional bstrDefaultExtension As String, Optional bstrFilter As String) As String
Dim ctrl As Object
On Local Error GoTo ErrLine
'instantiate control
If Not CreateObject("MSComDlg.CommonDialog.1") Is Nothing Then
Set ctrl = CreateObject("MSComDlg.CommonDialog.1")
ElseIf Not CreateObject("MSComDlg.CommonDialog") Is Nothing Then
Set ctrl = CreateObject("MSComDlg.CommonDialog")
End If
If Not ctrl Is Nothing Then
'set properties
ctrl.Filter = bstrFilter
ctrl.DefaultExt = bstrDefaultExtension
ctrl.InitDir = bstrCurrentDirectory
ctrl.ShowOpen
'return to client
ShowCommonDlgOpen = ctrl.FileName
End If
'clean-up & dereference
If Not ctrl Is Nothing Then Set ctrl = Nothing
Exit Function
ErrLine:
Err.Clear
Exit Function
End Function
' ******************************************************************************************************************************
' * procedure name: ShowCommonDlgSave
' * procedure description:
' *
' ******************************************************************************************************************************
Public Function ShowCommonDlgSave(Optional bstrCurrentDirectory As String, Optional bstrDefaultExtension As String, Optional bstrFilter As String) As String
Dim ctrl As Object
On Local Error GoTo ErrLine
'instantiate control
If Not CreateObject("MSComDlg.CommonDialog.1") Is Nothing Then
Set ctrl = CreateObject("MSComDlg.CommonDialog.1")
ElseIf Not CreateObject("MSComDlg.CommonDialog") Is Nothing Then
Set ctrl = CreateObject("MSComDlg.CommonDialog")
End If
If Not ctrl Is Nothing Then
'set properties
ctrl.Filter = bstrFilter
ctrl.DefaultExt = bstrDefaultExtension
ctrl.InitDir = bstrCurrentDirectory
ctrl.ShowSave
'return to client
ShowCommonDlgSave = ctrl.FileName
End If
'clean-up & dereference
If Not ctrl Is Nothing Then Set ctrl = Nothing
Exit Function
ErrLine:
Err.Clear
Exit Function
End Function
' ******************************************************************************************************************************
' * procedure name: GetGUID
' * procedure description: returns a random global unique identifier
' *
' ******************************************************************************************************************************
Public Function GetGUID() As String
Dim udtGUID As GUID, bstrGUID As String, nResultant As Long
On Local Error GoTo ErrLine
nResultant = CoCreateGuid(udtGUID)
If nResultant Then
bstrGUID = vbNullString
Else
bstrGUID = String$(38, 0)
StringFromGUID2 udtGUID, StrPtr(bstrGUID), 39
End If
GetGUID = bstrGUID
Exit Function
ErrLine:
Err.Clear
Exit Function
End Function

View File

@@ -0,0 +1,211 @@
Attribute VB_Name = "modGlobalData"
'*******************************************************************************
'* This is a part of the Microsoft DXSDK Code Samples.
'* Copyright (C) 1999-2001 Microsoft Corporation.
'* All rights reserved.
'* This source code is only intended as a supplement to
'* Microsoft Development Tools and/or SDK documentation.
'* See these sources for detailed information regarding the
'* Microsoft samples programs.
'*******************************************************************************
Option Explicit
Option Base 0
Option Compare Text
' **************************************************************************************************************************************
' * GLOBAL INTERFACE- DATA
' *
' *
'global timeline reference in application
Global gbl_bstrLoadFile As String 'the last file name/path opened by the user
Global gbl_colNormalEnum As Collection 'collection for maintaining node/object relational data
Global gbl_objQuartzVB As VBQuartzHelper 'helper object for rendering filtergraph's using quartz.dll
Global gbl_objTimeline As AMTimeline 'global application timeline
Global gbl_objRenderEngine As RenderEngine 'global application render engine
Global gbl_objFilterGraph As FilgraphManager 'global application filtergraph manager
Global gbl_objDexterObject As AMTimelineObj 'global application dexter object (current object in treeview)
' **************************************************************************************************************************************
' * PUBLIC INTERFACE- PROCEDURES
' *
' *
' ******************************************************************************************************************************
' * procedure name: Main
' * procedure description: Application Entry Point
' *
' ******************************************************************************************************************************
Public Sub Main()
Dim nStart As Long
Dim nLength As Long
Dim bstrFileName As String
Dim boolDynamic As Boolean
Dim boolPlayback As Boolean
Dim boolSmartRecomp As Boolean
Dim boolCloseOnComplete As Boolean
Dim objLocalTimeline As AMTimeline
On Local Error GoTo ErrLine
'inhibit dupe instances of this application
If App.PrevInstance = False Then
'initalize global data
Set gbl_objTimeline = New AMTimeline
'display the main form for the application
Load frmMain: frmMain.Move 0, 0: frmMain.Show: frmMain.Refresh
Else: Exit Sub
End If
'handle command line
If Command <> vbNullString Then
'check the command line argument(s) for a valid xtl filename with double quotes
If InStr(1, UCase(Command), Chr(34)) > 0 Then
nStart = InStr(1, UCase(Command), Chr(34))
nLength = InStr(nStart + 1, Command, Chr(34))
If nLength - nStart > Len(Command) Then
bstrFileName = Mid(Command, nStart, nLength)
End If
bstrFileName = Trim(LCase(Command))
bstrFileName = Replace(bstrFileName, "/r", vbNullString)
bstrFileName = Replace(bstrFileName, "/d", vbNullString)
bstrFileName = Replace(bstrFileName, Chr(34), vbNullString)
bstrFileName = Trim(bstrFileName)
If InStr(1, bstrFileName, ".xtl") > 0 Then
If InStr(1, bstrFileName, ".xtl") + 4 <> Len(bstrFileName) Then
bstrFileName = Left(bstrFileName, InStr(1, bstrFileName, ".xtl") + 4)
End If
End If
'check the command line argument(s) for a valid xtl filename with single quotes
ElseIf InStr(1, UCase(Command), Chr(39)) > 0 Then
nStart = InStr(1, UCase(Command), Chr(39))
nLength = InStr(nStart + 1, Command, Chr(39))
If nLength - nStart > Len(Command) Then
bstrFileName = Mid(Command, nStart, nLength)
End If
bstrFileName = Trim(LCase(Command))
bstrFileName = Replace(bstrFileName, "/r", vbNullString)
bstrFileName = Replace(bstrFileName, "/d", vbNullString)
bstrFileName = Replace(bstrFileName, Chr(39), vbNullString)
bstrFileName = Trim(bstrFileName)
If InStr(1, bstrFileName, ".xtl") > 0 Then
If InStr(1, bstrFileName, ".xtl") + 4 <> Len(bstrFileName) Then
bstrFileName = Left(bstrFileName, InStr(1, bstrFileName, ".xtl") + 4)
End If
End If
'check the command line argument(s) for a valid xtl filename with no quotes
Else
bstrFileName = Trim(LCase(Command))
bstrFileName = Replace(bstrFileName, "/r", vbNullString)
bstrFileName = Replace(bstrFileName, "/d", vbNullString)
bstrFileName = Trim(bstrFileName)
If InStr(1, bstrFileName, ".xtl") > 0 Then
If InStr(1, bstrFileName, ".xtl") + 4 <> Len(bstrFileName) Then
bstrFileName = Left(bstrFileName, InStr(1, bstrFileName, ".xtl") + 4)
End If
End If
End If
'check the command line argument(s) for smart recomp optional
If InStr(1, UCase(Command), Space(1) & "/R") > 0 Then
boolSmartRecomp = True
End If
'check the command line argument(s) for dynamic connections optional
If InStr(1, UCase(Command), Space(1) & "/D") > 0 Then
boolDynamic = True
End If
'check the command line argument(s) for playback optional
If InStr(1, UCase(Command), Space(1) & "/P") > 0 Then
boolPlayback = True
End If
'check the command line argument(s) for close when finished optional
If InStr(1, UCase(Command), Space(1) & "/C") > 0 Then
boolCloseOnComplete = True
End If
End If
'proceed to load the xtl file into the application ide and render it
If InStr(1, LCase(bstrFileName), ".xtl") > 0 Then
'at least it's been named an xtl file, proceed to attempt an import..
Set objLocalTimeline = New AMTimeline
Call RestoreTimeline(objLocalTimeline, bstrFileName, DEXImportXTL)
'verify restoration
If Not objLocalTimeline Is Nothing Then
'import succeeded; clean-up global scope
If Not gbl_objTimeline Is Nothing Then
Call ClearTimeline(gbl_objTimeline)
Set gbl_objTimeline = Nothing
End If
'assign the local timeline to global scope
Set gbl_objTimeline = objLocalTimeline
'reset application-level filename
gbl_bstrLoadFile = bstrFileName
'reset the caption on the application's main form
bstrFileName = Mid(bstrFileName, InStrRev(bstrFileName, "\") + 1)
frmMain.Caption = "DexterVB - " & bstrFileName
Else: Exit Sub
End If
End If
'render the timeline and derive a filter graph manager
Set gbl_objFilterGraph = RenderTimeline(gbl_objTimeline, boolDynamic, boolSmartRecomp)
Set gbl_objQuartzVB.FilterGraph = gbl_objFilterGraph
'map the timeline to the userinterface
Call GetTimelineDirect(frmMain.tvwSimpleTree, gbl_objTimeline, gbl_colNormalEnum)
frmMain.mnuTimeLineClearRenderEngine.Enabled = False
'update the button(s)
With frmMain.tbMain.Buttons
.Item("Play").Image = 6
.Item("Pause").Image = 7
.Item("Stop").Image = 22
.Item("Rewind").Image = 18
.Item("FastForward").Image = 24
.Item("SeekForward").Image = 23
.Item("SeekBackward").Image = 19
.Item("Play").Enabled = True
.Item("Pause").Enabled = True
.Item("Stop").Enabled = False
.Item("Rewind").Enabled = False
.Item("FastForward").Enabled = False
.Item("SeekForward").Enabled = False
.Item("SeekBackward").Enabled = False
End With
'update the state on the popup context menu
frmMain.mnuTimeLinePlay.Enabled = True
frmMain.mnuTimeLineStop.Enabled = False
frmMain.mnuTimeLinePause.Enabled = True
frmMain.mnuTimeLineRenderTimeLine.Enabled = False
frmMain.mnuTimeLineClearRenderEngine.Enabled = False
If boolPlayback Then
'run the graph
Call gbl_objFilterGraph.Run
'if optional close on complete, unload when the timeline is finished rendering..
If boolCloseOnComplete = True Then
Do Until gbl_objQuartzVB.Position = gbl_objQuartzVB.StopTime: DoEvents: DoEvents
If frmMain.Visible = False Then
Exit Do
End If
Loop
Unload frmMain: Set frmMain = Nothing: Exit Sub
End If
End If
'clean-up & dereference
If Not objLocalTimeline Is Nothing Then Set objLocalTimeline = Nothing
Exit Sub
ErrLine:
Err.Clear
Exit Sub
End Sub

View File

@@ -0,0 +1,622 @@
Attribute VB_Name = "modRegistry"
'*******************************************************************************
'* This is a part of the Microsoft DXSDK Code Samples.
'* Copyright (C) 1999-2001 Microsoft Corporation.
'* All rights reserved.
'* This source code is only intended as a supplement to
'* Microsoft Development Tools and/or SDK documentation.
'* See these sources for detailed information regarding the
'* Microsoft samples programs.
'*******************************************************************************
Option Explicit
Option Base 0
Option Compare Text
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- DATA STRUCTURES
' *
' *
Private Type ACL
AclRevision As Byte
Sbz1 As Byte
AclSize As Integer
AceCount As Integer
Sbz2 As Integer
End Type
Private Type FILETIME
dwLowDateTime As Long
dwHighDateTime As Long
End Type
Private Type SECURITY_ATTRIBUTES
nLength As Long
lpSecurityDescriptor As Long
bInheritHandle As Long
End Type
Private Type SECURITY_DESCRIPTOR
Revision As Byte
Sbz1 As Byte
Control As Long
Owner As Long
Group As Long
Sacl As ACL
Dacl As ACL
End Type
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- PREDEFINED CONSTANTS
' *
' *
Private Const MAX_PATH = 255
Private Const ERROR_SUCCESS = 0
Private Const KEY_ALL_ACCESS = &H1F0000 '((STANDARD_RIGHTS_ALL Or KEY_QUERY_VALUE Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY Or KEY_CREATE_LINK) And (Not SYNCHRONIZE))
Private Const KEY_CREATE_LINK = &H20
Private Const KEY_CREATE_SUB_KEY = &H4
Private Const KEY_ENUMERATE_SUB_KEYS = &H8
Private Const KEY_EVENT = &H1 ''"" Event contains key event record
Private Const KEY_EXECUTE = &H1 '((KEY_READ) And (Not SYNCHRONIZE))
Private Const KEY_FULL_MATCH_SEARCH = &H1
Private Const KEY_LENGTH_MASK = &HFFFF0000
Private Const KEY_NOTIFY = &H10
Private Const KEY_PARTIAL_MATCH_SEARCH = &H2
Private Const KEY_QUERY_VALUE = &H1
Private Const KEY_READ = KEY_QUERY_VALUE '((STANDARD_RIGHTS_READ Or KEY_QUERY_VALUE Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY) And (Not SYNCHRONIZE))
Private Const KEY_SET_VALUE = &H2
Private Const KEY_WRITE = KEY_SET_VALUE '((STANDARD_RIGHTS_WRITE Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY) And (Not SYNCHRONIZE))
Private Const REG_CREATED_NEW_KEY = &H1
Private Const REG_FULL_RESOURCE_DESCRIPTOR = 9
Private Const REG_LEGAL_CHANGE_FILTER = &H2 ' (REG_NOTIFY_CHANGE_NAME Or REG_NOTIFY_CHANGE_ATTRIBUTES Or REG_NOTIFY_CHANGE_LAST_SET Or REG_NOTIFY_CHANGE_SECURITY)
Private Const REG_LEGAL_OPTION = 0 '(REG_OPTION_RESERVED Or REG_OPTION_NON_VOLATILE Or REG_OPTION_VOLATILE Or REG_OPTION_CREATE_LINK Or REG_OPTION_BACKUP_RESTORE)
Private Const REG_NOTIFY_CHANGE_ATTRIBUTES = &H2
Private Const REG_NOTIFY_CHANGE_LAST_SET = &H4
Private Const REG_NOTIFY_CHANGE_NAME = &H1
Private Const REG_NOTIFY_CHANGE_SECURITY = &H8
Private Const REG_OPENED_EXISTING_KEY = &H2
Private Const REG_OPTION_BACKUP_RESTORE = 4
Private Const REG_OPTION_CREATE_LINK = 2
Private Const REG_OPTION_NON_VOLATILE = 0
Private Const REG_OPTION_RESERVED = 0
Private Const REG_OPTION_VOLATILE = 1
Private Const REG_REFRESH_HIVE = &H2
Private Const REG_RESOURCE_REQUIREMENTS_LIST = 10
Private Const REG_WHOLE_HIVE_VOLATILE = &H1
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- WIN32 API DECLARATIONS
' *
' *
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Declare Function RegConnectRegistry Lib "advapi32.dll" Alias "RegConnectRegistryA" (ByVal lpMachineName As String, ByVal hKey As Long, phkResult As Long) As Long
Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegCreateKeyEx Lib "advapi32.dll" Alias "RegCreateKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal Reserved As Long, ByVal lpClass As String, ByVal dwOptions As Long, ByVal samDesired As Long, lpSecurityAttributes As SECURITY_ATTRIBUTES, phkResult As Long, lpdwDisposition As Long) As Long
Private Declare Function RegDeleteKey Lib "advapi32.dll" Alias "RegDeleteKeyA" (ByVal hKey As Long, ByVal lpSubKey As String) As Long
Private Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" (ByVal hKey As Long, ByVal lpValueName As String) As Long
Private Declare Function RegEnumKey Lib "advapi32.dll" Alias "RegEnumKeyA" (ByVal hKey As Long, ByVal dwIndex As Long, ByVal lpName As String, ByVal cbName As Long) As Long
Private Declare Function RegEnumKeyEx Lib "advapi32.dll" Alias "RegEnumKeyExA" (ByVal hKey As Long, ByVal dwIndex As Long, ByVal lpName As String, lpcbName As Long, ByVal lpReserved As Long, ByVal lpClass As String, lpcbClass As Long, lpftLastWriteTime As FILETIME) As Long
Private Declare Function RegEnumValue Lib "advapi32.dll" Alias "RegEnumValueA" (ByVal hKey As Long, ByVal dwIndex As Long, ByVal lpValueName As String, lpcbValueName As Long, ByVal lpReserved As Long, lpType As Long, lpData As Byte, lpcbData As Long) As Long
Private Declare Function RegFlushKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Declare Function RegGetKeySecurity Lib "advapi32.dll" (ByVal hKey As Long, ByVal SecurityInformation As Long, pSecurityDescriptor As SECURITY_DESCRIPTOR, lpcbSecurityDescriptor As Long) As Long
Private Declare Function RegLoadKey Lib "advapi32.dll" Alias "RegLoadKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal lpFile As String) As Long
Private Declare Function RegNotifyChangeKeyValue Lib "advapi32.dll" (ByVal hKey As Long, ByVal bWatchSubtree As Long, ByVal dwNotifyFilter As Long, ByVal hEvent As Long, ByVal fAsynchronus As Long) As Long
Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long
Private Declare Function RegQueryInfoKey Lib "advapi32.dll" Alias "RegQueryInfoKeyA" (ByVal hKey As Long, ByVal lpClass As String, lpcbClass As Long, ByVal lpReserved As Long, lpcSubKeys As Long, lpcbMaxSubKeyLen As Long, lpcbMaxClassLen As Long, lpcValues As Long, lpcbMaxValueNameLen As Long, lpcbMaxValueLen As Long, lpcbSecurityDescriptor As Long, lpftLastWriteTime As FILETIME) As Long
Private Declare Function RegQueryValue Lib "advapi32.dll" Alias "RegQueryValueA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal lpValue As String, lpcbValue As Long) As Long
Private Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long
Private Declare Function RegReplaceKey Lib "advapi32.dll" Alias "RegReplaceKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal lpNewFile As String, ByVal lpOldFile As String) As Long
Private Declare Function RegRestoreKey Lib "advapi32.dll" Alias "RegRestoreKeyA" (ByVal hKey As Long, ByVal lpFile As String, ByVal dwFlags As Long) As Long
Private Declare Function RegSaveKey Lib "advapi32.dll" Alias "RegSaveKeyA" (ByVal hKey As Long, ByVal lpFile As String, lpSecurityAttributes As SECURITY_ATTRIBUTES) As Long
Private Declare Function RegSetKeySecurity Lib "advapi32.dll" (ByVal hKey As Long, ByVal SecurityInformation As Long, pSecurityDescriptor As SECURITY_DESCRIPTOR) As Long
Private Declare Function RegSetValue Lib "advapi32.dll" Alias "RegSetValueA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal dwType As Long, ByVal lpData As String, ByVal cbData As Long) As Long
Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long
Private Declare Function RegUnLoadKey Lib "advapi32.dll" Alias "RegUnLoadKeyA" (ByVal hKey As Long, ByVal lpSubKey As String) As Long
' **************************************************************************************************************************************
' * PUBLIC INTERFACE- ENUMERATIONS
' *
' *
Public Enum hKey
HKEY_CLASSES_ROOT = &H80000000
HKEY_CURRENT_CONFIG = &H80000005
HKEY_CURRENT_USER = &H80000001
HKEY_DYN_DATA = &H80000006
HKEY_LOCAL_MACHINE = &H80000002
HKEY_PERFORMANCE_DATA = &H80000004
HKEY_USERS = &H80000003
End Enum
Public Enum EntryFormat
REG_BINARY = 0 'Binary data in any form.
REG_DWORD = 1 'A 32-bit number.
REG_DWORD_LITTLE_ENDIAN = 2 'A 32-bit number in little-endian format. This is equivalent to REG_DWORD.
REG_DWORD_BIG_ENDIAN = 3 'A 32-bit number in big-endian format.
REG_EXPAND_SZ = 4 'A null-terminated string that contains unexpanded references to environment variables
REG_LINK = 5 'A Unicode symbolic link.
REG_MULTI_SZ = 6 'An array of null-terminated strings, terminated by two null characters.
REG_NONE = 7 'No defined value type.
REG_RESOURCE_LIST = 8 'A device-driver resource list.
REG_SZ = 9 'A null-terminated string. It will be a Unicode or ANSI string depending on whether you use Unicode or ANSI.
End Enum
' **************************************************************************************************************************************
' * PUBLIC INTERFACE- PROCEDURES
' *
' *
' ******************************************************************************************************************************
' * procedure name: Registry_CreateKey
' * procedure description: Create's a new key in the window's system registry.
' * Returns the registry error code on failure, the new handle on success
' ******************************************************************************************************************************
Public Function Registry_CreateKey(MainKey As hKey, SubKey As String) As Long
Dim nRet As Long, nDisposition As Long, nKey As Long
Dim sSubKey As String, nSubStart As Integer, SecAttr As SECURITY_ATTRIBUTES
On Local Error GoTo ErrLine
'check to ensure subkey is valid
If Len(SubKey) = 0 Then Exit Function
'check to ensure the mainkey is valid
If CLng(MainKey) = 0 Then Exit Function
'convert to upper case
SubKey = UCase(SubKey)
'check for backslash
If Left(SubKey, 1) = "\" Then SubKey = Mid(SubKey, 2, Len(SubKey))
'Create a new Key
nRet = RegCreateKeyEx(CLng(MainKey), SubKey, 0, vbNullString, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, SecAttr, nKey, nDisposition)
If nKey <> 0 Then 'the key was created successfully; return the handle.
RegCloseKey (nKey)
Registry_CreateKey = nRet
Else 'an error occured, return zero and exit.
Registry_CreateKey = 0
Exit Function
End If
Exit Function
ErrLine:
Err.Clear
If nKey <> 0 Then RegCloseKey (nKey) 'the key is open close it and exit
Exit Function
End Function
' ******************************************************************************************************************************
' * procedure name: Registry_DeleteKey
' * procedure description: deletes an existing key in the window's system registry.
' *
' ******************************************************************************************************************************
Public Function Registry_DeleteKey(MainKey As hKey, SubKey As String) As Long
On Local Error GoTo ErrLine
'check to ensure subkey is valid
If Len(SubKey) = 0 Then Exit Function
'check to ensure the mainkey is valid
If CLng(MainKey) = 0 Then Exit Function
'convert to upper case
SubKey = UCase(SubKey)
'check for backslash
If Left(SubKey, 1) = "\" Then SubKey = Mid(SubKey, 2, Len(SubKey))
'delete the key from the registry; if WinNT this will fail if the key has subkeys
Registry_DeleteKey = RegDeleteKey(CLng(MainKey), SubKey)
'exit
Exit Function
ErrLine:
Err.Clear
Exit Function
End Function
' ******************************************************************************************************************************
' * procedure name: Registry_DoesKeyExist
' * procedure description: Checks to ensure a key does in fact exist
' *
' ******************************************************************************************************************************
Public Function Registry_DoesKeyExist(MainKey As hKey, SubKey As String) As Boolean
Dim nSubHandle As Long
On Local Error GoTo ErrLine
'check to ensure subkey is valid
If Len(SubKey) = 0 Then Exit Function
'check to ensure the mainkey is valid
If CLng(MainKey) = 0 Then Exit Function
'convert to upper case
SubKey = UCase(SubKey)
'check for backslash
If Left(SubKey, 1) = "\" Then SubKey = Mid(SubKey, 2, Len(SubKey))
'open the key for read access
RegOpenKeyEx CLng(MainKey), SubKey, 0, KEY_READ, nSubHandle
'return and exit
If nSubHandle <> 0 Then
Registry_DoesKeyExist = True
RegCloseKey (nSubHandle)
Else: Registry_DoesKeyExist = False
End If
Exit Function
ErrLine:
Err.Clear
Exit Function
End Function
' ******************************************************************************************************************************
' * procedure name: Registry_CreateEntry
' * procedure description: Creates an entry for the user
' *
' ******************************************************************************************************************************
Public Function Registry_CreateEntry(MainKey As hKey, SubKey As String, strEntry As String, Optional strEntryValue As String = vbNullString, Optional Format As EntryFormat = REG_SZ) As Long
Dim nSubHandle As Long, nRet As Long, strBuffer As String
On Local Error GoTo ErrLine
'check to ensure subkey is valid
If Len(SubKey) = 0 Then Exit Function
'check to ensure the mainkey is valid
If CLng(MainKey) = 0 Then Exit Function
'check to ensure the entry's string data is null-terminated
If Right(strEntryValue, 1) <> vbNullChar Then strEntryValue = (strEntryValue & vbNullChar)
'form a buffer for the entry's string data to be passed the the api
strBuffer = String(Len(strEntryValue), 0)
strBuffer = strEntryValue
'convert to upper case
SubKey = UCase(SubKey)
'check for backslash
If Left(SubKey, 1) = "\" Then SubKey = Mid(SubKey, 2, Len(SubKey))
'open the key with update value access; this should be all that is required to append an entry..
nRet = RegOpenKeyEx(CLng(MainKey), SubKey, 0, KEY_SET_VALUE, nSubHandle)
'check api return for success before continueing
If nRet <> ERROR_SUCCESS Or nSubHandle = 0 Then Exit Function
'set the new entry value to the key
Registry_CreateEntry = RegSetValueEx(nSubHandle, strEntry, 0, CLng(Format), ByVal strBuffer, Len(strBuffer) + 1)
'close the key handle
RegCloseKey (nSubHandle)
'exit
Exit Function
ErrLine:
Err.Clear
Exit Function
End Function
' ******************************************************************************************************************************
' * procedure name: Registry_DeleteEntry
' * procedure description: Delete's an entry in a registry subkey
' *
' ******************************************************************************************************************************
Public Function Registry_DeleteEntry(MainKey As hKey, SubKey As String, strEntry As String) As Long
Dim nSubHandle, nRet As Long
On Local Error GoTo ErrLine
'check to ensure subkey is valid
If Len(SubKey) = 0 Then Exit Function
'check to ensure the mainkey is valid
If CLng(MainKey) = 0 Then Exit Function
'check to ensure the entryname is valid
If strEntry = vbNullString Then Exit Function
'check that it is null terminated
If Right(strEntry, 1) <> vbNullChar Then strEntry = (strEntry & vbNullChar)
'convert to upper case
SubKey = UCase(SubKey)
'check for backslash
If Left(SubKey, 1) = "\" Then SubKey = Mid(SubKey, 2, Len(SubKey))
'open the key with local write access; this should be all that is required to append an entry..
nRet = RegOpenKeyEx(CLng(MainKey), SubKey, 0, KEY_WRITE, nSubHandle)
'check api return before continueing
If nRet <> ERROR_SUCCESS Or nSubHandle = 0 Then Exit Function
'attempt to delete the entry and return the result
Registry_DeleteEntry = RegDeleteValue(nSubHandle, strEntry)
'close the open key handle and exit
RegCloseKey (nSubHandle)
Exit Function
ErrLine:
Err.Clear
Exit Function
End Function
' ******************************************************************************************************************************
' * procedure name: Registry_UpdateEntry
' * procedure description: Updates the value of an entry within a subkey; this function will create it if it does not exist.
' *
' ******************************************************************************************************************************
Public Function Registry_UpdateEntry(MainKey As hKey, SubKey As String, strEntry As String, strEntryValue As String, Optional Format As EntryFormat = REG_SZ) As Long
Dim nSubHandle As Long, nRet As Long, strBuffer As String
On Local Error GoTo ErrLine
'check to ensure subkey is valid
If Len(SubKey) = 0 Then Exit Function
'check to ensure the mainkey is valid
If CLng(MainKey) = 0 Then Exit Function
'check to ensure the entry's string data is null-terminated
If Right(strEntryValue, 1) <> vbNullChar Then strEntryValue = (strEntryValue & vbNullChar)
'form a buffer for the entry's string data to be passed the the api
strBuffer = String(Len(strEntryValue), 0)
strBuffer = strEntryValue
'convert to upper case
SubKey = UCase(SubKey)
'check for backslash
If Left(SubKey, 1) = "\" Then SubKey = Mid(SubKey, 2, Len(SubKey))
'open the key with update value access; this should be all that is required to append an entry..
nRet = RegOpenKeyEx(CLng(MainKey), SubKey, 0, KEY_SET_VALUE, nSubHandle)
'check api return for success before continueing
If nRet <> ERROR_SUCCESS Or nSubHandle = 0 Then Exit Function
'set the new entry value to the key
Registry_UpdateEntry = RegSetValueEx(nSubHandle, strEntry, 0, CLng(Format), ByVal strBuffer, Len(strBuffer) + 1)
'close the key handle
RegCloseKey (nSubHandle)
'exit
Exit Function
ErrLine:
Err.Clear
Exit Function
End Function
' ******************************************************************************************************************************
' * procedure name: Registry_QueryEntryValue
' * procedure description: Returns the value of an entry; on error returns default
' *
' ******************************************************************************************************************************
Public Function Registry_QueryEntryValue(MainKey As hKey, SubKey As String, strEntry As String, Optional Default As String = vbNullString) As String
Dim nSubHandle As Long, nFileTime As FILETIME
Dim nRet As Long, strBuffer As String, nMaxValueLen As Long
On Local Error GoTo ErrLine
'check to ensure subkey is valid
If Len(SubKey) = 0 Then Exit Function
'check to ensure the mainkey is valid
If CLng(MainKey) = 0 Then Exit Function
'Check to ensure the entry is valid
If strEntry = vbNullString Then Exit Function
'convert to upper case
SubKey = UCase(SubKey)
'check for backslash
If Left(SubKey, 1) = "\" Then SubKey = Mid(SubKey, 2, Len(SubKey))
'open the key and get a handle
nRet = RegOpenKeyEx(CLng(MainKey), SubKey, 0, KEY_READ, nSubHandle)
'check the api return
If nRet <> ERROR_SUCCESS Or nSubHandle = 0 Then Exit Function
'get the length of the largest given entry in the subkey so that we may be able to form a properly sized buffer
nRet = RegQueryInfoKey(nSubHandle, vbNullString, 0, 0, 0, 0, 0, 0, 0, nMaxValueLen, 0, nFileTime)
'set up a properly sized buffer given the known largest entry value size; set to MAX_PATH in case of last api failure
If nMaxValueLen < 255 Then nMaxValueLen = 255
strBuffer = String(nMaxValueLen, 0)
'query the key for an entry value
nMaxValueLen = Len(strBuffer) + 1
nRet = RegQueryValueEx(nSubHandle, strEntry, 0, 0, ByVal strBuffer, nMaxValueLen)
If nRet = ERROR_SUCCESS Then
strBuffer = Left(strBuffer, nMaxValueLen)
Registry_QueryEntryValue = strBuffer
Else: Registry_QueryEntryValue = Default
End If
'close the handle, return the value and exit
RegCloseKey (nSubHandle)
Exit Function
ErrLine:
Err.Clear
Exit Function
End Function
' ******************************************************************************************************************************
' * procedure name: Registry_QueryEntryType
' * procedure description: Returns the type of data an entry contains.
' *
' ******************************************************************************************************************************
Public Function Registry_QueryEntryType(MainKey As hKey, SubKey As String, strEntry As String) As EntryFormat
Dim nType As Long, nSubHandle As Long, nRet As Long
On Local Error GoTo ErrLine
'check to ensure subkey is valid
If Len(SubKey) = 0 Then Exit Function
'check to ensure the mainkey is valid
If CLng(MainKey) = 0 Then Exit Function
'Check to ensure the entry is valid
If strEntry = vbNullString Then Exit Function
'convert to upper case
SubKey = UCase(SubKey)
'check for backslash
If Left(SubKey, 1) = "\" Then SubKey = Mid(SubKey, 2, Len(SubKey))
'open the key for read access
nRet = RegOpenKeyEx(CLng(MainKey), SubKey, 0, KEY_READ, nSubHandle)
'check return on api call
If nRet <> ERROR_SUCCESS Or nSubHandle = 0 Then Exit Function
'query the entry in the key for any given type information
nRet = RegQueryValueEx(nSubHandle, ByVal strEntry, 0, nType, 0, 0)
Select Case nType
Case 0: Registry_QueryEntryType = REG_BINARY
Case 1: Registry_QueryEntryType = REG_DWORD
Case 2: Registry_QueryEntryType = REG_DWORD_BIG_ENDIAN
Case 3: Registry_QueryEntryType = REG_DWORD_LITTLE_ENDIAN
Case 4: Registry_QueryEntryType = REG_EXPAND_SZ
Case 5: Registry_QueryEntryType = REG_LINK
Case 6: Registry_QueryEntryType = REG_MULTI_SZ
Case 7: Registry_QueryEntryType = REG_NONE
Case 8: Registry_QueryEntryType = REG_RESOURCE_LIST
Case 9: Registry_QueryEntryType = REG_SZ
End Select
'exit
Exit Function
ErrLine:
Err.Clear
Exit Function
End Function
' ******************************************************************************************************************************
' * procedure name: Registry_DoesEntryExist
' * procedure description: Checks to ensure an entry does in fact exist
' *
' ******************************************************************************************************************************
Public Function Registry_DoesEntryExist(MainKey As hKey, SubKey As String, strEntry As String) As Boolean
Dim nType As Long, nSubHandle As Long, nRet As Long
On Local Error GoTo ErrLine
'check to ensure subkey is valid
If Len(SubKey) = 0 Then Exit Function
'check to ensure the mainkey is valid
If CLng(MainKey) = 0 Then Exit Function
'Check to ensure the entry is valid
If strEntry = vbNullString Then Exit Function
'convert to upper case
SubKey = UCase(SubKey)
'check for backslash
If Left(SubKey, 1) = "\" Then SubKey = Mid(SubKey, 2, Len(SubKey))
'open the key for read access
nRet = RegOpenKeyEx(CLng(MainKey), SubKey, 0, KEY_READ, nSubHandle)
'check return on api call
If nRet <> ERROR_SUCCESS Or nSubHandle = 0 Then Exit Function
'query the entry in the key for any given type information
nRet = RegQueryValueEx(nSubHandle, ByVal strEntry, 0, nType, 0, 0)
'verify api return
If nRet > 0 Then
Registry_DoesEntryExist = True
Else
Registry_DoesEntryExist = False
End If
'exit
Exit Function
ErrLine:
Err.Clear
Exit Function
End Function
' **************************************************************************************************************************************
' * PRIVATE INTERFACE- PROCEDURES
' *
' *
' ******************************************************************************************************************************
' * procedure name: Reg_KeyToStr
' * procedure description: Returns a string denoteing the current key handle; this can be used later
' * if you decide to extend remote registry access functionality into this module.
' ******************************************************************************************************************************
Private Function Reg_KeyToStr(nKey As Long) As String
On Local Error GoTo ErrLine
Select Case nKey
Case HKEY_CLASSES_ROOT: Reg_KeyToStr = "HKEY_CLASSES_ROOT"
Case HKEY_CURRENT_CONFIG: Reg_KeyToStr = "HKEY_CURRENT_CONFIG"
Case HKEY_CURRENT_USER: Reg_KeyToStr = "HKEY_CURRENT_USER"
Case HKEY_LOCAL_MACHINE: Reg_KeyToStr = "HKEY_LOCAL_MACHINE"
Case HKEY_USERS: Reg_KeyToStr = "HKEY_USERS"
Case HKEY_DYN_DATA: Reg_KeyToStr = "HKEY_DYN_DATA"
Case HKEY_PERFORMANCE_DATA: Reg_KeyToStr = "HKEY_PERFORMANCE_DATA"
Case Else: Reg_KeyToStr = vbNullString
End Select
Exit Function
ErrLine:
Err.Clear
Exit Function
End Function

View File

@@ -0,0 +1,14 @@
DirectShow Sample -- DexterVB
-----------------------------
Video editing application for Microsoft Visual Basic.
This sample application is a graphical tool for creating Microsoft DirectShow
Editing Services timelines. It demonstrates the following tasks:
- Loading and saving XTL project files
- Adding, editing, and deleting timeline objects
- Previewing a timeline
For more information about this sample, see "DirectShow Samples" in the
DirectX 8 SDK documentation.

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 774 B

View File

@@ -0,0 +1,43 @@
Dexter (DirectShow Editing Services) VB Sample Application
Source: (SDK root)\Samples\Multimedia\VBSamples\DirectShow\Editing\DexterVB
The Dexter VB Sample application is a GUI-based tool used to create a multimedia timeline and to load, edit, and save the timeline to an .XTL file. This sample application demonstrates the following tasks related to timeline functions in Visual Basic:
* Loading and saving .XTL files through the Dexter libraries
* Adding, editing, and deleting items from the timeline through the Dexter libraries
* Support for rendering audio and video playback to an ActiveMovie window through the Dexter libraries
The user interface is divided into the following parts.
1. Pull Down Menus
a. Creating New Timelines.
b. Opening Existing Timelines
c. Saving Timelines
d. Exiting the Application
2. Button Bar
3. Tree View
4. Explorer View
The button bar is divided into the following sections, from left to right.
New
Open
Save
Seek To Beginning of timeline
Seek Backward 1 second
Play Timeline
Pause Playback
Stop Playback
Seek Forward 1 second
Seek to End of timeline
Once the timeline is loaded, the timeline will appear in the left pane of the application in the tree view.
If you select an item in the tree view, the properties for that item are displayed in the right pane (in a read-only list view control).
Timeline Operations (Inserts / Edits / Deletes) are accomplished by right clicking on an item in the left pane. A context-sensitive menu will appear that will allow you to modify the timeline. A different popup menu will appear depending on the item selected in the TreeView. For example, right clicking on the timeline will bring up the timeline menu, whereas right clicking on the group will bring up the group menu. These menus are different and will only allow you to do timeline modifications that are allowed on the selected object.
The pull-down menus are for creating a new timeline, opening an existing timeline, and saving a timeline as an XML file.

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB