AllenDang / w32

A wrapper of windows apis for the Go Programming Language.
Other
766 stars 247 forks source link

[The solution] user32.go:1039:10: cannot use flag (type uint32) as type uintptr in argument to procRedrawWindow.Call #94

Open linshaoSec opened 2 years ago

linshaoSec commented 2 years ago

1656217803234(1) When I try to compile, I get an error due to the user32.go:1039 location !The solution is modifind the "flag" to "uintptr(flag)" image Finally, thank you for your code

wayneforrest commented 1 year ago

I also get this building on a Mac M1.

cannot use flag (variable of type uint32) as type uintptr in argument to procRedrawWindow.Call

GOOS=windows go build main.go
# github.com/AllenDang/w32
../../../../go/pkg/mod/github.com/!allen!dang/w32@v0.0.0-20180428130237-ad0a36d80adc/user32.go:1040:3: cannot use flag (variable of type uint32) as type uintptr in argument to procRedrawWindow.Call
fbugcn commented 1 year ago

dang yu hang ?

AllenDang commented 1 year ago

dang yu hang ?

who's asking?

fbugcn commented 1 year ago

果然是你, 当年 honeywell 的同事,

OLivecode7 commented 9 months ago

Same issue,

i have this error due to the user32.go:1040 location ../../go/pkg/mod/github.com/!allen!dang/w32@v0.0.0-20180428130237-ad0a36d80adc/user32.go:1040:3: cannot use flag (variable of type uint32) as uintptr value in argument to procRedrawWindow.Call

The solution : change the "flag" to "uintptr(flag)" -> it works for me