summaryrefslogtreecommitdiff
path: root/stdwndclass_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'stdwndclass_windows.go')
-rw-r--r--stdwndclass_windows.go18
1 files changed, 11 insertions, 7 deletions
diff --git a/stdwndclass_windows.go b/stdwndclass_windows.go
index 276e698..d57cc20 100644
--- a/stdwndclass_windows.go
+++ b/stdwndclass_windows.go
@@ -19,9 +19,18 @@ var (
)
var (
- defWindowProc = user32.NewProc("DefWindowProcW")
+ _defWindowProc = user32.NewProc("DefWindowProcW")
)
+func defWindowProc(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESULT {
+ r1, _, _ := _defWindowProc.Call(
+ uintptr(hwnd),
+ uintptr(uMsg),
+ uintptr(wParam),
+ uintptr(lParam))
+ return _LRESULT(r1)
+}
+
func stdWndProc(s *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESULT {
return func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESULT {
switch uMsg {
@@ -62,12 +71,7 @@ func stdWndProc(s *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam
s.signal()
return 0
default:
- r1, _, _ := defWindowProc.Call(
- uintptr(hwnd),
- uintptr(uMsg),
- uintptr(wParam),
- uintptr(lParam))
- return _LRESULT(r1)
+ return defWindowProc(hwnd, uMsg, wParam, lParam)
}
panic(fmt.Sprintf("stdWndProc message %d did not return: internal bug in ui library", uMsg))
}