VC++ Developer Getting Started
|
VC++ Developer Getting Started |
Assuming that you have already run the VideoEdit Gold ActiveX Control installation program and started Visual C++, the next step is to create a Dialog based project. To do this begin by selecting the "MFC AppWizard (exe)" option from Projects List Box and select "Dialog based as your project type. Then select the "Project/Add To Project/Components and Controls.." command , then select Registered ActiveX Controls folder and select VideoEdit Gold Control and click insert button.
|
|
Select Control
Click on the VideoEdit Pro ActiveX Control icon and draw it on the form. A rectangle should appear on the form. Press Ctrl+W to trigger ClassWizard and create m_VideoEdit member variable.

.
Add Button in Dialog add this line of code, which will automatically convert video file into VCD format.
void CSssDlg::OnButton1()
{
// TODO: Add your control notification handler code here
m_VideoEdit.SetOutputType(0);
double iDur= m_VideoEdit.GetFileDuration("c:\\sourcefile.mpg");
m_VideoEdit.InitControl();
m_VideoEdit.AddVideo("c:\\sourcefile.mpg",0,iDur,0);
m_VideoEdit.AddAudio("c:\\sourcefile.mpg",0,iDur);
m_VideoEdit.Save("c:\\outputvcd.mpg");
}

