悬赏200分:有知道MCI字符串的,用SendMciString的。(200分)

  • 主题发起人 xujunhua
  • 开始时间
X

xujunhua

Unregistered / Unconfirmed
GUEST, unregistred user!
悬赏200分:有知道MCI字符串的,用SendMciString的,最好是用于CDADuio的

指令,先来先得,这里不够可以到我的另外那个200分的问题中去拿。
 
B

bethouvnlue

Unregistered / Unconfirmed
GUEST, unregistred user!
写错了吧,好象是MciSendString
你要的是这些资料吗?(Copied from MSDN)
|
/|/

play
The play command starts playing a device. CD audio, digital-video, MIDI sequencer, videodisc, VCR, and waveform-audio devices recognize this command.

wsprintf(lpstrCommand, "play %s %s %s", lpszDeviceID, lpszPlayFlags,
lpszFlags);


Parameters
lpszDeviceID
Identifier of an MCI device. This identifier or alias is assigned when the device is opened.
lpszPlayFlags
Flag for playing a device. The following table lists device types that recognize the play command and the flags used by each type: cdaudio from position to position
digitalvideo from position
fullscreen
repeat reverse
to position
window
sequencer from position to position
vcr at time
from position
reverse scan
to position
videodisc fast
from position
reverse
scan slow
speed integer
to position
waveaudio from position to position


The following table lists the flags that can be specified in the lpszPlayFlags parameter and their meanings: at time Indicates when the device should begin
performing this command, or, if the device has been cued, when the cued command begin
s. For more information, see the cue command.
fast Indicates that the device should play faster than normal. To determine the exact speed on a videodisc player, use the "speed" flag of the status command. To specify the speed more precisely, use the "speed" flag of this command.
from position Specifies a starting position for the playback. If the "from" flag is not specified, playback begin
s at the current position. For cdaudio devices, if the "from" position is greater than the end position of the disc, or if the "from" position is greater than the "to" position, the driver returns an error. For videodisc devices, the default positions are in frames for CAV discs and in hours, minutes, and seconds for CLV discs.
fullscreen Specifies that a full-screen display should be used. Use this flag only when playing compressed files. (Uncompressed files won't play full-screen.)
repeat Specifies that playback should restart when the end of the content is reached.
reverse Specifies that the play direction is backward. You cannot specify an ending location with the "reverse" flag. For videodiscs, "scan" applies only to CAV format.
scan Plays as fast as possible without disabling video (although audio might be disabled). For videodiscs, "scan" applies only to CAV format.
slow Plays slowly. To determine the exact speed on a videodisc player, use the "speed" flag of the status command. To specify the speed more precisely, use the "speed" flag of this command. For videodiscs, "slow" applies only to CAV format.
speed integer Plays a videodisc at the specified speed, in frames per second. This flag applies only to CAV discs.
to position Specifies an ending position for the playback. If the "to" flag is not specified, playback stops at the end of the content. For cdaudio devices, if the "to" position is greater than the end position of the disc, the driver returns an error. For videodisc devices, the default positions are in frames for CAV discs and in hours, minutes, and seconds for CLV discs.
window Specifies that playing should use the window associated with the device instance. This is the default setting.



lpszFlags
Can be "wait", "notify", or both. For digital-video and VCR devices, "test" can also be specified. For more information about these flags, see The Wait, Notify, and Test Flags.
Return Values
Returns zero if successful or an error otherwise.

Remarks
Before issuing commands that use position values, you should set the desired time format by using the set command. This command begin
s playing at the current speed, as set with the set "speed" command. The direction is reverse if the "reverse" flag is specified, or if the "to" flag is specified as a value less than the "from" flag. If the "from" flag is not specified, playback begin
s at the current position. The "to" and "reverse" flags cannot be used together.

The following command plays the "mysound" device from position 1000 through position 2000, sending a notification message when the playback completes:

play mysound from 1000 to 2000 notify

QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.

See Also
MCI Overview, MCI Command Strings, cue, set, status
 
C

cytown

Unregistered / Unconfirmed
GUEST, unregistred user!
The mciSendString function sends a command string to an MCI device.
The device that the command is sent to is specified in the command
string.

MCIERROR mciSendString(
LPCTSTR lpszCommand,
LPTSTR lpszReturnString,
UINT cchReturn,
HANDLE hwndCallback
);

Parameters
lpszCommand Address of a null-terminated string that specifies an
MCI command string. For more information about the
command strings, see Command Strings.
lpszReturnString Address of a buffer that receives return information.
If no return information is needed, this parameter can
be NULL.
cchReturn Size, in characters, of the return buffer specified by
the lpszReturnString parameter.
hwndCallback Handle of a callback window if the "notify" flag was
specified in the command string.


你可以use mmsystem来使用这个函数, 不过, 为什么不用mciSendCommand呢, 好象
更好些.
 
X

xujunhua

Unregistered / Unconfirmed
GUEST, unregistred user!
不用把MSDN的给我,我需要一个例子,我看过MSDN。
 
C

CJ

Unregistered / Unconfirmed
GUEST, unregistred user!
?
什么例子?你不是要字串吗?
 
X

xujunhua

Unregistered / Unconfirmed
GUEST, unregistred user!
对不起,也许是我说得不清楚,我是想谁能把MCI字符串替我列一下,比如:播放CD的字符串,CD中查找歌曲的字符串等。最好有使用的例子,在DELPHI里,总是有Pchar和String不兼容的情况。

还有,我知道怎么在Windows中注册热键,但是,热键的值是如何确定的,还请知情的大虾们帮忙。
 
P

pbuild

Unregistered / Unconfirmed
GUEST, unregistred user!
setdo
or open
setdo
or closed
set all audio on
set left audio on/off
set right audio on/off
.......
delphi帮助文件中有!
 
X

xujunhua

Unregistered / Unconfirmed
GUEST, unregistred user!
多人接受答案了。
 

Similar threads

回复
0
查看
662
不得闲
回复
0
查看
851
不得闲
S
回复
0
查看
947
SUNSTONE的Delphi笔记
S
顶部