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. Can Signnal'ed Event Generate a User Message

Can Signnal'ed Event Generate a User Message

Scheduled Pinned Locked Moved C / C++ / MFC
c++designjsonquestion
7 Posts 4 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.
  • F Offline
    F Offline
    ForNow
    wrote on last edited by
    #1

    Hi, I have a dos console process communicating with a MFC Win32 program/process I created a Cevent object passed the synchronization object to Dos console process created Process Table entry (DuplicateHandle) on the MFC WIN32 end I have a Cdiloag residing in a Cwinthread UI flavor My question is can the WIndow sdk api call SetEvent (to signal the shared Kernel object event) genarate a message to the MFC Cdialog thread thankx

    E K A 3 Replies Last reply
    0
    • F ForNow

      Hi, I have a dos console process communicating with a MFC Win32 program/process I created a Cevent object passed the synchronization object to Dos console process created Process Table entry (DuplicateHandle) on the MFC WIN32 end I have a Cdiloag residing in a Cwinthread UI flavor My question is can the WIndow sdk api call SetEvent (to signal the shared Kernel object event) genarate a message to the MFC Cdialog thread thankx

      E Offline
      E Offline
      eusto
      wrote on last edited by
      #2

      If i understand your question, you should be able to intercept the event and generate the message yourself.

      F 2 Replies Last reply
      0
      • F ForNow

        Hi, I have a dos console process communicating with a MFC Win32 program/process I created a Cevent object passed the synchronization object to Dos console process created Process Table entry (DuplicateHandle) on the MFC WIN32 end I have a Cdiloag residing in a Cwinthread UI flavor My question is can the WIndow sdk api call SetEvent (to signal the shared Kernel object event) genarate a message to the MFC Cdialog thread thankx

        K Offline
        K Offline
        KarstenK
        wrote on last edited by
        #3

        yes it should work. You use the HANDLE value of it not the object!!! You can also use ::PostMessage(HWND,MSG,0,0) API. It works fine because it fits best in the Windows-GUI.

        Press F1 for help or google it. Greetings from Germany

        1 Reply Last reply
        0
        • E eusto

          If i understand your question, you should be able to intercept the event and generate the message yourself.

          F Offline
          F Offline
          ForNow
          wrote on last edited by
          #4

          I am using the handle operator to get the syncronazation handle what is the MSG # WM_USER+ ???

          1 Reply Last reply
          0
          • E eusto

            If i understand your question, you should be able to intercept the event and generate the message yourself.

            F Offline
            F Offline
            ForNow
            wrote on last edited by
            #5

            Thankx the "C" SetEvent can'nt genarate a WM_USER type message I understand

            1 Reply Last reply
            0
            • F ForNow

              Hi, I have a dos console process communicating with a MFC Win32 program/process I created a Cevent object passed the synchronization object to Dos console process created Process Table entry (DuplicateHandle) on the MFC WIN32 end I have a Cdiloag residing in a Cwinthread UI flavor My question is can the WIndow sdk api call SetEvent (to signal the shared Kernel object event) genarate a message to the MFC Cdialog thread thankx

              A Offline
              A Offline
              Adam Roderick J
              wrote on last edited by
              #6

              As i understood, you have two applications 1. Console Application 2. MFC GUI Application( GUI thread derived ) Now you create a CEvent object in console application and duplicate the handle of the event object in MFC GUI. So that means, you are looking to get the event change in both process, isn't it? Now you have a doubt that if you call a SetEvent from Console application then whether it will generate a message to MFC thread. As far as i understood, if u have the same concern then It is yes, it will signal the wait inside the GUI application. But remember one thing this event is send to all the applications which have the same named event.

              Величие не Бога может быть недооценена.

              F 1 Reply Last reply
              0
              • A Adam Roderick J

                As i understood, you have two applications 1. Console Application 2. MFC GUI Application( GUI thread derived ) Now you create a CEvent object in console application and duplicate the handle of the event object in MFC GUI. So that means, you are looking to get the event change in both process, isn't it? Now you have a doubt that if you call a SetEvent from Console application then whether it will generate a message to MFC thread. As far as i understood, if u have the same concern then It is yes, it will signal the wait inside the GUI application. But remember one thing this event is send to all the applications which have the same named event.

                Величие не Бога может быть недооценена.

                F Offline
                F Offline
                ForNow
                wrote on last edited by
                #7

                It was unamed I used DuplicateHandle to create an Entry in console process table I think the best I can do is signal the event and then send a message or post to the Cwintnhread UI/CDialog object thankx

                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