Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined: w32.GetDC #57

Open
scohen28 opened this issue May 28, 2016 · 0 comments
Open

undefined: w32.GetDC #57

scohen28 opened this issue May 28, 2016 · 0 comments

Comments

@scohen28
Copy link

w32 compiles fine - trying to do a screen capture:

func screenRect() (image.Rectangle, error) {
hDC := w32.GetDC(0)
if hDC == 0 {
return image.Rectangle{}, fmt.Errorf("Could not Get primary display err:%d\n", w32.GetLastError())
}
defer w32.ReleaseDC(0, hDC)
x := w32.GetDeviceCaps(w32.HDC(hDC), w32.HORZRES)
y := w32.GetDeviceCaps(w32.HDC(hDC), w32.VERTRES)
return image.Rect(0, 0, x, y), nil
}

Compiling with:
GOARCH=386 go build

.\main_windows.go:46: undefined: w32.GetDC
.\main_windows.go:50: undefined: w32.ReleaseDC

So it finds GetDeviceCaps, but not the GetDC - what should I be looking for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant