Document conventions

Consistent text formatting helps users locate and interpret information easily. The following guidelines present some specific conventions for elements that are not part of the user interface. Use these document conventions both in procedures and in regular text. For the document conventions for user interface elements, see User interface formatting (Chapter 5).

When capitalization style is to follow that of the user interface, consider making an exception for labels in the interface that are all lowercase or all uppercase: Title capitalization is recommended in these instances.

Some elements may not appear here. Consult your project style sheet.

Element

Convention

Example

Attributes

Bold. Capitalization varies.

IfOutputPrecision

Book titles

Title capitalization. Italic.

See Visual Basic Custom Control Reference.

Chapter titles

Usually title capitalization. Enclose in quotation marks.

See Chapter 9, “Extending Forms.”

Classes (predefined)

Bold. Capitalization varies.

ios
filebuf
BitArray

Classes (user-defined)

Capitalization varies.

See also Code examples

BlueTimerControl

Code samples, including keywords and variables within text and as separate paragraphs, and user- defined program elements within text

Monospace.

See also Code examples

#include <iostream.h>
void main ()

Command-line commands and options (switches)

All lowercase. Bold.

copy command /a option

Constants

Usually bold. Capitalization varies. Treatment of constants may vary, so always refer to your project style sheet.

INT_MAX
dbDenyWrite
CS

Control classes

All uppercase.

EDIT control class

Data formats

All uppercase.

CF_DIB

Data structures and their members (predefined)

Bold. Capitalization varies.

BITMAP
bmbits
CREATESTRUCT
hInstance

Data types

Bold. Capitalization follows that of the application programming interface.

DWORD
float
HANDLE

Database names

Bold. Treatment of database names may vary, so always refer to your project style sheet.

WingtipToys database

Device names

All uppercase.

LPT1

COM1

Dialog box titles

Bold. Title capitalization.

Protect Document dialog box

Import/Export Setup dialog box

Directives

Bold.

#include
#define

Environment variables

All uppercase.

INCLUDE SESSION_SIGNON

Error message names

Sentence-style capitalization.

Access denied

Event names

Bold. Treatment of event names may vary, so always consult your project style sheet.

In the OnClick event procedure…

Fields (members of a class or structure)

Bold. Treatment may vary, so always consult your project style sheet.

IfHeight
biPlanes

File extensions

All lowercase.

.mdb

.doc

File names (user-defined examples)

Bold in procedures if the user must click or type the name as shown. Title capitalization. All right to use internal caps in file names for readability.

My Taxes for 2011

MyTaxesFor2011

Folder and directory names (user-defined examples)

Bold in procedures if the user is expected to click or type the name as shown. Title capitalization. All right to use internal caps in folder and directory names for readability.

Vacation and Sick Pay

MyFilesAccountingPayrollVacPay

Functions (predefined)

Usually bold. Capitalization varies. Treatment may vary, so always consult your project style sheet.

CompactDatabase
CWnd::CreateEx
FadePic

Game titles

Title capitalization. Italic.

Halo: Reach

Kinect Adventures!

Handles

All uppercase.

HWND

Key names, combinations, and sequences

Initial caps.

Ctrl, Tab

Ctrl+Alt+Del

Shift, F7

Alt, F, O

Spacebar

Keywords (language and operating system)

Bold. Capitalization follows that of the application programming interface.

main
True
AddNew

Logical operators

All uppercase. Bold.

AND

XOR

Macros

Usually all uppercase. Bold if predefined. May be monospace if user-defined. Treatment may vary, so always consult your project style sheet.

LOWORD
MASKROP

Markup language elements (tags)

Bold. Case varies.

<img>
<input type=text>
<message>

Mathematical constants and variables

Italic.

a2 + b2 = c2

Members

Bold. Capitalization varies.

ulNumCharsAllowed

Methods

Bold. Capitalization varies.

OpenForm
GetPrevious

New terms or emphasis

Italic on first mention of a new term, unless your project style sheet specifies otherwise. Use italic formatting for emphasis sparingly.

Note

Italic type does not always show up well online. If necessary to accommodate low-resolution monitors, enclose new terms in quotation marks.

Microsoft Exchange consists of both server and client components.

You must close the window before you exit.

Operators

Bold.

+, -

sizeof

Options (command-line)

Bold. Case exactly as it must be typed.

copy command

/a option

/Aw

Parameters

Italic. Capitalization varies.

hdc
grfFlag
ClientBinding

Placeholders (in syntax and in user input)

Italic.

/v: version Type password.

Programs, including utility and accessory programs

Usually title capitalization. Check the Microsoft trademark list for other styles of capitalization.

Microsoft Word

Notepad

Network Connections

Nmake

Properties

Usually bold. Capitalization varies. Treatment may vary, so always consult your project style sheet.

M_bClipped
AbsolutePosition
Message ID

Registers

All uppercase.

DS

Registry settings

Subtrees (first-level items) are all uppercase. Separated by underscores. Usually bold.

Registry keys (second-level items) follow the capitalization of the user interface.

Registry subkeys (below the second level) follow the capitalization of the user interface.

Treatment may vary, so always consult your project style sheet.

HKEY_CLASSES_ROOT

HKEY_LOCAL_MACHINE

SOFTWARE

ApplicationIdentifier

Microsoft

Song titles

All words capitalized (per industry standard).

You Are The Sunshine Of My Life Sittin’ On The Dock Of The Bay

Statements

Bold. Case varies.

IMPORTS
LIBRARY

Strings

Sentence-style capitalization. Enclosed in quotation marks.

“Now is the time”

Structures

Usually bold. Case varies.

ACCESSTIMEOUT

Switches

Usually lowercase. Bold.

build: commands

System commands

All uppercase.

SC_HOTLIST

URLs

All lowercase for fully specified URLs. If necessary, break long URLs before a forward slash. Do not hyphenate. See also URLs, addresses (Chapter 7).

http://www.microsoft.com/

seattle.sidewalk.com

/music/

//www.microsoft.com/

User input

Usually lowercase, unless case sensitive. Bold or italic, depending on element. If the user input string contains placeholder text, use italic for that text.

Type hello world

Type -p password

Utilities

Usually title capitalization.

Makefile

RC Program

Values

All uppercase.

DIB_PAL_COLORS

Variables

Treatment may vary, so always consult your project style sheet.

bEmpty
m_nParams
file_name

XML schema elements

Bold. Case varies.

ElementType element

Xml:space attribute

For more information, see Capitalization (Chapter 7); Command syntax; File names and extensions; Fonts (Chapter 3); HTML tag, element, and attribute formatting; Key names (Chapter 5); Ribbons, Menus, and toolbars (Chapter 5); User interface formatting (Chapter 5); XML tag, element, and attribute formatting.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.136.142