void OnPaintHandler(object sender, PaintEventArgs e)
{
if (this.videoRenderer != null)
{
Trace.WriteLineIf(trace.TraceInfo, "OnPaintHandler()");
try
{
int hr;
if (useEVR)
{
//PaintBlackBands(e.Graphics);
hr = this.evrVideoDisplayControl.RepaintVideo();
//PaintBlackBands(e.Graphics);
}
else
{
IntPtr hdc = e.Graphics.GetHdc();
hr = (this.videoRenderer as IVMRWindowlessControl9).RepaintVideo(this.hostingControl.Handle, hdc);
e.Graphics.ReleaseHdc(hdc);
PaintBlackBands(e.Graphics);
}
}
catch { }
}
}