Click to See Complete Forum and Search --> : Helpppp!! :(


Vaderman
September 21st, 2005, 12:05 PM
I've just read some vague article about Message-only windows! Interesting stuff but I found somewhat confusing!! So.... The question is, how would I create one with the very limited knowledge of Win 32 API that I have and how would such a window be embedded into an existing project?

For example: I have some hardware that sends messages, and these messages are intercepted by a message-only window, that is then retrieved from the main app.

My thinking would be to create a self registering DLL that incapsulates the behaviour and functionality that is needed for a message-only window so that way, its always present throughout the app's lifetime.

Any thoughts and pointers to the right direction would be greatly appreciated.

Kind regards

John

NoHero
September 21st, 2005, 12:20 PM
Check the MSDN (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowfeatures.asp#message_only) on this.


A message-only window enables you to send and receive messages. It is not visible, has no z-order, cannot be enumerated, and does not receive broadcast messages. The window simply dispatches messages.

To create a message-only window, specify the HWND_MESSAGE constant or a handle to an existing message-only window in the hWndParent parameter of the CreateWindowEx function. You can also change an existing window to a message-only window by specifying HWND_MESSAGE in the hWndNewParent parameter of the SetParent function.

This is only available for Win2k, XP and above.

Marc G
September 21st, 2005, 02:40 PM
Check NoHero's reply, BUT please use a more descriptive thread subject next time.