- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
为什么SetWindowLong(myForm.hWnd, GWL_HWNDPARENT, parentHwnd)
挂起?
通过执行这三个步骤,我可以始终如一地重现此问题。
private static void Main(string[] args)
{
Form form = new Form();
form.Show();
Interop.WaitWindow waitWindow = new Interop.WaitWindow();
waitWindow.ShowWindow(form.Handle.ToInt32(), Language.RISEnglish);
}
private static void Main(string[] args)
{
IntPtr handle = Process.GetCurrentProcess().MainWindowHandle;
Interop.WaitWindow waitWindow = new Interop.WaitWindow();
waitWindow.ShowWindow(handle.ToInt32(), Language.RISEnglish);
}
Public Sub ShowWindow(ByVal parentHwnd As Long, ByVal language As Language)
SetWindowLong(myForm.hWnd, GWL_HWNDPARENT, parentHwnd) 'Hangs Here
CenterWindow (parentHwnd)
myForm.ShowRetrieving (language)
myForm.Show (vbModal)
End Sub
最佳答案
MSDN文档明确指出
You must not call SetWindowLong with the GWL_HWNDPARENT index to change the parent of a child window. Instead, use the SetParent function.
关于.net - SetWindowLong悬挂,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10216414/
public enum GWL { ExStyle = -20 } public enum WS_EX { Transparent =
我需要设置一个 WindowLong 来覆盖 WndProc,我正在使用 coredll.dll 中的这个方法: public interface CoreDll extends StdCallLib
以前,当我想创建一个点击表单时,我是 tempted to use platform invokes to set the extended window styles (user32.dll 中的G
我正在为 Windows API 编写一些包装函数和类。我开始遇到的一个常见事件是修改 Windows 样式。 以下是一些示例代码,我根据参数 ALIGNMENT 枚举调整文本框的文本对齐方式。经过多
当我尝试在 C# 中调用 User32.dll 中的函数 SetWindowLong 时,没有任何反应。我知道为什么,但我不知道如何“修复”这个。这是一段代码。 [DllImport("user32.
我有一个让我抓狂的问题。我花了一个星期的时间来追查这个错误,可能只是我对互操作的理解不如我想的那样。在这里: public class User { public const int GWL_W
在头文件WinUser.h中,有一部分是SetWindowLong()的第二个参数的常量。已定义。 // ... #define GWL_WNDPROC (-4) #define GW
我正在尝试使用 SetWindowLong 覆盖 winmobile 任务栏的窗口过程(以捕获和阻止按下的按钮)。我创建了一个类,其中一种方法用于覆盖,另一种方法用于恢复窗口过程。 MessageRe
当我使用 SetWindowLong 命令更改 TreeView 的方向时,其节点上的弹出菜单不显示。完整代码在这里: Procedure SetWinControlBiDi(Control: TTr
我正在使用以下代码: const int GWL_STYLE = (-16); const UInt32 WS_POPUP = 0x80000000; const UInt32 WS_CHILD =
我使用以下代码创建静态控件: hWnd = CreateWindowExW( 0, L"STATIC",
我是一名优秀的程序员,十分优秀!