[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Linux c++ equivalent to PostMessage()

Posted on 2003-11-12
3
Medium Priority
?
2,212 Views
Last Modified: 2007-12-19
I am porting a Windows MFC app to linux.

It uses the PostMessage function to place a CString message "Message" in the Windows message queue as follows :

Window->PostMessage(Message);

How do I do the same in linux? I am developing using KDevelop 2.1 and QT3.

Help much appreciated.

regards,

Gordon
0
Comment
Question by:jeffreyg
3 Comments
 
LVL 45

Expert Comment

by:sunnycoder
ID: 9731256
Hi jeffreyg,

> It uses the PostMessage function to place a CString message "Message" in the
> Windows message queue as follows
err I am not much familiar with windows but if you can tell what you wish to achieve in terms of absolute results, may be I can help

Cheers!
Sunny:o)
0
 
LVL 5

Accepted Solution

by:
mtmike earned 375 total points
ID: 9731651
You can send events to an object (widget, window, etc) using

void QApplication::postEvent(QObject *receiver, QEvent *event);

To handle events in the window, override the event() method. You will have to define a new "string message" event type.

See http://doc.trolltech.com/3.1/qevent.html
0
 
LVL 7

Expert Comment

by:jconde
ID: 9807851
Take a look at the way Slots and Signals work under Qt.  Even though I have no idea of what you're trying to accomplish, I'm almost certain using Signals will do what you need.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question