使用 SetParent 时单击事件处于错误位置

问题描述

我尝试使用 SetParent 将应用程序嵌入到 WindowForms 中。

int style = getwindowlong(_process.MainWindowHandle,GWL_STYLE);
style = style & ~WS_CAPTION & ~WS_THICKFRAME;
SetwindowLong(_process.MainWindowHandle,GWL_STYLE,style);

SetParent(_process.MainWindowHandle,hWnd.Handle);
MoveWindow(_process.MainWindowHandle,(int)((Grid)this.Parent).ActualWidth,(int)((Grid)this.Parent).ActualHeight,true);

问题是嵌入应用程序中按钮的点击事件仍然是左上角一个。当我使用嵌入应用程序移动窗口时,无法到达左侧的按钮。

如图所示,可以在哪个区域触发“设置”按钮的点击事件。

example picture

有没有办法移动区域来触发点击事件?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)