Senthil Sundaram
How are windows messages passed through MFC?
By Senthil Sundaram in C, C++, MFC on Jul 26 2006
  • Ravi Kumar
    Nov, 2006 14

    Whenever your window receives a message, MFC will call a member function of your class. But how does MFC know what function to call?

    MFC uses a technique called Message Maps. A Message Map is a table that associates messages with functions. When you receive a message, MFC will go through your Message Map and search for a corresponding Message Handler.

    MFC uses a large set of rather complicated macros that add the Message Map to your classes. When you use ClassWizard to create a Message Handler, it will first add the function to your class, and add the corresponding macro to your Message Map.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS