O'Reilly logo

C++ Multithreading Cookbook by Milos Ljumovic

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Event handlers and Message Passing Interface

Many programs respond to some events, such as when a user presses a button or inputs some text. A very important mechanism is event handling or the ability of a program to react to user action. If we want to handle when a user presses a button, we need to create some kind of a listener that will listen to button events, in this case a press action.

An event handler is a function that the operating system calls each time the control sends some kind of message, such as I have been pressed in the case of buttons or I received a character in the case of a textbox.

Event handlers are very important. Timers are events that trigger after a certain portion of time has elapsed. When you press a key on the keyboard, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required