[Mono-dev] [Gtk-sharp-list] Gtk depends on Winforms ¿?

Christian Hoff christian_hoff at gmx.net
Wed Sep 9 16:14:07 EDT 2009


Christian Hoff wrote:
> Stefanos A. wrote:
>   
>> Την Wed, 09 Sep 2009 18:05:42 +0300,ο(η) Christian Hoff 
>> <christian_hoff at gmx.net> έγραψε:
>>
>>     
>>> I would really appreciate some feedback from the community as to whether
>>> the new approach works (that is, if the attached application appears
>>> with visual styles enabled). Just reply with a screenshot of the running
>>> app on XP if you're not sure what I mean :-) .
>>>       
>> What magic sauce is Application.DoEvents using? I wonder if it is 
>> performing any static initialization (static constructors and/or fields).
>>     
> Now that emulating DoEvents does not seem to fix it, I'm looking at the 
> static constructor of XplatUIWin32, the class that also contains the 
> "real" code for DoEvents. Besides initialization stuff, it creates a 
> "foster window":
>
> FosterParent=Win32CreateWindow(WindowExStyles.WS_EX_TOOLWINDOW, 
> "static", "Foster Parent Window", WindowStyles.WS_OVERLAPPEDWINDOW, 0, 
> 0, 0, 0, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
>   
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.


Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: theming-enabled.runme
Type: application/octet-stream
Size: 7168 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090909/00c8ba10/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ThemingTest.cs
Type: text/x-csharp
Size: 6701 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090909/00c8ba10/attachment-0001.bin 


More information about the Mono-devel-list mailing list