Visual C++ 6 Unleashed

Visual C++ 6 Unleashed

By MICKEY WILLIAMS and David Bennett

Developer Studio

Visual C++ 6.0 includes the Microsoft Developer Studio Integrated Development Environment (IDE). This environment is the centerpiece of most any interaction you will have with your C++ projects, including source file creation, resource editing, compiling, linking, debugging, and many other useful features.

In the bad old days, all C files, resource files, help files, and everything else had to be created with one or more editors. Then each object or resource had to be compiled with its own flavor of compiler, with its own set of switches and options. Then the whole darn thing had to be linked to create an application. Running and debugging an application involved several other steps and utilities. The only truly integrated development environment at this time was DOS DEBUG—of course, only if you were writing in machine language and entering a byte or so at a time.

Several compiler vendors started making integrated development environments, which allowed editing and compiling source in one application or shell, but still required several other functions to be performed outside of the IDE, not to mention the fact that you had to move in and out of the IDE to debug your application. This switching back and forth could quickly consume a big chunk of your development time.

The Developer Studio included with Visual C++ 6.0 allows you to perform everything you need to do throughout the life of your application, without ever leaving the IDE. Developer Studio also includes several features that will make your development tasks much simpler.

When you first start Microsoft Developer Studio, you should see a screen similar to the one shown in Figure 1.1—although you won't have an open project if this is your first time.

01fig01.gif

Figure 1.1 Microsoft Developer Studio.

Figure 1.1 shows an example of the windows that you might have open. Unfortunately, production of this book requires standard VGA mode screen shots, so some of the things you see here might appear a bit crowded. If you plan to do much work with Visual C++, you will probably want to use a higher resolution. I find that a 17-inch monitor at 1280x1024 is well worth the cost of the hardware.

View Windows

In addition to the windows for your source files, Developer Studio uses several view windows to present useful information at various stages in project development. When starting a project, you will probably be most interested in the Workspace and Output windows, shown in Figure 1.1. Although Developer Studio also provides separate windows for various debugging information including the Watch, Variables, Registers, Memory, Call Stack, and Disassembly windows.

Each window can be moved around in the workspace in different ways. By default, these windows will dock to an edge of your screen. If you double-click the frame of a docked window, it will undock, and you can freely place it where you like. You can even drag it outside of the Developer Studio window by holding Ctrl while you drag.

However, you might find the docking feature annoying. The window will try to dock when you don't want it to, and it will always float on top of your source windows. You can disable the docking view for each window from the Workspace tab of the Options dialog box found on the Tools menu. This will make the view window act just like a regular source code window, which also means you will no longer be able to drag it outside the Developer Studio frame.

Toolbars

You will notice that several different toolbars are used in Developer Studio. Most of these will normally dock at the top of the window, although you may drag the frame of the toolbar anywhere you like. You can attach the toolbar to any edge of the frame or you can just leave it floating around somewhere.

Many toolbars are not normally displayed. Sometimes these will pop up at appropriate times—such as the Resource toolbar, when you edit resources. At any time, you can select the toolbars you want to be displayed by right-clicking an empty area of Developer Studio (like an unused portion of the menu bar area). You may also select the toolbars that are displayed from the Toolbars page of the dialog box that is presented by the Customize command on the Tools menu. You may also select which toolbars are displayed by right-clicking in the toolbar area. The New button in the Toolbars dialog box will also allow you to create your own custom toolbars. To add buttons to a toolbar , go to the Commands tab of the Customize dialog box and drag the desired tools from the Commands tab to the new toolbar. You might need to move the Customize dialog box out of the way to see the new toolbar.

Share ThisShare This

Informit Network