StretchDIBits doesn't work on Windows 10

Hello,

I’ve been working on some windows application that uses the StretchDIBits function from Window’s gdi32.dll to paint an image on screen. I managed to make it work on Windows 11

But when I run it on Windows 10, StretchDIBits returns 0 and I got no idea what’s causing this issue, keep in mind that I’ve tested the same code in C++ and it works on both Windows 11 and Windows 10

You can find the minimal code to reproduce the issue here: buggy_stretchdibits.go · GitHub

Thanks,

OO, so cool, we can call window’s dll API in Go like this, Do you really need to do like this ?

mmmm, Are there other ways to call Windows’ StretchDIBits? I mean other than cgo because that didn’t work as well

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.