Error Messages and Notifications

MCIWnd uses MCI to control the devices that play and record multimedia data. In general, MCIWnd displays MCI errors in an error dialog box. An MCI error is generated whenever an MCI command fails. For example, if your application tries to resume paused playback by using the MCIWndResume macro and the current device does not support resume, an error is reported to the user.

MCIWnd allows you two choices for handling error messages:

When error notification is enabled, MCIWnd sends each notification message (MCIWNDM_NOTIFYERROR) to the main message handler of the parent of the MCIWnd window. Your application must have a message handler to process the notification messages it receives.

You can obtain a textual description of the most recent MCI error message by using the MCIWndGetError macro. This macro returns the text in an application-defined buffer. If the error string is longer than the buffer, MCIWnd truncates the string.

You can route all notifications to another window by using the MCIWndSetOwner macro.