Displaying Captions in a Window

The Caption DLL works with an application to display caption files in the requesting application's window. The DLL does all of the work to display the text window and scroll the text in synchronization with the appropriate audio file. Applications can utilize this DLL to display captioned text (in synchronization with an audio file) in their application's window. To perform this function, the Caption DLL utilizes the captioned text files, created by the Caption Creation Utility, and position advise messages that it sets on the specified audio device. As described earlier, the caption files contain an MMTIME unit before every line of text. The Caption DLL requests position advise messages from the Media Device Manager (MDM) every 1500 MMTIME units on the specified device. When it receives MM_MCIPOSITIONCHANGE messages from MDM, it examines the MMTIME units in front of the text lines and displays the correct line of text in the text window of the application. The maximum size of the caption file is 500 lines long, but this can be modified by changing the limit in the Caption DLL source code. This DLL supports the following functions: