T
Tim Johnson
I developed a class that contains a MessageWindow which gets windows
messages from a legacy DLL:
using Microsoft.WindowsCE.Forms;
public class Mine
{
internal class MsgWin : MessageWindow
{
protected override void WndProc(ref Message msg)
{
//check for messages here
}
}
internal MsgWin myWin = new MsgWin();
public void Init()
{
//Send a legacy dll our window handle via P/Invoke
LegacyInit((myWin.Hwnd);
}
}
This all works fine in my test C# app.
But when I try to use this class from within a secondary thread, I don't get
messages. Since the legacy DLL is doing PostMessage to whatever hWnd I pass
it, shouldn't my WndProc see them? I'm wondering if somehow the main UI
thread is getting them instead so .
Is there any way to make the MessageWindow in my 2nd thread get these
messages?
--
Tim Johnson
High Point Software, Inc.
www.high-point.com
(503) 312-8625
messages from a legacy DLL:
using Microsoft.WindowsCE.Forms;
public class Mine
{
internal class MsgWin : MessageWindow
{
protected override void WndProc(ref Message msg)
{
//check for messages here
}
}
internal MsgWin myWin = new MsgWin();
public void Init()
{
//Send a legacy dll our window handle via P/Invoke
LegacyInit((myWin.Hwnd);
}
}
This all works fine in my test C# app.
But when I try to use this class from within a secondary thread, I don't get
messages. Since the legacy DLL is doing PostMessage to whatever hWnd I pass
it, shouldn't my WndProc see them? I'm wondering if somehow the main UI
thread is getting them instead so .
Is there any way to make the MessageWindow in my 2nd thread get these
messages?
--
Tim Johnson
High Point Software, Inc.
www.high-point.com
(503) 312-8625