queueing messages

  • Thread starter Thread starter Dmitriy Lapshin [C# / .NET MVP]
  • Start date Start date
D

Dmitriy Lapshin [C# / .NET MVP]

Hi,

Try to P/Invoke the good old PostThreadMessage API function. You cannot use
PostMessage since you don't have a window.
 
Hi,

Ok, since I began writing this post, I have figured out the majority of
my problem. I started out without a clue about how to use messages in my
application (not referring to System.Messaging, but to good old windows
messages). I want a Win32 application that runs without a window. I
figured out how to add a message filter to the application before calling
Application.Run(). That solves the problem of catching the message. Now I
cannot, for the life of me, find any references to how to put a message on
the application queue. Any help would be greatly appreciated.

Thanks in advance,
Chris
 
Actually you can use PostMessage. Just set the hWnd parameter to null and it
will
post it to the current thread. See the docs for more info

/claes


Dmitriy Lapshin said:
Hi,

Try to P/Invoke the good old PostThreadMessage API function. You cannot use
PostMessage since you don't have a window.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Chris Ellis said:
Hi,

Ok, since I began writing this post, I have figured out the majority of
my problem. I started out without a clue about how to use messages in my
application (not referring to System.Messaging, but to good old windows
messages). I want a Win32 application that runs without a window. I
figured out how to add a message filter to the application before calling
Application.Run(). That solves the problem of catching the message.
Now
I
cannot, for the life of me, find any references to how to put a message on
the application queue. Any help would be greatly appreciated.

Thanks in advance,
Chris
 
Back
Top