Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Posting message to thread

Posting message to thread

Scheduled Pinned Locked Moved C / C++ / MFC
designtutorial
5 Posts 5 Posters 0 Views 1 Watching
  • 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.
  • K Offline
    K Offline
    kuttiam
    wrote on last edited by
    #1

    Hi All, Can any one tell me how to post a message from worker thread to UI thread and vice-versa. Thanks in Advance:rose:

    C S N D 4 Replies Last reply
    0
    • K kuttiam

      Hi All, Can any one tell me how to post a message from worker thread to UI thread and vice-versa. Thanks in Advance:rose:

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      kuttiam wrote:

      from worker thread to UI thread

      You can only post messages to UI threads. :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

      1 Reply Last reply
      0
      • K kuttiam

        Hi All, Can any one tell me how to post a message from worker thread to UI thread and vice-versa. Thanks in Advance:rose:

        S Offline
        S Offline
        SandipG
        wrote on last edited by
        #3

        You can use events for worker threads. You cant send message to worker threads.

        1 Reply Last reply
        0
        • K kuttiam

          Hi All, Can any one tell me how to post a message from worker thread to UI thread and vice-versa. Thanks in Advance:rose:

          N Offline
          N Offline
          Nibu babu thomas
          wrote on last edited by
          #4

          kuttiam wrote:

          Can any one tell me how to post a message from worker thread to UI thread and vice-versa.

          If you have the thread id then use PostThreadMessage. You should have a message loop running in the thread proc.

          Nibu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com

          1 Reply Last reply
          0
          • K kuttiam

            Hi All, Can any one tell me how to post a message from worker thread to UI thread and vice-versa. Thanks in Advance:rose:

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            kuttiam wrote:

            Can any one tell me how to post a message...

            Other than PostMessage()?

            "Love people and use things, not love things and use people." - Unknown

            "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups