?? apc.htm
字號(hào):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function popUp(pPage) {
var fullURL = document.location;
var textURL = fullURL.toString();
var URLlen = textURL.length;
var lenMinusPage = textURL.lastIndexOf("/");
lenMinusPage += 1;
var fullPath = textURL.substring(0,lenMinusPage);
popUpWin = window.open('','popWin','resizable=yes,scrollbars=no,width=525,height=394');
figDoc= popUpWin.document;
zhtm= '<HTML><HEAD><TITLE>' + pPage + '</TITLE>';
zhtm += '<link rel="stylesheet" href="/includes/stylesheets/ebooks.css"></head>';
zhtm += '<BODY bgcolor="#FFFFFF">';
zhtm += '<IMG SRC="' + fullPath + pPage + '">';
zhtm += '<P><B>' + pPage + '</B>';
zhtm += '</BODY></HTML>';
window.popUpWin.document.write(zhtm);
window.popUpWin.document.close();
// Johnny Jackson 4/28/98
}
//-->
</SCRIPT>
<link rel="stylesheet" href="/includes/stylesheets/ebooks.css">
<TITLE>Special Edition Using Visual C++ 6 -- Appendix C -- The Visual Studio User Interface, Menus, and Toolbars</TITLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF">
<CENTER>
<H1><IMG SRC="../button/que.gif" WIDTH="171" HEIGHT="66" ALIGN="BOTTOM" BORDER="0"><BR>
Special Edition Using Visual C++ 6</H1>
</CENTER>
<CENTER>
<P><A HREF="../apb/apb.htm"><IMG SRC="../button/previous.gif" WIDTH="128" HEIGHT="28"
ALIGN="BOTTOM" ALT="Previous chapter" BORDER="0"></A><A HREF="../apd/apd.htm"><IMG
SRC="../button/next.gif" WIDTH="128" HEIGHT="28" ALIGN="BOTTOM" ALT="Next chapter"
BORDER="0"></A><A HREF="../index.htm"><IMG SRC="../button/contents.gif" WIDTH="128"
HEIGHT="28" ALIGN="BOTTOM" ALT="Contents" BORDER="0"></A>
<HR>
</CENTER>
<CENTER>
<H1>- C -</H1>
</CENTER>
<CENTER>
<H1>The Visual Studio User Interface, Menus, and Toolbars</H1>
</CENTER>
<UL>
<LI><A HREF="#Heading1">Reviewing Developer Studio: An Integrated Development Environment</A>
<LI><A HREF="#Heading2">Choosing a View</A>
<LI><A HREF="#Heading3">Looking at Interface Elements</A>
<UL>
<LI><A HREF="#Heading4">Accelerators</A>
<LI><A HREF="#Heading5">Dialog Boxes</A>
<LI><A HREF="#Heading6">Icons</A>
<LI><A HREF="#Heading7">Menus</A>
<LI><A HREF="#Heading8">The String Table</A>
<LI><A HREF="#Heading9">Toolbars</A>
<LI><A HREF="#Heading10">Version Information</A>
</UL>
<LI><A HREF="#Heading11">Looking at Your Code, Arranged by Class</A>
<LI><A HREF="#Heading12">Looking at Your Code, Arranged by File</A>
<LI><A HREF="#Heading13">Output and Error Messages</A>
<LI><A HREF="#Heading14">Editing Your Code</A>
<UL>
<LI><A HREF="#Heading15">Basic Typing and Editing</A>
<LI><A HREF="#Heading16">Working with Blocks of Text</A>
<LI><A HREF="#Heading17">Syntax Coloring</A>
<LI><A HREF="#Heading18">Shortcut Menu</A>
</UL>
<LI><A HREF="#Heading19">Learning the Menu System</A>
<UL>
<LI><A HREF="#Heading20">Using the File Menu</A>
<LI><A HREF="#Heading21">Edit</A>
<LI><A HREF="#Heading22">Using the View Menu</A>
<LI><A HREF="#Heading23">Insert</A>
<LI><A HREF="#Heading24">Project</A>
<LI><A HREF="#Heading25">Build</A>
<LI><A HREF="#Heading26">Tools</A>
<LI><A HREF="#Heading27">Window</A>
<LI><A HREF="#Heading28">Help</A>
</UL>
<LI><A HREF="#Heading29">Reviewing Toolbars</A>
<UL>
<LI><A HREF="#Heading30">Standard Toolbar</A>
<LI><A HREF="#Heading31">Build Mini-bar</A>
<LI><A HREF="#Heading32">Using Other Toolbars</A>
</UL>
</UL>
<P>
<HR SIZE="4">
<CENTER>
<H1></H1>
</CENTER>
<H2><A NAME="Heading1"></A>Reviewing Developer Studio: An Integrated Development
Environment</H2>
<P>When you buy Microsoft Visual C++, you actually get Microsoft Developer Studio
with the Visual C++ component activated. Developer Studio is far more than just a
compiler, and you have far more to learn than you may think. The interface is very
visual, which means that there are many possibilities greeting you when you first
run Visual C++.</P>
<P>Microsoft Visual C++ is one component of the Microsoft Developer Studio. The capabilities
of this one piece of software are astonishing. It is called an <I>integrated development
environment</I> <I>(IDE)</I> because within a single tool, you can perform the following:</P>
<UL>
<LI>Generate starter applications without writing code.
<P>
<LI>View a project several different ways.
<P>
<LI>Edit source and include files.
<P>
<LI>Build the visual interface (menus and dialog boxes) of your application.
<P>
<LI>Compile and link.
<P>
<LI>Debug an application while it runs.
</UL>
<P>Visual C++ is, technically speaking, just one component of Developer Studio. You
can buy, for example, Microsoft's Visual J++ compiler and use it in Developer Studio
as well. Looking at it another way, Visual C++ is more than just Developer Studio
because the <I>Microsoft Foundation Classes (MFC)</I> that are becoming the standard
for C++ Windows programming are a class library and not related to the development
environment. In fact, the major C++ compilers all use MFC now. However, for most
people, Visual C++ and Developer Studio mean the same thing, and in this book the
names are used interchangeably.</P>
<P>
<H2><A NAME="Heading2"></A>Choosing a View</H2>
<P>The user interface of Developer Studio encourages you to move from view to view
in your project, looking at your resources, classes, and files. The main screen is
divided into panes that you can resize to suit your own needs. There are many shortcut
menus, reached by right-clicking different places on the screen, that simplify common
tasks.</P>
<P>With Visual C++, you work on a single application as a <I>workspace</I>, which
contains one or more projects. A <I>project</I> is a collection of files: source,
headers, resources, settings, and configuration information. Developer Studio is
designed to enable work on all aspects of a single workspace at once. You create
a new application by creating a new project. When you want to work on your application,
open the workspace (a file with the extension .DSW) rather than each code file independently.
The interface of \revdttm1176855283 Developer Studio, shown in Figures C.1 and C.2,
is designed to work with a workspace and is divided into several zones.</P>
<P><A HREF="javascript:popUp('xcuvc01.gif')"><B>FIG. C.1</B></A><B> </B><I>The Developer
Studio interface presents a lot of information. The Workspace window is on the left.</I></P>
<P><A HREF="javascript:popUp('xcuvc02.gif')"><B>FIG. C.2</B></A><B> </B><I>When the
Workspace window is narrowed, the words on the tabs are replaced with icons.</I></P>
<P>The zones that make up the Developer Studio interface are as follows:</P>
<UL>
<LI>Across the top: menus and toolbars. These are discussed in the second half of
this chapter.
<P>
<LI>On the left: the Workspace window.
<P>
<LI>On the right: your main working area where you edit files.
<P>
<LI>Across the bottom: the output window and status bar.
</UL>
<BLOCKQUOTE>
<P>
<HR>
<strong>TIP:</strong> Open Developer Studio and try to resize the panes and follow along
as functions are described in this chapter. If you want an application to follow
along with, you can build a very simple one as described in Chapter 1, "Building
Your First Windows Application."
<HR>
</BLOCKQUOTE>
<P>The Workspace window determines which way you look at your project and what is
in the main working area: code or resources (menus, icons, and dialog boxes). Each
of these views is discussed in detail in a separate section in this chapter, including
the following:</P>
<UL>
<LI>The ResourceView is discussed in the "Looking at Interface Elements"
section.
<P>
<LI>The ClassView is discussed in the "Looking at Your Code, Arranged by Class"
section.
<P>
<LI>The FileView is discussed in the "Looking at Your Code, Arranged by File"
section.
</UL>
<P>Developer Studio uses two different files to keep track of all the information
about your project. The <I>project workspace file</I>, with a .DSW extension, contains
the names of all the files in the project, what directories they are in, compiler
and linker options, and other information required by everyone who may work on the
project. There is also a <I>project file</I>, with a .DSP extension, for each project
within the workspace. <I>The workspace options file</I>, with an .OPT extension,
contains all your personal settings for Developer Studio--colors, fonts, toolbars,
which files are open and how their MDI windows are sized and located, breakpoints
from your most recent debugging session, and so on. If someone else is going to work
on your project, you give that person a copy of the project workspace file and project
file but not the project options file.</P>
<P>To open the project, open the project workspace file. The other files are opened
automatically.</P>
<P>
<H2><A NAME="Heading3"></A>Looking at Interface Elements</H2>
<P>After you've opened or created a workspace, clicking the ResourceView tab in the
Workspace window opens an expandable and collapsible outline of the visual elements
of your program: accelerators, dialog boxes, icons, menus, the string table, toolbars,
and version information. These resources define the way users interact with your
program. Chapter 2, "Dialogs and Controls;" Chapter 8, "Building a
Complete Application: ShowString;" and Chapter 9, "Status Bars and Toolbars"
cover the work involved in creating and editing these resources. The next few sections
cover the way in which you can look at completed resources.</P>
<BLOCKQUOTE>
<P>
<HR>
<strong>TIP:</strong> Open one of the projects that was built in this book, or a sample
project from Visual C++, and follow along as functions are described in this section.
ShowString, the sample application from Chapter 8, is a good choice because it uses
most of the features described in this section.
<HR>
</BLOCKQUOTE>
<H3><A NAME="Heading4"></A>Accelerators</H3>
<P><I>Accelerators</I> associate key combinations with menu items. Figure C.3 shows
an accelerator resource created by AppWizard. All these accelerator combinations
are made for you when you create a new application. You can add accelerators for
specific menu items, if necessary.</P>
<P><A HREF="javascript:popUp('xcuvc03.gif')"><B>FIG. C.3</B></A><B> </B><I>Accelerators
associate key combinations with menu items.</I></P>
<H3><I></I></H3>
<H3><A NAME="Heading5"></A>Dialog Boxes</H3>
<P>Your application receives information from users through <I>dialog boxes</I>.
When a dialog resource is being displayed in the main working area, as in Figure
C.4, a control palette floats over the working area. (If it's not displayed, right-click
the menu bar and check Controls to display it.) Each small icon on the palette represents
a control (edit box, list box, button, and so on) that can be inserted onto your
dialog box. By choosing View, Properties, the Dialog Properties box shown in Figure
C.4 is displayed. Here the behavior of a control or of the whole dialog box can be
controlled.</P>
<BLOCKQUOTE>
<P>
<HR>
<strong>TIP:</strong> Click the pushpin at the top left of the Properties box to keep it
displayed, even when a different item is highlighted. The box displays the properties
of each item you click.
<HR>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -