荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: kuo (renew), 信区: Multimedia
标  题: 利用MCI语句控制MPEG文件的播放:
发信站: BBS 荔园晨风站 (Fri Dec 15 00:55:25 2000), 站内信件

在装入A4wmme.u32时,选择 MCISendString 和 MCIGetReturnString 函数。
(1) 打开设备命令:
cmdstring := "open "^MovieFile^ " alias movie"
MCISendString(cmdstring)
cmdstring := "window movie handle "^WindowHandle
MCISendString(cmdstring)
cmdstring := "window movie state no action"
MCISendString(cmdstring)
cmdstring :="seek movie to end"
MCISendString(cmdstring)
cmdstring :="status movie position"
MCISendString(cmdstring)
end := MCIGetReturnString()
cmdstring :="seek movie to start"
MCISendString(cmdstring)
cmdstring :="status movie position"
MCISendString(cmdstring)
start := MCIGetReturnString()
(2) 播放设备命令:
cmdstring := "put movie destination at 170 120 320 240"
MCISendString(cmdstring)
cmdstring := "play movie"
MCISendString(cmdstring)
(3)停止并关闭设备命令:
cmdstring :="pause movie"
MCISendString(cmdstring)
cmdstring := "put movie destination at 0 0 0 0"
MCISendString(cmdstring)
cmdstring := "stop movie"
MCISendString(cmdstring)
cmdstring := "close movie"
MCISendString(cmdstring)
以上MCI 命令可以完成基本的播放任务,可以在需要的程序位置上加入。MovieFile变量
中放置所要播放的Mpeg文件名即可。有关其它MCI 命令的具体使用,需要参阅MCI 命令
手册。

--
※ 来源:·BBS 荔园晨风站 bbs.szu.edu.cn·[FROM: 202.104.105.53]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店