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. Message Map from non ui application

Message Map from non ui application

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

    Hi Is it possible to do message maps calls like post and peakmessage from a non-GUI (no window) application? I have an MFC dll with callbacks that i presume can be invoked using message map calls. But as i understand these calls requires a window handle and as there is no window/UI (its a service) I am not sure how i can invoke these callback from the dll. Are there any related sample code or articles that i can look at? TIA -S PS: I am not very experienced with mfc programming so please bare with my silly questions.

    D M 2 Replies Last reply
    0
    • S shreelak

      Hi Is it possible to do message maps calls like post and peakmessage from a non-GUI (no window) application? I have an MFC dll with callbacks that i presume can be invoked using message map calls. But as i understand these calls requires a window handle and as there is no window/UI (its a service) I am not sure how i can invoke these callback from the dll. Are there any related sample code or articles that i can look at? TIA -S PS: I am not very experienced with mfc programming so please bare with my silly questions.

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

      shreelak wrote:

      I have an MFC dll with callbacks that i presume can be invoked using message map calls. But as i understand these calls requires a window handle...

      What would those callback functions do with a NULL window handle?


      "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

      "Judge not by the eye but by the heart." - Native American Proverb

      S 1 Reply Last reply
      0
      • D David Crow

        shreelak wrote:

        I have an MFC dll with callbacks that i presume can be invoked using message map calls. But as i understand these calls requires a window handle...

        What would those callback functions do with a NULL window handle?


        "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

        "Judge not by the eye but by the heart." - Native American Proverb

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

        I didn't try that. I shall try it now post my results thankyou

        1 Reply Last reply
        0
        • S shreelak

          Hi Is it possible to do message maps calls like post and peakmessage from a non-GUI (no window) application? I have an MFC dll with callbacks that i presume can be invoked using message map calls. But as i understand these calls requires a window handle and as there is no window/UI (its a service) I am not sure how i can invoke these callback from the dll. Are there any related sample code or articles that i can look at? TIA -S PS: I am not very experienced with mfc programming so please bare with my silly questions.

          M Offline
          M Offline
          Milton Karimbekallil
          wrote on last edited by
          #4

          This is possible. Hope ur ServiceMain is in a separate thread. u can use PostThreadMessage to post any message. Then in a loop you can chk for the messages by calling GetMessage or PeekMessage. cheers.. Milton KB

          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