View Full Version : adding MVintegration to existing vc++ doc type app

March 31, 2004, 16:51:12
I have a substantial application built for imaging / sound / analog data analysis and want to add bring in a filter graph into the app.
I can manage this in a dialog based app- using
m_mvControl.Create("test", WS_CHILD, CRect(10, 10, 100, 100), this, 232);

hResult = m_mvControl.LoadConfig(".\\Rotation.mvp");

etc, etc, etc
Like in the "Control" Example-

How do I accomplish this in my doc type app?
Plus I would like to optionally direct this right onto the main frame-

I have been fighting with this for a few days.

Any input / feedback would be appreciated

Steve Schutz
Amtex Inc

Bernd Peretzke
April 1, 2004, 12:47:30

You can use any visible window to display a video with the MV Integration Control. All you need are the header and implementation (*.cpp) files for the control. You can copy this file from the control sample.

Add a member variable and create the control like the control sample. Set the video window to the area within your window (e.g. CView).

If you want to display a video onto a frame window you have to make sure that no other child window (view) is visible in the video area.

Sample Code:

/* SDI app with CView window. mvcontrol1.h and mvcontrol1.cpp files from the "Control" sample added*/

class CTestView : public CView
CMVControl m_control;

/* Implematation file: create the control, load a filter graph, setup videowindow and start it. */

void CTestView ::OnInitialUpdate()

static BOOL first = TRUE;

if(m_hWnd != 0L && first)
first = FALSE;
m_control.Create("test", WS_CHILD, CRect(10, 10, 100, 100), this, 232);


CRect rect;

m_control.SetupWindow((long)m_hWnd, TRUE);



June 13, 2006, 16:27:40
I'm attempting to do something similar here. I'd like to have multiple video windows inside a main window like a multiple document interface. Creating a new dialog that contains the CMVSmartControl for each source gets messy when there are more then a couple windows. I'd like to contain them inside of one window.

This post seems to use a control that I don't have. Is there a current recommended way to do this?

Thanks for any suggestions,


Bernd Peretzke
June 13, 2006, 16:39:02

You could add more than one MV Smart Control into a window. The control is a window so you could use them like a window. The find object sample uses two MV Smart Controls.

The initinal post refers to the MV Integration Control. This control was replaced by the MV Smart Control. So use the MV Smart Control instead of the MV Integration control.


June 13, 2006, 16:46:11
Thanks for the quick response. The multiple controls on one window is a good idea, but I'd like to create a new window for each video source.

I see there are IMVSCVideoWindow and IMVSCVideoWindow2 interfaces that might do what I'm talking about.

Are there any examples of how this interface is used? Could it be used in the way I'm suggesting? Like a MDI or multiple document interface. So I could create a new CMVSmartControl for each camera such that the window in contained inside of a main window?


Bernd Peretzke
June 13, 2006, 17:02:23

Yes you could do that. The MV Smart Control is a window that shows the video from a stream. With the IMVSCVideoWindow interface you could setup some properties regarding the video output. But for resizing or moving you could use the normal window functions (MoveWindow, ...).

Try it out. :)