[Qt-interest] Problem using QWidget::winEvent
Scott Aron Bloom
Scott.Bloom at sabgroup.com
Mon Jun 15 14:07:25 CEST 2009
I would look into the fact that PostMessage returns immediately, try
SendMessage
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of anjani gupta
Sent: Monday, June 15, 2009 4:02 AM
To: QtInterest
Subject: [Qt-interest] Problem using QWidget::winEvent
Hi All,
I have a Windows application that sends message to already running Qt
application like this:
{
char* file_path;
//Assign some value to file path.
PostMessage( hwnd, WM_USER, (WPARAM)(file_path), (LPARAM)(file_path)
);
}
This message is handled by Qt application by overriding 'winEvent'
method as below:
bool QMainWindow::winEvent ( MSG * msg, long * result )
{
if(msg->message == WM_USER)
{
char* param1 = (char*)(msg->wParam);
char* param2 = (char*)(msg->lParam);
//Process message
}
return false;
}
Here issue is that 'param1' and 'param2' are not populated with values
passed in WPARAM and LPARAM of 'PostMessage( )'. I am using Qt-4.4.3 on
Windows.
I think I am missing something here. Please help me out in this.
Thanks in advance!
Regards,
Anjani
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090615/14e76364/attachment.html
More information about the Qt-interest-old
mailing list