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 I do this?

Can I do this?

Scheduled Pinned Locked Moved C / C++ / MFC
c++questionlearning
3 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.
  • E Offline
    E Offline
    ewighell
    wrote on last edited by
    #1

    void MyFun()
    {
    Fun1();
    //following function call sends a message that will triger the excution of
    //function MessageHandlerFun()
    FunSendingMessage();
    //I want the program to pause right here, and continue after the
    // MessageHandlerFun() renturns. can I realize this??
    .........code
    }

    void MessageHandlerFun()
    {
    .........code
    .........code
    }

    Thank you very much!!! ------------------- I am learning C++ and English

    S Y 2 Replies Last reply
    0
    • E ewighell

      void MyFun()
      {
      Fun1();
      //following function call sends a message that will triger the excution of
      //function MessageHandlerFun()
      FunSendingMessage();
      //I want the program to pause right here, and continue after the
      // MessageHandlerFun() renturns. can I realize this??
      .........code
      }

      void MessageHandlerFun()
      {
      .........code
      .........code
      }

      Thank you very much!!! ------------------- I am learning C++ and English

      S Offline
      S Offline
      Stephen Hewitt
      wrote on last edited by
      #2

      That's what will happen automatically if you use the SendMessage API to send the message. Steve

      1 Reply Last reply
      0
      • E ewighell

        void MyFun()
        {
        Fun1();
        //following function call sends a message that will triger the excution of
        //function MessageHandlerFun()
        FunSendingMessage();
        //I want the program to pause right here, and continue after the
        // MessageHandlerFun() renturns. can I realize this??
        .........code
        }

        void MessageHandlerFun()
        {
        .........code
        .........code
        }

        Thank you very much!!! ------------------- I am learning C++ and English

        Y Offline
        Y Offline
        YaronNir
        wrote on last edited by
        #3

        the program control will run MyFun() then it will call FunSendingMessage(), since it is using SendMessage, the main function MyFun will not regain control until the function MessageHandleFun() will finish and return.... so basically you don't have to do anything :) Ask not what your application can do for you, Ask what you can do for your application

        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