Murach's C++ 2008
How to code methods and event handlers

First, this chapter shows you how to code and call methods and how to generate event handlers for all types of events. Then, it shows you how delegates are used to wire an event to a method so you can change that wiring whenever you need to. This is an essential skill that is often treated too lightly or too late in other books.

Chapter 6 How to code methods and event handlers
How to code and call methods 152
How to code methods 152
How to call methods 154
When and how to pass arguments by reference and by value 156
How to work with events and delegates 158
How to generate an event handler for any event 158
How event wiring works 160
How to handle multiple events with one event handler 162
Another version of the Future Value application 164
The event handlers and the CalculateFutureValue method 164
Some of the generated code 166




Murach's C++ 2008

Learn more about this book

View the table of contents


More about the eBook



Our 100% Guarantee

First, try our books for 90 days. Then, if you aren't completely convinced that our books are the best ones you've ever used, you can return them for a prompt refund...no questions asked.