Fix: #33 After obtaining the window handle, pop-up window dragging failed

This commit is contained in:
杨红岩 2024-07-29 19:09:11 +08:00
parent 68af9b1647
commit 4619b3a14e

View File

@ -57,7 +57,6 @@ type LCLBrowserWindow struct {
onPaint []lcl.TNotifyEvent //扩展事件 向后链试循环调用 onPaint []lcl.TNotifyEvent //扩展事件 向后链试循环调用
auxTools IAuxTools //辅助工具 auxTools IAuxTools //辅助工具
tray []ITray //托盘 可以同时创建多个 tray []ITray //托盘 可以同时创建多个
hWnd types.HWND //
cwcap *customWindowCaption //自定义窗口标题栏 cwcap *customWindowCaption //自定义窗口标题栏
drag *drag //自定义拖拽 drag *drag //自定义拖拽
wmPaintMessage wmPaint // wmPaintMessage wmPaint //
@ -255,10 +254,7 @@ func (m *LCLBrowserWindow) SetOnWndProc(fn lcl.TWndProcEvent) {
// Handle 窗口句柄 // Handle 窗口句柄
func (m *LCLBrowserWindow) Handle() types.HWND { func (m *LCLBrowserWindow) Handle() types.HWND {
if m.hWnd == 0 { return m.TForm.Handle()
m.hWnd = m.TForm.Handle()
}
return m.hWnd
} }
// RunOnMainThread // RunOnMainThread