List of Figures


Chapter 1: An Introduction to Visual C++ 2005 Express

Figure 1.1: The starting screen of the Joke Machine.
Figure 1.2: Clicking the first button triggers the first joke.
Figure 1.3: Clicking the second button triggers the second joke.
Figure 1.4: Visual C++ 2005 Express Edition showing the Start Page.
Figure 1.5: The Microsoft .NET Framework is utilized by multiple languages to build applications for several target platforms.
Figure 1.6: The New Project dialog box allows you to control the creation of a new project.
Figure 1.7: Visual C++ presents a blank form when you begin a new project based on a Windows Forms Application template.
Figure 1.8: You can resize many form controls by dragging their borders.
Figure 1.9: Visual C++ adds descriptive text to controls as you add them to a form.
Figure 1.10: You can give controls functionality by adding code to them in the Code Editor.

Chapter 2: Navigating the Visual C++ 2005 Express Edition Environment

Figure 2.1: Starting up the Click Race game.
Figure 2.2: Players score points by clicking on the currently active game button.
Figure 2.3: To score another point, the player must click on the second game button.
Figure 2.4: Plays ends at 30 seconds when both game buttons are disabled.
Figure 2.5: The Visual C++ IDE has room to show only a portion of the available toolbars and windows at any one time.
Figure 2.6: Microsoft has implemented several clever organizational tricks to make the IDE more manageable.
Figure 2.7: The Standard toolbar provides access to the most commonly used IDE commands and windows.
Figure 2.8: Visual C++ automatically creates a new form containing basic Windows elements each time you open a new Visual C++ project.
Figure 2.9: As you drag elements to a form, alignment indicators appear to assist you in aligning form controls.
Figure 2.10: The Code Editor has two drop-down lists (Scope and Functions) used to quickly navigate within an application source code.
Figure 2.11: The Visual C++ Code Editor automatically color-codes statements and indents them to make them easier to read.
Figure 2.12: IntelliSense provides dynamic assistance as you enter your code statements.
Figure 2.13: IntelliSense can assist you in the creation of complex code statements and in reducing typos.
Figure 2.14: You can manually activate IntelliSense by using the Ctrl and Spacebar keys.
Figure 2.15: The Toolbox window provides access to the controls you can use to create a Windows application.
Figure 2.16: Using Solution Explorer, you can manage the projects and files that make up your Visual C++ applications.
Figure 2.17: Examining the properties associated with an application's Form control.
Figure 2.18: When the available range of values for a property is limited, the Properties window produces a drop-down list for your selection.
Figure 2.19: When properties have a wide range of possible options, selecting them initiates a separate dialog box where you can choose the values to customize the property.
Figure 2.20: The Component Tray uses icons to represent all controls that affect your application but that the user cannot see or manipulate.
Figure 2.21: The design view of the Click Race game's interface.

Chapter 3: Creating an Application Interface

Figure 3.1: The Speed Typing game begins when the player clicks on the Go button.
Figure 3.2: Players advance by typing the required text string within the allotted amount of time.
Figure 3.3: Players who fail to type the required text in time receive a strike.
Figure 3.4: Players who make a typo when keying in the required text string receive a strike.
Figure 3.5: The player's typing skill level is analyzed and displayed at the end of gameplay.
Figure 3.6: Unless you specify otherwise, Visual C++ allows users to alter the size of your application's window.
Figure 3.7: By default, Visual C++ displays a form's name in its title bar.
Figure 3.8: Programmatically changing the text string displayed in the window's title bar.
Figure 3.9: Modifying the default tab order of the controls Located on a Visual C++ form.
Figure 3.10: A Windows Status Strip displaying a time and date in two separate panels.
Figure 3.11: You can modify Status Strip controls directly or by using the Items Collection Editor.
Figure 3.12: Status Strips provide an effective means of communicating important information as the application runs.
Figure 3.13: The Windows System Tray provides single- and double-click access to various Windows utilities, processes, and applications.
Figure 3.14: The MessageBox——Show method is perfect for displaying a small amount of text.
Figure 3.15: Twenty-one different formats of the MessageBox——Show methods are supported.
Figure 3.16: Prompting the user for permission to continue.
Figure 3.17: Displaying a simple informational message.
Figure 3.18: Prompting the user to select from three options.
Figure 3.19: Viewing the results of the button selection the user made.
Figure 3.20: The Configuration Manager allows you to build debug or release versions of your application.

Chapter 4: Working with Menus and Toolbars

Figure 4.1: The Lottery Assistant game begins by collecting player input.
Figure 4.2: Players control the game using its menu system.
Figure 4.3: Up to 10 sets of lottery numbers can be generated at a time.
Figure 4.4: Players can configure the game's background color.
Figure 4.5: Using the Font Size submenu, the user can specify the font size used to display lottery numbers.
Figure 4.6: By clicking on the About menu item located on the Help menu, players can learn more about the game.
Figure 4.7: This menu illustrates the contents of the Visual C++ Express 2005 File menu.
Figure 4.8: You can use the MenuStrip control to add a menu system to a Visual C++ application.
Figure 4.9: The first menu heading in the application's menu system is defined by typing its name.
Figure 4.10: Additional menus can be added to the application's menu system.
Figure 4.11: Menu items can be added by typing in the boxes under a menu heading.
Figure 4.12: Entering text automatically enables you to add submenu items to the menu system.
Figure 4.13: Visual C++ allows you to insert a standard menu system into a form.
Figure 4.14: Clicking any menu item allows you to easily add code to it.
Figure 4.15: You can specify the shortcut you want to assign to a menu or menu item.
Figure 4.16: You can specify shortcut keys to activate menus and menu items.
Figure 4.17: This example shows the process of adding access keys to menus and menu items.
Figure 4.18: A check mark indicates when a menu item has been selected.
Figure 4.19: Using separator bars can visually group related menu items.
Figure 4.20: Menu items can be disabled at design time.
Figure 4.21: Associated submenus are disabled when a menu item is disabled.
Figure 4.22: Here the Custom submenu item has been made invisible on the Background submenu.
Figure 4.23: You can also control user access to menu items by hiding and redisplaying them when appropriate.
Figure 4.24: Here the menu items for a context menu are configured.
Figure 4.25: This button has been given an associated context menu.
Figure 4.26: The ToolBarButton Collection Editor a allows you to add and remove buttons on a toolbar.
Figure 4.27: Use the up and down arrows to configure the order in which buttons are displayed on the toolbar.
Figure 4.28: The Images Collection Editor lets you specify the images that you will add to your toolbar.
Figure 4.29: Here a graphic image is added to a ToolBar control button.
Figure 4.30: A dialog box is displayed as a result of clicking within the correct area.
Figure 4.31: The interface design for the Lottery Assistant game is complete.

Chapter 5: Storing and Retrieving Data in Memory

Figure 5-1: The Story of Mighty Molly game begins by presenting the player with five questions and then allowing him to tell the story by clicking a button.
Figure 5.2: An introduction tells the story of Mighty Molly.
Figure 5.3: The game issues an error if all text is not filled in.
Figure 5.4: A progress bar located on the status bar indicates when all required information has been collected.
Figure 5.5: Data input collected from the player is then plugged into the story line and displayed for the player to enjoy.
Figure 5.6: By assigning a string to a constant, you can use it throughout your application without worrying that the value will change.
Figure 5.7: Using IntelliSense to view methods and properties associated with a variable object.
Figure 5.8: Completing the interface design for The Story of Mighty Molly.

Chapter 6: Applying Conditional Logic

Figure 6.1: The game begins by allowing the player to specify configuration options, including the range of numbers to pick from and the amount of information the game displays.
Figure 6.2: When gameplay starts, the player's access to the configuration options is disabled and the player is prompted to take the first guess.
Figure 6.3: The game gives players clues to help them home in on the answer. It also displays a running count of the number of guesses the player makes.
Figure 6.4: At the end of each game, the player gets a chance to modify the game's configuration options and reset the score.
Figure 6.5: Validating the player age before allowing the game to be played.
Figure 6.6: Using an if...else if statement to process the contents of a ComboBox control.
Figure 6.7: Using the String Collection Editor at design time to populate the contents of a ComboBox control.
Figure 6.8: Completing the interface design for the Guess a Number game.

Chapter 7: Processing Lots of Data with Loops

Figure 7.1: The Dice Poker game begins by giving the player $20 in an account.
Figure 7.2: Players can elect to hold onto specific dice before rolling the dice a second time.
Figure 7.3: Two dollars are deducted from the player's account for each losing hand.
Figure 7.4: Winning hands are rewarded with additional credits to the player's account.
Figure 7.5: Winning hands include 3, 4, and 5 of a kind, full house, and high and low straights.
Figure 7.6: The game automatically ends if the player's account runs out of money.
Figure 7.7: Completing the interface design for the Dice Poker game.

Chapter 8: Enhancing Code Structure and Organization

Figure 8.1: When the game is started, it displays a graphic showing an empty hangman's gallows and a series of underscore characters representing the secret word.
Figure 8.2: As the game progresses, each correct guess is displayed at the top of the window, and a visual record of every letter guessed is displayed at the bottom of the window.
Figure 8.3: The game prevents the player from making the same letter guess more than once.
Figure 8.4: The game permits the player to enter only one letter at a time.
Figure 8.5: The game prevents the player from entering numeric input.
Figure 8.6: The game congratulates the player when he correctly guesses the secret word.
Figure 8.7: If the player fails to guess the secret word within six guesses, he loses the game, and the picture of the hangman's gallows is updated to show a full hangman image.
Figure 8.8: Entering data into the Vitals application.
Figure 8.9: A function within the Vitals application shows the information passed to it.
Figure 8.10: Using the DateTime.Now() function to display the current date and time.
Figure 8.11: Examining the Layout of the Hangman game's user interface.

Chapter 9: Getting Comfortable with Object-Oriented Programming

Figure 9.1: The Rock, Paper and Scissors game begins by displaying the game board.
Figure 9.2: When the player clicks on the Play button, a 1.5-second countdown begins.
Figure 9.3: The player gets a half second at the end of the countdown to make a selection by choosing rock, paper, or scissors.
Figure 9.4: As soon as both the computer and the player have made their choices, the game displays graphics showing each move and determines who won.
Figure 9.5: The Rock, Paper and Scissors game also keeps a running tally of the number of wins, losses, and ties.
Figure 9.6: Completing the interface design for the Rock, Paper and Scissors game.

Chapter 10: Integrating Graphics and Audio

Figure 10.1: The user interface for the VC++ Doodle game consists of a control panel and a drawing area.
Figure 10.2: VC++ Doodle gives the player a range of colors to choose from.
Figure 10.3: The game assists the player in drawing an assortment of predefined shapes.
Figure 10.4: The player also has the option of making a freehand drawing using any combination of colors.
Figure 10.5: A graphical depiction of the coordinate system employed by GDI+ when drawing graphics.
Figure 10.6: An example of an application that uses the PictureBox and ImageList controls to work with graphics.
Figure 10.7: Using the Graphics class's DrawRectangle method to draw a shape.
Figure 10.8: Drawing a filled-in circle using the Graphics object's FillEllipse method.
Figure 10.9: Visual C++ allows you to draw text as a graphic.
Figure 10.10: Using the Windows Sound Recorder utility to create a custom wave file.
Figure 10.11: Completing the interface design for the VC++ Doodle game.

Chapter 11: Debugging Visual C++ Applications

Figure 11.1: The Tic-Tac-Toe game begins by displaying a blank game board.
Figure 11.2: The game keeps track of each player's turn.
Figure 11.3: The game monitors each player's move and determines when there is a winner.
Figure 11.4: The Output window displays errors found at compile time.
Figure 11.5: An example of a visual C++ runtime error displayed when an application is being executed in Design mode.
Figure 11.6: Using a breakpoint to pause an application's execution.
Figure 11.7: The Visual C++ IDE changes the highlight of the currently active breakpoint.
Figure 11.8: Using the Debug icons on the standard toolbar to step through program statements.
Figure 11.9: Examining the error message that's generated when your application runs into an unhandled exception at runtime.
Figure 11.10: Exception handling provides a more graceful means of dealing with runtime errors.
Figure 11.11: Completing the interface design for the Tic-Tac-Toe game.




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