[Mono-winforms-list] Howto mix WinForms and Cairo?

Peter Dennis Bartok peter at novonyx.com
Mon Sep 5 21:45:40 EDT 2005


Yes, the handle that is returned by Control::Handle is of no use for using 
with cairo. There's usually a window right on top of the one this handle 
describes.

As I already answered before, to draw on our MWF windows, for best 
resultsSystem.Drawing should be used. We have no 'safety' locks and such to 
deal with someone outside of MWF drawing on our windows alongside us. If you 
try to own the whole window and do not expect MWF to draw, you'd need to set 
the appropriate styles on Control (AllPaintingInWmPaint and UserPaint), and 
get the Hwnd.Client handle via reflection to have the proper window do muck 
with.

Cheers,
  Peter


-----Original Message-----
From: "Jackson Harper" <jackson at ximian.com>
To: "Miguel de Icaza" <miguel at ximian.com>
Cc: <mono-winforms-list at lists.ximian.com>; "Peter Dennis Bartok" 
<peter at novonyx.com>
Date: 05 September, 2005 13:25
Subject: Re: [Mono-winforms-list] Howto mix WinForms and Cairo?


>On Sat, 2005-09-03 at 17:37 -0400, Miguel de Icaza wrote:
>
>> I wonder if the Winforms handles are X handles, and if so, they could be
>> used with Cairo.
>
>The X handle you would get back from Control::Handle is the entire
>window including the non client area (ie borders). (I think, Peter could
>verify correctness here).
>
>I have a feeling mixing winforms and Mono.Cairo could lead to some
>unstable states though. Perhaps we should add some test cases for this.
>
>Jackson
>
>
>
>_______________________________________________
>Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>
> 



More information about the Mono-winforms-list mailing list