MFC MCIWndCreate & Play Video Files

In this article, we will see how we play an AVI video file in MFC Application. To play the AVI file, we will use the Media Control Interface (MCI) function and its API function MCIWndCreate. The Animate control that ships with MFC can play the AVI files, but you will not get any sound when the video is playing. OK. Let us start with this simple and quick example that plays the video file comp.avi. The AVI file that I am packing with this example has no sound information, so replace that with any video file, which has sound information in it. Note, we call the MCIWndCreate API from the MCI interface embedded into the MFC dialog.