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" <[EMAIL PROTECTED]> To: "Miguel de Icaza" <[EMAIL PROTECTED]> Cc: <[email protected]>; "Peter Dennis Bartok" <[EMAIL PROTECTED]> 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 - [email protected] >http://lists.ximian.com/mailman/listinfo/mono-winforms-list > > _______________________________________________ Mono-winforms-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-winforms-list
