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. send message from thread to extended MFC DLL

send message from thread to extended MFC DLL

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
2 Posts 2 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.
  • I Offline
    I Offline
    iz7
    wrote on last edited by
    #1

    hi can any one tell me that how can i send message from a thread to the dll main, actually i thread is within the dll, now there is a need to display the message that stop the thread for a moment asking the user request to continue or not, now i want this message to be displayed from the dll and not from the thread (i.e outside the thread), i studied about send message and postmessages, but what actually should i do ,, i shall be thankful for ur help thanks

    M 1 Reply Last reply
    0
    • I iz7

      hi can any one tell me that how can i send message from a thread to the dll main, actually i thread is within the dll, now there is a need to display the message that stop the thread for a moment asking the user request to continue or not, now i want this message to be displayed from the dll and not from the thread (i.e outside the thread), i studied about send message and postmessages, but what actually should i do ,, i shall be thankful for ur help thanks

      M Offline
      M Offline
      MailtoGops
      wrote on last edited by
      #2

      This is my understanading of the problem... 1. You have an application and a dll 2. You are creating a thread which thread proc is in the DLL function 3. You need to send a message to the Thread which reside insode the dll.. Am I right? PostMessage and SendMessage are used to send or post a message to the same proc.. Obviously they are belongs to the Window and processed by the Window Proc. As you know Window and Thread are fundamentally different.. In your case, your have two threads (minimum, one is your application thread and another one is dll thread... For sending messages between the threads you have to use PostThreadMessage() function. For that you need the thread id of the destination. Hope this help you.. Let me know if you need more information... :) " Action without vision is only passing time, Vision without action is merely day dreaming, But vision with action can change the world " - Words from Nelson Mandela Thanks & Regards, Gopalakrishnan

      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