How to get Window Message for Visio

V

visGeek

I'd like to handle some Window Message for Visio like WM_CLOSE because some
messages are not sent as events by Visio.

How can I get all the Window Messsage for Visio?

I wrote the C# code below but FromChildHandle() returns null while
WindowHandle32 is correct.
What is wrong with this? or is there another solution?


public partial class Form1 : Form
{
private void Form1_Load(object sender, EventArgs e)
{
Control c =
Control.FromChildHandle((IntPtr)Connect.applicationObject.WindowHandle32);
this.Parent = c;
}

protected override void WndProc(ref Message m)
{
...
}

...
}


visGeek
http://visio.seesaa.net/
 
Top