44 Argus Encoder Family Version 2.6 API Developer’s GuideFMTestApp// Advise the event source that we are connecting to it.m_pIFilterMgrEvents->EasyAdvise(m_pIFilterMgr);// Instruct Filter Manager NOT to write directly to message boxes.m_pIFilterMgr->PutWriteToMessageBox(FALSE);Sleep(500);/////////////////////////////////////////////////////////////////////////////////////// The following section of code is needed only for THIS application’s// event-handling strategy.// This interface handles LOG events by writing them to a log file,// for which it needs pFile, a pointer to a file opened for writing.// It handles Finished events with message boxes, for which it//requires pWin, a pointer to the calling windows class./////////////////////////////////////////////////////////////////////////////////////m_pFilterManagerEvents->pView = pWin;m_pFilterManagerEvents->pFile =_tfopen(_T(“C:\\vela_db\\EventLog.txt”), _T(“w+”)));if( !m_pFilterManagerEvents->pFile ){return FALSE;}EncoderState = esNoState;return TRUE;}Using the ObjectOnce the IArgusFMPtr is created, we can use that pointer to call any of the meth-ods that the interface makes available. The following segment of code, for exam-ple, is the method the sample application calls to set up or “cue” for an encode.The actual calls to the Filter Manager interface are highlighted.Note that in the OnInitDialog() method, our application calls CreateFilterMana-gerInterface() to create an instance of our helper CFMInterface class, which inturn creates the Filter Manager Smart Pointer.Also note that the m_Duration, m_MarkIn, m_MarkOut, and m_MuxFileNamevariables are all members of the CFMTestAppDlg class; they are settings of