lxn / win

A Windows API wrapper package for the Go Programming Language
Other
1.19k stars 313 forks source link

TTM_ADDTOOL failed #61

Open sowhyim opened 5 years ago

sowhyim commented 5 years ago

why it return TTM_ADDTOOL failed when I SendMessage to system

lxn commented 5 years ago

You need a manifest file: https://github.com/lxn/walk#create-manifest-testmanifest https://github.com/lxn/walk#application-manifest-files

sowhyim commented 5 years ago

oh,thanks!,it's working!

StephanVerbeeck commented 5 years ago

I have the same issue. But there is something that I do not understand. It only happens when I compile the exe on my laptop (running windows 10 Ultimate). It does not happen when I compile the exe on my desktop (running windows 10 pro). It is exactly the same code (I had put the code on dropbox to test that). The compiled exe runs fine on the laptop when it was compiled on my desktop machine. So whether the error occurs is dependent on where it was compiled and not where it is running. That is the thing I fail to grasp.

C:\Build\Go_tools\rsrc.exe -manifest accounting.manifest -ico accounting.ico -o accounting.syso
go build -ldflags -H=windowsgui