andlabs/ui — pull request #24 by akavel (2014-07-02 20:12:08+00:00)
Title: area_windows.go: proposing use of github.com/akavel/winq

Hi,

I've created a small package [named "winq"](http://godoc.org/github.com/akavel/winq) for easier access to WinAPI and faster prototyping in it. Maybe you would be interested?

To give you an example, I modified the `area_windows.go` file in your repo, aiming to showcase how it could look like with winq. To highlight some angles:

* You might want to have a look e.g. at the `EndPaint` call, how it can be used with `defer` now.
* Also, one of my core goals in the package was to simplify error handling -- for example, the most common [`Try.N()`](http://godoc.org/github.com/akavel/winq#Try.N) function verifies that the result of a WinAPI call is Nonzero (thus "N"), otherwise it sets the `Try.Err` field with detected error message.

Hope this could make your life somewhat easier!
Cheers,
/Mateusz Czapliński.