[Mono-dev] Embed: MainWindow
Steve Baer
steve at mcneel.com
Tue Feb 2 18:39:35 EST 2010
Hi,
I've been working on embedding mono in a C++ Windows application (and an OSX
app.) My C++ code calls a C# function through mono which in turn calls
System.Windows.Forms.MessageBox.Show("Hi from mono");
This shows a message box, but it is not modal and my application crashes if
I switch focus away from the message box. I think the problem is that mono
doesn't know about the main window of my native application because I always
get IntPtr.Zero when calling
System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle;
Is there something like a function in the embedding API that let's me tell
mono the main window handle for my application? Any clues no what to try
next would be appreciated.
Thanks,
-Steve
--
View this message in context: http://old.nabble.com/Embed%3A-MainWindow-tp27429314p27429314.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
More information about the Mono-devel-list
mailing list