M
Mark Everett
Heya,
Sorry if this is a repost but my messages don't seem to be appearing.
I have given the system over 24 hours now.....
I want to send a window message from a normal win32 application to my
windows forms app.
In my Windows forms app I do:
Application.AddMessageFilter( new IncomingMessageFilter() );
My implementation of IMessageFilter uses PreFilterMessage to test the
messages .Msg property value. Thing is the message never arrives. I
send the message using the following:
SendMessage( wnd, TEST_MESSAGE, NULL, NULL );
The window handle is obtained using FindWindow which is returning the
HWND successfully. But m.Msg is never equal to TEST_MESSAGE which I
set to WM_APP + 0x666. Any ideas? Is this the best way to do this as
as far as I understand the messagefilter will pick up *ALL* messages
not just those to my window. This doesn't seem to be very optimum. Is
this correct?
Finally a quickie. I have noticed in lots of sample code references to
Win32.Msgs.WM_XXX but I cannot work out what reference I have to use
to include Win32. Is this just for managed code or something?
Thanks in advance
Mark
Sorry if this is a repost but my messages don't seem to be appearing.
I have given the system over 24 hours now.....
I want to send a window message from a normal win32 application to my
windows forms app.
In my Windows forms app I do:
Application.AddMessageFilter( new IncomingMessageFilter() );
My implementation of IMessageFilter uses PreFilterMessage to test the
messages .Msg property value. Thing is the message never arrives. I
send the message using the following:
SendMessage( wnd, TEST_MESSAGE, NULL, NULL );
The window handle is obtained using FindWindow which is returning the
HWND successfully. But m.Msg is never equal to TEST_MESSAGE which I
set to WM_APP + 0x666. Any ideas? Is this the best way to do this as
as far as I understand the messagefilter will pick up *ALL* messages
not just those to my window. This doesn't seem to be very optimum. Is
this correct?
Finally a quickie. I have noticed in lots of sample code references to
Win32.Msgs.WM_XXX but I cannot work out what reference I have to use
to include Win32. Is this just for managed code or something?
Thanks in advance
Mark