; Microsoft Visual C++
; Tip of the Day
; Copyright© 1996-1997 Microsoft Corp. All rights reserved.
; Development Tools (TOOLS.TIP)
; -- Categories --
twl=Microsoft Developer Tools
txt=Editing and Navigating Text
wks=Using Workspaces and Projects
res=Using the Resource Editors
bld=Building Applications
dbg=Debugging
brw=Browsing
; -- Tips --
twl,You can open one of the last files or projects you worked on by choosing it from the Recent Files or Recent Workspaces list on the File menu.
dbg,The debugger windows support intelligent drag-and-drop where the result depends on the drop location. For example, you can add a variable to the Watch window by dragging it from the Variables window or view the memory contents by dragging a variable to the Memory window.
txt,You can press {BookmarkNext} and {BookmarkPrev} to go to the Next and Previous source-file bookmark.
dbg,If your program hangs while running outside the debugger, attach the debugger to your program by choosing Start Debug from the Build menu, and then choosing Attach to Process.
dbg,When debugging, you can press {ActivateMemoryWindow} to display the Memory window.
txt,You can repeat the last Find command in the source editor by pressing {FindNext}.
txt,The source editor can emulate BRIEF(TM) and Epsilon (TM). From the Tools menu, choose Options, then click Compatibility.
res,Holding down Shift as you draw constrains the shape of an object. For example, it constrains a rectangle to a square or an ellipse to a circle.
twl,You can move to the beginning of a line by pressing {Home}. You can move to the end of a line by pressing {LineEnd}.
dbg,You can press {DebugStopDebugging} to stop debugging.
dbg,You can press {DebugRestart} to restart debugging.
txt,Esc moves the focus back to a source or topic window from the Find box on the toolbar.
dbg,The pop-up menu often has debugger commands specific to that window.
twl,You can undo most actions by clicking the Undo button on the Standard toolbar.
txt,Before you can change text or graphics, you must first select the item you want to modify.
txt,You can press {GoToNextErrorTag} and {GoToPrevErrorTag} to move to the next and previous build error or Find-in-Files match.
dbg,When debugging, you can single-step into functions by pressing {DebugStepInto}.
res,You can press {InsertAcceleratorTable} to create a new accelerator-table resource.
txt,You can view an included header file by right-clicking on the #include line and then selecting the Open Document option from the pop-up menu.
dbg,You can change how variables and expressions are displayed in the Watch or QuickWatch window by using format specifiers such as ,us (Unicode string) and ,x (hexadecimal integer).
txt,When editing, you can go to the next and previous find by pressing {FindNext} and {FindPrev}.
txt,When editing, you can press {BrowseGoToDefinition} to go to the definition of the identifier at the cursor.
twl,You can hide all screen elements to see more of your code. From the View menu, choose Full Screen. To restore the screen, click the Full Screen button or press Esc.
txt,You can undo your last edit by pressing {Undo}. To undo more than one change, press the key again.
bld,You can speed up builds of most MFC applications by defining the VC_EXTRALEAN preprocessor symbol. Defining this symbol excludes rarely-used portions of the header files. For non-MFC applications, define WIN32_LEAN_AND_MEAN.
twl,We use it before you do! Visual C++ was developed using Visual C++.
txt,When editing, you can press {BrowseGoToReference} to go to the first reference of the identifier at the cursor.
twl,You can use macros to insert the filename, date, page number, and other information into a header or footer.
res,You can align controls by clicking the Snap-to-Grid button on the Layout toolbar and then selecting the Snap-to-Grid check box.
twl,You can repeat your last action by clicking the Redo button on the Standard toolbar.
txt,You can press {ConditionalDown} and {ConditionalUp} to find the next and previous matching or enclosing #if statement. Hold down Shift to select.
brw,When editing, you can press {BrowsePrev} to go to the previous definition.
twl,You can press {ActivateOutputWindow} to display the Output window.
dbg,You can press {DebugToggleBreakpoint} to toggle a breakpoint at the cursor. The shortcut works in the Call Stack, too!
dbg,In the Variables window and the Watch window, you can autosize a column to fit its contents by double-clicking on the divider.
bld,You can press {BuildRebuildAll} to rebuild all of your project files.
xt,When editing, you can press {BookmarkToggle} to toggle a bookmark at the cursor.
dbg,The Watch window has several panes, but only the visible pane is evaluated. This behavior means you can quickly change variables by placing assignment statements in a Watch pane and activating it when you want to change the variables. For example, in Watch 2 enter "debug=1" and in Watch 3 enter "debug=0".
res,You can press {InsertMenu} to create a new menu resource.
bld,You can use a number of macros described in <WINDOWS.H> to limit the amount of code your must compile when including the Windows header files.
txt,When editing, you can replace text by selecting it and then typing.
txt,You can press {Browse} to display the source-code browser.
res,You can press {InsertResource} to create a new resource.
dbg,When debugging, you can press {ActivateWatchWindow} to display the Watch window.
twl,In the U.S. or Canada, you can call the Microsoft Wish Line to make suggestions about features you would like to see in any Microsoft product or service. \n\nThe number for the Wish Line is (425) 936-WISH.
res,You can press {InsertDialog} to create a new dialog resource.
txt,When editing, you can press {SelectionFormat} to format the selection using the smart indent settings
txt,You can press {Find} to display the Find dialog.
dbg,When debugging, you can press {DebugRunToCursor} to run the program to the cursor. This shortcut works in the Call Stack, too!
bld,You can press {Build} to build the current target.
dbg, When debugging, you can set the instruction pointer to a different line of code. Click the next line to execute and then press {DebugSetNextStatement}.
res,As you draw in the Dialog Editor, you can temporarily override the Snap-to-Grid feature by holding down Alt. If Snap-to-Grid isn't on, holding down Alt activates it.
dbg,You can extract useful information from your program using LINK /DUMP <file>.EXE.
txt,When editing, you can press {GoTo} to move to a line in the file.
twl,When editing, you can go to the beginning of a file by pressing {DocumentStart}. You can go to the end of a file by pressing {DocumentEnd}.
twl,You can move or copy selected text or graphics by dragging and dropping. To copy the item, hold down Ctrl as you drag.
res,You can press {InsertIcon} to create a new icon resource.
res,You can press {InsertCursor} to create a new cursor resource.
txt,When editing, you can use the selection bar to select text. In the space to the left of text, click once to select a line. Ctrl+Click to select the entire contents of the window.
dbg,You can easily add variables to the Watch window by selecting them in your code and dragging them into the Watch window.
txt,The status bar at the bottom of the application frame shows the current line number, column number, editor mode, current time, and other information.
bld,You can press Ctrl+Break to stop a build in progress.
bld,Using dllimport and dllexport with __declspec() is an easy way to manage your DLL's imports and exports without having to use a. DEF file.
dbg,You should single-step new or changed code.
dbg,When debugging, you can press {DebugHexadecimalDisplay} to toggle the hexadecimal-display option.
dbg,When debugging, you can step over functions by pressing {DebugStepOver}.
dbg,When debugging, you can press {DebugQuickWatch} to open the QuickWatch window to evaluate an expression.
dbg,When debugging, you can press {ActivateWatchWindow} to display the Watch window.
brw,When browsing, you can press {BrowseNext} to go to the next definition.
txt,When editing, you can press {LineCut} to delete the current line.
res,Since the resource editor "snaps" borders to the controls in place, move the control in the upper left corner to the location before adjusting your borders. This technique avoids unnecessary repositioning of the grid lines.
txt,You can find a match for a parenthesis, square bracket, or angle bracket by placing the insertion point on it and pressing {GoToMatchBrace}.
twl,When editing, you can press {GoTo} to move to a line, address, or bookmark.
dbg,When debugging, you can press {ActivateDisassemblyWindow} to display the Disassembly window.
twl,You can select text by holding down Shift and then pressing an arrow key.
txt,You can navigate matching #if statements by pressing {ConditionalDown} or {ConditionalUp}.
txt,You can scroll through a file when using drag-and-drop editing. Drag the selected item beneath the horizontal ruler or above the horizontal scroll bar.
txt,Developer Studio displays the name of a toolbar button when you point to the button.
txt,You can assign a shortcut key to the WindowCycle command to cycle through the open source windows. To assign a shortcut key, choose the Keyboard command on the Tools|Customize dialog. The WindowCycle command is under the Window category.
dbg,When debugging, you can press {ActivateRegistersWindow} to display the Registers window.
txt,You can select a rectangular block of text by holding down Alt while you drag.
dbg,With Data Tips, you can place the mouse pointer on a variable when debugging and instantly see its value.
res,You can press {InsertBitmap} to create a new bitmap resource.
twl,Developer Studio has a wealth of cool features --more than can fit in the main menu. To see what's available, explore the toolbars, pop-up menus, window and item properties. Look at what's in the Customize and Options dialogs on the Tools menu, too.
brw,You can find the definitions and references for a symbol by using the browser commands in the pop-up menu.
txt,You can record commands and other actions and then play them back when you need to perform the same series of tasks. To begin recording, press {Macro}. To pause or resume the current macro recording session, press {MacroPauseRecording}. To end the current macro recording session, press {MacroStopRecording}.
txt,You can split the window into two panes and see two parts of a file simultaneously. Drag the split bar at the top of the scroll bar to split the window.
dbg,When debugging, you press {ActivateCallStackWindow} to display the Call Stack window.
txt, When editing, you can press {FindNextWord} to find the next occurrence of the selected text. {FindPrevWord} finds the previous occurrence.
bld,You can press {BuildCompile} to compile the current file.
twl,You can open a file by clicking the Open button on the Standard toolbar. To see the file in the list, you may need to select a different drive or directory or select All Files from the List Files Of Type box.
txt,Many source code control packages, such as SourceSafe, can be seamlessly integrated into Visual C++.
dbg,When debugging, you can press {DebugToggleBreakpoint} to set a breakpoint at the return address of a function in the Call Stack window. You can press {DebugRunToCursor} to execute to that frame.
dbg,When debugging, you can find the cause of an assertion by using the Call Stack window to view the calling function frames.
txt,When editing, you can press {GoToMatchBrace} to find the matching brace, parenthesis, or angle bracket.
brw,While browsing source code, you can press {BrowsePopContext} to 'pop' you back to your previous location.
