PROJECT PREVIEW: THE JOKE MACHINE


In this chapter, as with each chapter to follow, you learn how to create a Visual C++ application. Each chapter provides a simple, fun way to learn the language, introduce you to the various tools you need to create each program, and give you a foundation on which to expand your knowledge of C++ and the .NET Framework.

The application that you learn to create in this chapter is a simple program called the Joke Machine. Its purpose is to display to the user two jokes. It is a fully functional Windows application, complete with buttons for closing and minimizing the program, buttons associated with each of the two jokes, and a text box used for displaying the jokes. Although the program is easy to develop, it illustrates the powerful techniques for designing and programming Windows applications.

When you first launch the Joke Machine, it appears in a window, as shown in Figure 1.1.

image from book
Figure 1.1: The starting screen of the Joke Machine.

Figure 1.2 shows the result of causing the Joke Machine to tell the first joke.

image from book
Figure 1.2: Clicking the first button triggers the first joke.

Figure 1.3 displays the result of clicking the second joke.

image from book
Figure 1.3: Clicking the second button triggers the second joke.




Microsoft Visual C++ 2005 Express Edition Programming for the Absolute Beginner 2006
Microsoft Visual C++ 2005 Express Edition Programming for the Absolute Beginner 2006
ISBN: 735615381
EAN: N/A
Year: 2005
Pages: 131

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net