Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. ::PostMessage in Qt !
Forum Updated to NodeBB v4.3 + New Features

::PostMessage in Qt !

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 3.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Velab
    wrote on last edited by
    #1

    Hello,

    I have to convert C++ win32 API to , Qt DLL.

    In doing this, i struked in using **::PostMessage ** funictionality in Qt.
    ::PostMessage(m_hwndDest,m_nQuaternionMsg,MAKEWPARAM(marg,eErrors),LPARAM(m_lParam));

    Could anyone please let me know,
    How can i use, ::PostMessage funtionality in Qt ?

    ? 1 Reply Last reply
    0
    • V Velab

      Hello,

      I have to convert C++ win32 API to , Qt DLL.

      In doing this, i struked in using **::PostMessage ** funictionality in Qt.
      ::PostMessage(m_hwndDest,m_nQuaternionMsg,MAKEWPARAM(marg,eErrors),LPARAM(m_lParam));

      Could anyone please let me know,
      How can i use, ::PostMessage funtionality in Qt ?

      ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      @Velab You have a few options here, the first one is using QCoreApplication::postEvent, it will simulate the PostMessage.

      The other solution is to use QTimer::singleShot, you can use with the msec as 0, which you would have the same functionality.

      And one similar to QTimer but passing arguments, you could use QMetaObject::invokeMethod with Qt::QueuedConnection as type parameter.

      Qt::DirectConnection would execute the method immediately, whilst Qt::QueuedConnection would queue in the event loop.

      V 1 Reply Last reply
      0
      • ? A Former User

        @Velab You have a few options here, the first one is using QCoreApplication::postEvent, it will simulate the PostMessage.

        The other solution is to use QTimer::singleShot, you can use with the msec as 0, which you would have the same functionality.

        And one similar to QTimer but passing arguments, you could use QMetaObject::invokeMethod with Qt::QueuedConnection as type parameter.

        Qt::DirectConnection would execute the method immediately, whilst Qt::QueuedConnection would queue in the event loop.

        V Offline
        V Offline
        Velab
        wrote on last edited by
        #3

        @Minupi

        Thank you for the reply, I will try as you mentioned above.
        and back to you.

        ? 1 Reply Last reply
        0
        • V Velab

          @Minupi

          Thank you for the reply, I will try as you mentioned above.
          and back to you.

          ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          @Velab You are welcome. Good luck.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved