You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But when another program calls, it hangs at this code:
for { if m := win.GetMessage(&msg, 0, 0, 0); m != 0 { win.TranslateMessage(&msg) win.DispatchMessage(&msg) } }
Other methods, such as DoPausePlay(), cannot be called. How can I change this?
The text was updated successfully, but these errors were encountered:
I am preparing to write a dynamic link library file,it contains a winform. The code such as:
`
func init() {
title := "Spark"
hInst := win.GetModuleHandle(nil)
if hInst == 0 {
panic(fmt.Sprintf("GetModuleHandle: %v", win.GetLastError()))
}
}
func wndProc(hwnd win.HWND, msg uint32, wparam, lparam uintptr) (result uintptr) {
switch msg {
case win.WM_DESTROY:
win.PostQuitMessage(0)
case win.WM_DEVICECHANGE:
OnDeviceChange(hwnd, msg, wparam, lparam)
case WM_USB_EVENT: // Customer Message
OnUsbEvent(hwnd, msg, wparam, lparam)
default:
return win.DefWindowProc(hwnd, msg, wparam, lparam)
}
return 0
}
//export DoPausePlay
func DoPausePlay() *C.char {
doPause()
}
`
But when another program calls, it hangs at this code:
for { if m := win.GetMessage(&msg, 0, 0, 0); m != 0 { win.TranslateMessage(&msg) win.DispatchMessage(&msg) } }
Other methods, such as DoPausePlay(), cannot be called. How can I change this?
The text was updated successfully, but these errors were encountered: