[Mono-dev] [Gtk-sharp-list] Gtk depends on Winforms ¿?
Stefanos A.
stapostol at gmail.com
Wed Sep 9 17:42:31 EDT 2009
Την Wed, 09 Sep 2009 23:14:07 +0300,ο(η) Christian Hoff
<christian_hoff at gmx.net> έγραψε:
> Bingo! It's the foster window that enables theming. At least it worked
> on a XP machine at school which I contaminated with Gtk# :-) . I
> attached the new test application which should now work at least on XP
> (the visual styles hack never worked on my Windows 7 machine). Again, it
> would be great if you could give it a try on your machine to ensure it
> works properly before we commit this.
>
Confirming success on Vista x86!
Additionally, there is no need to keep the window lying around. Calling
DestroyWindow immediately doesn't seem to be causing any problems.
[DllImport ("user32.dll", EntryPoint="DestroyWindow",
CharSet=CharSet.Unicode, CallingConvention=CallingConvention.StdCall)]
internal extern static bool Win32DestroyWindow(IntPtr window);
[...]
// No idea why we need to create that window, but it enables visual styles
on the Windows platform
IntPtr window = Win32CreateWindow (WS_EX_TOOLWINDOW, "static", "Foster
Parent Window", WS_OVERLAPPEDWINDOW, 0, 0, 0, 0, IntPtr.Zero, IntPtr.Zero,
IntPtr.Zero, IntPtr.Zero);
Win32DestroyWindow(window);
More information about the Mono-devel-list
mailing list