diff options
| author | Pietro Gagliardi <[email protected]> | 2014-02-11 13:06:12 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-02-11 13:06:12 -0500 |
| commit | 42229820d2a47594f68d92356f8e8a86133a29f5 (patch) | |
| tree | 3cd5deef283b4540bae2f75c049a5e69d4e9db20 /painting_windows.go | |
| parent | a488e3ab36de1d6a329110fbaae44cd5747c854b (diff) | |
Added _windows.go extensions to all the files in preparation for the library writing.
Diffstat (limited to 'painting_windows.go')
| -rw-r--r-- | painting_windows.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/painting_windows.go b/painting_windows.go new file mode 100644 index 0000000..069fd2d --- /dev/null +++ b/painting_windows.go @@ -0,0 +1,20 @@ +// 9 february 2014 +package main + +import ( +// "syscall" +// "unsafe" +) + +var ( + updateWindow = user32.NewProc("UpdateWindow") +) + +// TODO is error handling valid here? MSDN just says zero on failure; syscall.LazyProc.Call() always returns non-nil +func UpdateWindow(hWnd HWND) (err error) { + r1, _, err := updateWindow.Call(uintptr(hWnd)) + if r1 == 0 { // failure + return err + } + return nil +} |
