2021-01-12 09:36

walk.NewMainWindow failed with message "panic: TTM_ADDTOOL failed"

The goplay failed with this output when fed with the content of examples/drawing.go. But when doing: go run drawing.go , it's ok.

The other program i write using the ui2walk.exe generated ui files runs into this kind of panic again.

It seems there's something wrong with walk.InitWidget , is't right? How to fix it?

panic: TTM_ADDTOOL failed

E:/repos/libs/gopkgs/src/github.com/lxn/walk/error.go:77 (0x4219b9)
    com/lxn/walk.newErr: return &Error{message: message, stack: debug.Stack()}
E:/repos/libs/gopkgs/src/github.com/lxn/walk/error.go:81 (0x421a50)
    com/lxn/walk.newError: return processError(newErr(message))
E:/repos/libs/gopkgs/src/github.com/lxn/walk/tooltip.go:113 (0x42b716)
    com/lxn/walk.(*ToolTip).AddTool: return newError("TTM_ADDTOOL failed")
E:/repos/libs/gopkgs/src/github.com/lxn/walk/widget.go:423 (0x4307fe)
    com/lxn/walk.InitWidget: if err := globalToolTip.AddTool(widget); err != nil {
E:/repos/libs/gopkgs/src/github.com/lxn/walk/mainwindow.go:30 (0x423b06)
    com/lxn/walk.NewMainWindow: WS_EX_CONTROLPARENT); err != nil {
C:/Documents and Settings/Administrator/Local Settings/Temp/compile11.go:82 (0x4017d1)
    main: mainWnd, _ := walk.NewMainWindow()
C:/Go/src/pkg/runtime/proc.c:244 (0x40f12a)
    main: main·main();
C:/Go/src/pkg/runtime/proc.c:271 (0x40f1c2)
    goexit: runtime·goexit(void)


  • 点赞
  • 回答
  • 收藏
  • 复制链接分享