The MCI_BREAK command sets a break key for an MCI device. MCI supports this command directly rather than passing it to the device. Any MCI application can use this command.
To send this command, call the mciSendCommand function with the following parameters.
MCIERROR mciSendCommand( MCIDEVICEID wDeviceID, MCI_BREAK, DWORD dwFlags, (DWORD) (LPMCI_BREAK_PARMS) lpBreak );
Device identifier of the MCI device that is to receive the command message.
MCI_NOTIFY, MCI_WAIT, or, for digital-video and video-cassette recorder (VCR) devices, MCI_TEST. For information about these flags, see The Wait, Notify, and Test Flags.
Pointer to an MCI_ BREAK_PARMS structure.
Returns zero if successful or an error otherwise.
You might have to press the break key multiple times to interrupt a wait operation. Pressing the break key after a device wait is canceled can send the break to an application. If an application has an action defined for the virtual-key code, then it can inadvertently respond to the break. For example, an application using VK_CANCEL for an accelerator key can respond to the default CTRL+BREAK key if it is pressed after a wait is canceled.
The following additional flags apply to all devices:
The hwndBreak member of the structure identified by lpBreak contains a window handle that must be the current window in order to enable break detection for that MCI device. This is usually the application's main window. If omitted, MCI does not check the window handle of the current window.
The nVirtKey member of the structure identified by lpBreak specifies the virtual-key code used for the break key. By default, MCI assigns CTRL+BREAK as the break key. This flag is required if MCI_BREAK_OFF is not specified.
Disables any existing break key for the indicated device.
Minimum supported client
|Windows 2000 Professional [desktop apps only]|
Minimum supported server
|Windows 2000 Server [desktop apps only]|
Build date: 11/16/2013