summaryrefslogtreecommitdiff
path: root/painting.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-09 14:59:37 -0500
committerPietro Gagliardi <[email protected]>2014-02-09 14:59:37 -0500
commit3482c9c541210dbf0e7bdd5dbf2c6372d5d55162 (patch)
tree8d9595b9c9ce22ed823a1f696a24eb9820aaa100 /painting.go
parentecc00bd1f5cb5d97387f762455c6c51afd0f2fae (diff)
Added the rest of the skeleton necessary for opening a simple window as well as the code to actually open one. Now for custom window procedures!
Diffstat (limited to 'painting.go')
-rw-r--r--painting.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/painting.go b/painting.go
new file mode 100644
index 0000000..069fd2d
--- /dev/null
+++ b/painting.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
+}