Код: Выделить всё
public void CreateHostHwnd(IntPtr parentHwnd)
{
// Set up the parameters for the host hwnd.
parentHandle = parentHwnd;
HwndSourceParameters parameters = new HwndSourceParameters("Video Window", 351, 295);
parameters.WindowStyle += WS_CHILD;
parameters.SetPosition(0, 0);
parameters.ParentWindow = parentHwnd;
// Create the host hwnd for the visuals.
HwndSource myHwndSource = new HwndSource(parameters);
}
Код: Выделить всё
parameters.SetSize(width, height);
Спасибо~!