C
Chris Ashley
Hi,
I'm overriding WndProc to process some custom messages like so:
protected override void WndProc(ref Message m)
{
if (m.Msg == ImageFileMsg.MSG_IF_NEW_DATA)
{
ProcessNewDataMessage(m);
}
base.WndProc(ref m);
}
I receive one of these messages every 100ms or so for a few seconds.
This locks up my user interface completely until this is complete which
isn't ideal as each time I get a message I want to update a textbox on
my form.
I'm not sure if my solution is to use threading? I've never used
threads in .NET before, but my understanding is that if I use threading
I'll have to use delegates for my methods which update my form
controls, and these are all translated into messages which go through
WndProc. Is it possible for me to get my ProcessNewDataMessage to work
in a separate thread bearing in mind it's being called from WndProc? Or
will I encounter problems?
I'm overriding WndProc to process some custom messages like so:
protected override void WndProc(ref Message m)
{
if (m.Msg == ImageFileMsg.MSG_IF_NEW_DATA)
{
ProcessNewDataMessage(m);
}
base.WndProc(ref m);
}
I receive one of these messages every 100ms or so for a few seconds.
This locks up my user interface completely until this is complete which
isn't ideal as each time I get a message I want to update a textbox on
my form.
I'm not sure if my solution is to use threading? I've never used
threads in .NET before, but my understanding is that if I use threading
I'll have to use delegates for my methods which update my form
controls, and these are all translated into messages which go through
WndProc. Is it possible for me to get my ProcessNewDataMessage to work
in a separate thread bearing in mind it's being called from WndProc? Or
will I encounter problems?