Added IWindow32Window support and bug fixes