Windows Media Encoder API写录屏软件,运行后双击事件被屏蔽了,真郁闷
有没有知道如何解决双击事件被屏蔽问题的?
WMEncoder Encoder = WMEncoderManage.GetWMEncoder;
IWMEncSourceGroup SrcGrp;
IWMEncSourceGroupCollection SrcGrpColl;
SrcGrpColl = Encoder.SourceGroupCollection;
SrcGrp = SrcGrpColl.Add("SG_1");
IWMEncSource SrcVid;
IWMEncSource SrcAud;
SrcVid = SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_VIDEO);
SrcAud = SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_AUDIO);
SrcAud.SetInput("Default_Audio_Device", "Device", "");
SrcVid.SetInput("ScreenCapture1", "ScreenCap", "");
IWMEncProfileCollection ProColl;
IWMEncProfile Pro;
int i;
long lLength;
ProColl = Encoder.ProfileCollection;
lLength = ProColl.Count;
for (i = 0; i < lLength - 1; i++)
{
Pro = ProColl.Item(i);
if (Pro.Name == WMEncoderManage.DefaultFormat)
{
SrcGrp.set_Profile(Pro);
break;
}
}
IWMEncDisplayInfo Descr;
Descr = Encoder.DisplayInfo;
Descr.Author = "xx";
Descr.Copyright = "xx";
Descr.Description = "xx";
Descr.Rating = "xx";
Descr.Title = "xx";
IWMEncAttributes Attr;
Attr = Encoder.Attributes;
Attr.Add("URL", "www.csdn.net");
IWMEncFile File;
File = Encoder.File;
File.LocalFileName = this.saveFileDialog1.FileName;
Encoder.Start();