home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BUG 4
/
BUGCD1997_05.BIN
/
aplic
/
clip4win
/
clip4win.exe
/
C4W30E.HUF
/
SOURCE
/
MCI2.PRG
< prev
next >
Wrap
Text File
|
1995-06-27
|
2KB
|
78 lines
////////////////////////////
//
// Clip-4-Win video MCI sample
//
// Copyright (C) 1994 Skelton Software, Kendal Cottage, Hillam, Leeds, UK.
// All Rights Reserved.
//
////////////////////////////
#include "windows.ch"
#include "dll.ch"
#define NO_C4WCLASS
#include "commands.ch"
static lOpen := .f.
function main()
local hWnd := WinSetup("mci", "Clip-4-Win Media Control Interface")
DoVideo(hWnd)
return 0
static function DoVideo(hWnd)
local oDlg
CREATE DIALOG oDlg TITLE "Clip-4-Win AVI Sample" AT 10,10 SIZE 200,150
@ ID IDCANCEL BUTTON TEXT "&Cancel" AT 150,10 SIZE 40,12 IN oDlg
@ ID 101 BUTTON Open TEXT "&Open Video" AT 150,30 SIZE 40,12 IN oDlg
@ ID 102 BUTTON Play TEXT "&Play Video" AT 150,50 SIZE 40,12 IN oDlg
SHOW DIALOG oDlg
if lOpen
mciExecute("close TheVid")
endif
return nil
static function Open(hWnd)
local cFile, cCmd, nRet
if lOpen
mciExecute("close TheVid")
endif
if (cFile := GetOpenFileName(hWnd, "*.AVI", "Select a video to play", ;
{{"Video Files (*.AVI)", "*.AVI"}})) == nil
return nil
endif
cCmd = "open " + cFile + " type avivideo alias TheVid style child" ;
+ " parent " + ltrim(str(hWnd))
nRet = mciExecute(cCmd)
nRet = mciExecute("put TheVid window at 10 10 280 280")
lOpen = .t.
return 1
static function Play()
if lOpen
mciExecute("seek TheVid to start")
endif
mciExecute("play TheVid")
return 1
_DLL function mciExecute(cCmd AS STRING) AS INT Pascal:MMSystem.mciExecute