[Qt-interest] Problem using QWidget::winEvent

anjani gupta anjanigupta_dce at yahoo.com
Mon Jun 15 13:01:38 CEST 2009


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/8d0a5300/attachment.html 


More information about the Qt-interest-old mailing list