|
|
|
|
|
MCIOpen (Function) In french: MCIOuvre Opens a media file. // Open the "C:\MyFiles\File.AVI" file // in the "ImageAVI" Image control ResExecuteMCI = MCIOpen("C:\MyFiles\File.AVI") // Play a video "C:\MyFiles\File.AVI" in repeat mode // Open the video MCIOpen("C:\MyFiles\File.AVI", "AVI", MciStyleChild, IMG_Video, MciModeNormal) // Play the video MCIExécute("Play AVI repeat") Syntax
<Result> = MCIOpen(<Media file> [, <Alias name> [, <Type of container object> [, <Container window> [, <Display mode> [, <Parameters> [, <Name of the message window>]]]]]])
<Result>: Boolean - True if the file was opened,
- False otherwise. To get the error number, use MCIErr.
To get more details on the error, use MCIMsgErr or ErrorInfo with the errMessage constant. The status report of the command is returned by MCIRetrieve.
<Media file>: Character string or constant Name of the media file to be opened (AVI, MP3, etc.) or type of device to open: | | MciAudioCD | Initializes the audio CD | MciDigitalVideo | Initializes the digital video player | MciSequencer | Initialize the MDI mixing table | MciVideoDisc | Initializes the video player | MciWaveAudio | Initializes the .WAV reader | Remark: all the formats supported by the system are supported (which means the CODEC installed on the computer). <Alias name>: Optional character string Name used to handle the media file. This name can be used in all the MCI functions. <Type of container object>: Optional character string Type of window or control (child window, popup, etc.) in which the media file will be displayed. | | MciStyleChild | Child window of the current window | MciStyleOverlapped | Standard window | MciStylePopup | Window displayed in popup mode |
<Container window>: Optional integer or character string Name or handle of the window or control where the file will be displayed. Remark: The handle is returned by Handle. <Display mode>: Optional constant Mode for displaying the file in the window: | | MciModeCentered | Image centered in the window | MciModeHomotheticCentered (Default value) | Image proportionally stretched | MciModeNormal | Display at 100% | MciModeStretched | Image stretched to occupy the entire surface |
<Parameters>: Optional character string Additional parameters if necessary. These parameters can be known by checking the documentation of the Windows MCI function named "Open". The MciWait constant can be added to this string. This constant is used to indicate that the program must wait for the end of the MCI command to run the rest of application. <Name of the message window>: Optional character string Name of the window used to intercept and manage the different messages sent by MMSYSTEM.DLL. These messages are in MM_xxxxxx format and can be retrieved with Event. You can for example get messages regarding the management of the CD ROM or Joystick.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|