This MCI command message sets a break key for an MCI device. MCI supports this message directly rather than passing it to the device.
DWORD dwFlags
The following flags apply to all devices:
MCI_NOTIFY
Specifies that MCI should post the MM_MCINOTIFY message when this command completes. The window to receive this message is specified in the dwCallback field of the data structure identified by lpBreak.
MCI_WAIT
Specifies that the break operation should finish before MCI returns control to the application.
MCI_BREAK_KEY
Indicates the nVirtKey field of the data 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.
MCI_BREAK_HWND
Indicates the hwndBreak field of the data structure identified by lpBreak contains a window handle which 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.
MCI_BREAK_OFF
Used to disable any existing break key for the indicated device
LPMCI_BREAK_PARMS lpBreak
Specifies a far pointer to the MCI_BREAK_PARMS data structure.
Returns zero if successful. Otherwise, it returns an MCI error code.
You might have to press the break key multiple times to interrupt a wait operation. Pressing the break key after a device wait is broken can send the break to an application. If an application has an action defined for the virtural key code, then it can inadvertantly 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.