Jump to content
FPiette

FMUX custom messages

Recommended Posts

I have the need to use custom messages in a FMUX (Firemonkey Linux) application. Something similar to Windows PostMessage / SendMessage / AllocateHWnd / DeallocateHWnd / WndProc / Message handlers and all that stuff.

 

Any idea?

Share this post


Link to post

 

Quote

Queues?

Yes and no... The OS already has a queue somewhere and FMUX is using it. The real problem is installing the custom message handler and posting message in that queue. FMUX already has HandleMessage and ProcessMessage but I have not found anything to post my own message and install a handler for it.

 

Share this post


Link to post

I've found how to do it, more or less. This invokes TMessageManager class. There is only a SendMessage, no PostMessage. And there is no thread switch like in Windows messaging system. When you call SendMessage from a thread, the message subscriber (That is the message handler in Windows speaking) is directly called, that is it runs in the context of the sending thread. Actually there is neither a message queue which is logical since there is no PostMessage to queue a message.

 

I can probably build the missing parts above the existing...

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×