Send a message to the Window

I’d like to send a message from a separate thread to the main window, in the separated thread i’d like to put there the feedparser that retrieves feeds and after that invokes a message to the main window that will refresh the news list with new news retrivied, I tried to send different messages from the separated thread but it didn’t work, which command should i use? i tried postmessage() but i think i’m doing something wrong, have I to implement something in the BApplication to receive messages from threads?

thanks for any advice

When you send a message from the app, you need to identify and address the window, otherwise the message goes to the app blooper:

be_app->WindowAt(0)->PostMessage(msg);

be_app is a global pointing to the app instance. WindowAt can access windows. If you have multiple windows and they don’t have a fixed order, then you need a way to identify them.

Great! it works! thank you a lot :slight_smile: