win32: considerably better error reporting

previously it was a mystery why opening a window would fail, now at
least there's something to work with.