CS 46A Lab 2
Microsoft Developer Studio
Department of Mathematics and Computer Science
San Jose State University
Microsoft Developer Studio (MSDS) is an integrated development environment (IDE) for building projects. A project can include Word, Excel, Chart, PowerPoint, and text documents, web pages, and Java, C, and C++ programs.
The main subsytems of MSDS are the user interface (UI); InfoViewer (IV), the online help system; a text editor; a project manager; and Java, C, and C++ programming tools such as compilers, linkers, and debuggers. (MSDS is modularized, so your configuration may have more or fewer subsystems.)
Visual C++ (VC++) refers to the MSDS components that pertain to C++ (this includes the compiler, linker, and debugger), but the terms "Microsoft Developer Studio" and "Visual C++" sometimes get used interchangably (much to the displeasure of Visual Java programmers).
Starting MSDS
To start MSDS push the Start button in the lower left corner of the desktop with the left mouse button. A menu appears. Move the mouse cursor over the "Programs" selection. This causes a submenu to appear. Move the mouse over the "Microsoft Visual C++ 5.0" selection. A sub-submenu appears. Move the mouse cursor over the "Microsoft Visual C++ 5.0" selection of the sub-submenu and click once with the left mouse button.
The MSDS User Interface (UI)
The MSDS user interface (UI) is a desktop window containing a menu bar; eleven predefined toolbars; a view area that may contain views of files, projects, online documentation, and program output; and countless dialog boxes that pop up in response to certain commands.
Predefined views and toolbars can be opened and closed using the UI shortcut menu. Click in any empty space in the view area, menu bar, or a toolbar with the right mouse button to display this shortcut menu. The menu lists all predefined toolbars and views. Use the left mouse button to check or uncheck the views and toolbars you do or don't want to see.
Experiment with the shortcut menu. Close all views and toolbars, then open each toolbar one at a time.
Dialog Boxes and Controls
Dialog boxes are windows containing control panels that pop up in response to certain commands. The four basic types of controls are buttons (push, check, and radio), sliding controls (sliders and scroll bars), edit controls, and lists (list boxes, combo boxes, tree controls, and list controls). There are also more exotic types of controls.
A modal dialog box suspends all other MSDS activities until it is dismissed, usually by clicking the OK or Cancel button. Modal dialog boxes appear in response to a command or emergency that must be dealt with before further work is possible. A modeless dialog box can remain up while the user returns to MSDS to do more work.
Views
A view displays all or some part of a document. MSDS deals with many types of documents: files, projects, workspaces, web pages, InfoView topics, Word documents, Excel documents, Power Point documents, etc. There are two types of views: docking windows and document windows.
Docking Windows
The two main examples of docking windows are the output window and the workspace window (later we will see that the menu bar and toolbars are also docking windows). The workspace window displays project and workspace documents as well as the table of contents of the InfoViewer database. The output window displays output from the debugger, compiler, linker, and various search commands.
A docking window is always in one of three states: docked, floating, or closed. In its docked state, the window is glued to one of the four sides of the view area. In its floating state the window floats in the middle of the view area, where it can be resized and moved around the entire desktop.
Double clicking on the border of a docking window with the left mouse button toggles its state between floating and docked. Clicking on the close button in the upper left or right corner of a docking window closes it. (Select Workspace from The View menu or check workspace in the UI shortcut menu to reopen the workspace window.)
A docked window (i.e. a docking window in its docked state) can be resized, too. Place the mouse cursor over the edge facing the interior of the view area, the cursor should change into a pair of vertical lines, hold the left mouse button down, then pull the edge toward or push the edge away from the view area.
A floating window (i.e., a docking window in its floating state) is a nervous creature. Dragging it too close to the side of the view area causes it to jump to its docking state.
Hide all toolbars and windows except the workspace window. The workspace window is an example of a docking window. Experiment with docking, floating, moving, and resizing this window. Notice that in its floating state it can be moved anywhere on the desktop.
Tabbed Windows
The workspace and output windows are also examples of tabbed windows. A tabbed window has tabs along its top or bottom that allow views of multiple objects and/or multiple views of the same object to share one window. Click on a tab with the left mouse button to select the desired view.
The tabs on the output window show the output produced by the compiler and linker (Build tab), the output produced by the debugger (Debug tab), and the outputs produced by various search commands.
The tabs on the Workspace window show a tree control listing the contents of the InfoViewer database (InfoView tab), the files of the current project (File View tab), the resources of the current project (Resource View tab), and the classes of the current project (Class View tab). At the moment, there is no current project, so the last three views are empty. The Resource View tab only appears if the project has resources (e.g., dialogs, menus, and toolbars of its own).
Document Windows
Document windows should be familiar, they have the same basic states and controls that desktop windows have, except they are confined to the view area of a desktop window, the MSDS user interface for example. Document windows display files, web pages, InfoViewer topics, and documents created by Excel, Word, Chart, and PowerPoint.
When the desktop is filled with windows, the distinction between desktop windows, document windows, floating windows, and modeless dialog boxes can get confusing. The MSDS desktop window is sometimes called a main window or parent window. In this context the MSDS document, docking, and dialog windows are called child windows.
Select New from the File menu. The New dialog box appears:
The New dialog is also a tabbed window. Select the File tab. Name the controls you see. Is this a modal or modeless dialog? Double click on the Text File item in the list box with the left mouse button (or single click, then press the OK button). This creates a new text file, which should appear in a document window in the view area:
Modifying a Document Window
A document window can be in one of four states: maximized, minimized, resizable, and closed. The three buttons in the upper right corner of the document window allow users to change the state of the window. (Why aren't there four buttons?) The "_" button minimizes the window and the "x" button closes the window.
In its resizable state, a document window can be shrunk, expanded, and moved around the view area. To shrink or expand a document window place the mouse cursor over the stripes in the lower right corner of the window or over any edge of the window. The cursor should change to a thin double arrow. Hold the left mouse button down and move the mouse. The selected edge or corner should move while the opposite edge or corner remains fixed.
To move a window place the mouse cursor in the colored title bar at the top of the window. Hold the left mouse button down and move the mouse. Notice that the whole window moves with the mouse.
Experiment with the text window. What happens when it is minimized? Are the states of the parent window related to the states of the child window?
Create three more text files, then experiment with the selections in the Window menu. What do these selections do?
Selecting a Window
Notice that at any time the title bar of one document window will be colored, while the others will be greyed. The window with the colored bar is in focus or selected. Any keyboard input will go to this window. To select a different window, simply place the mouse cursor in it and click the left mouse button.
The Menu Bar and Toolbars
The menu bar and toolbars are also examples of docking windows. Close all windows, then open each toolbar, one at a time. Change each toolbar and the menu bar into a floating window.
Change each back to a docked window, then close each toolbar. Notice that you can't close the menu bar.
Toolbars contain buttons that correspond to menu selections; they are a convenience feature. Because they take up valuable screen space, and because they are redundant, I keep all of them closed, except for the InfoViewer toolbar (although some people prefer the Standard toolbar). It is also possible to customize toolbars.
The nine menus on the menu bar are: File, Edit, View, Insert, Project, Build, Tools, Window, and Help. The items on these menus are called items, entries, selections, or commands. Selections followed by an ellipsis (...) display dialogs to gather further information from the user. Selections followed by a small, black triangle are submenus. Submenus can also contain submenu selections, thus a menu can have a hierarchical structure.
The File menu contains commands for creating, opening, closing, and saving workspaces and files.
The Edit menu contains editor commands: cut, copy, paste, find, replace, undo, redo, etc.
The View menu provides commands for opening and closing docking windows.
The Insert, Project, and Build menus contain selections for managing, compiling, linking, and debuging projects.
The Tools menu mostly contains commands for starting standalone helper applications used in conjunction with developing Windows applications. These tools don't concern beginners only interested in developing console applications. However, the last two selections: Options and Customize, display dialog boxes that allow users to alter many features of MSDS, including the user interface.
The Window menu provides commands for managing document windows. This can be useful when there are lots of them.
The Help menu provides commands for searching the online help. I find the corresponding InfoViewer toolbar more convenient, so I keep it open most of the time and use it instead.