AllenDang / w32

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

undefined: w32.GetDC #57

Open scohen28 opened 8 years ago

scohen28 commented 8 years ago

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?