home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / common / msdev98 / bin / ide / tools.tip < prev    next >
Text File  |  1998-04-24  |  12KB  |  110 lines

  1. ; Microsoft Visual C++
  2. ; Tip of the Day
  3. ; Copyright⌐ 1996-1997 Microsoft Corp. All rights reserved.
  4. ; Development Tools (TOOLS.TIP)
  5. ; -- Categories --
  6. twl=Microsoft Developer Tools
  7. txt=Editing and Navigating Text
  8. wks=Using Workspaces and Projects
  9. res=Using the Resource Editors
  10. bld=Building Applications
  11. dbg=Debugging
  12. brw=Browsing
  13. ; -- Tips --
  14. 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.
  15. 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.
  16. txt,You can press {BookmarkNext} and {BookmarkPrev} to go to the Next and Previous source-file bookmark.
  17. 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.
  18. dbg,When debugging, you can press {ActivateMemoryWindow} to display the Memory window.
  19. txt,You can repeat the last Find command in the source editor by pressing {FindNext}.
  20. txt,The source editor can emulate BRIEF(TM) and Epsilon (TM). From the Tools menu, choose Options, then click Compatibility.
  21. 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.
  22. 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}.
  23. dbg,You can press {DebugStopDebugging} to stop debugging.
  24. dbg,You can press {DebugRestart} to restart debugging.
  25. txt,Esc moves the focus back to a source or topic window from the Find box on the toolbar.
  26. dbg,The pop-up menu often has debugger commands specific to that window.
  27. twl,You can undo most actions by clicking the Undo button on the Standard toolbar.
  28. txt,Before you can change text or graphics, you must first select the item you want to modify.
  29. txt,You can press {GoToNextErrorTag} and {GoToPrevErrorTag} to move to the next and previous build error or Find-in-Files match.
  30. dbg,When debugging, you can single-step into functions by pressing {DebugStepInto}.
  31. res,You can press {InsertAcceleratorTable} to create a new accelerator-table resource.
  32. 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.
  33. 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).
  34. txt,When editing, you can go to the next and previous find by pressing {FindNext} and {FindPrev}.
  35. txt,When editing, you can press {BrowseGoToDefinition} to go to the definition of the identifier at the cursor.
  36. 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.
  37. txt,You can undo your last edit by pressing {Undo}. To undo more than one change, press the key again.
  38. 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.
  39. twl,We use it before you do! Visual C++ was developed using Visual C++.
  40. txt,When editing, you can press {BrowseGoToReference} to go to the first reference of the identifier at the cursor.
  41. twl,You can use macros to insert the filename, date, page number, and other information into a header or footer.
  42. 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.
  43. twl,You can repeat your last action by clicking the Redo button on the Standard toolbar.
  44. txt,You can press {ConditionalDown} and {ConditionalUp} to find the next and previous matching or enclosing #if statement. Hold down Shift to select.
  45. brw,When editing, you can press {BrowsePrev} to go to the previous definition.
  46. twl,You can press {ActivateOutputWindow} to display the Output window.
  47. dbg,You can press {DebugToggleBreakpoint} to toggle a breakpoint at the cursor. The shortcut works in the Call Stack, too!
  48. dbg,In the Variables window and the Watch window, you can autosize a column to fit its contents by double-clicking on the divider.
  49. bld,You can press {BuildRebuildAll} to rebuild all of your project files.
  50. xt,When editing, you can press {BookmarkToggle} to toggle a bookmark at the cursor.
  51. 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".
  52. res,You can press {InsertMenu} to create a new menu resource.
  53. 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.
  54. txt,When editing, you can replace text by selecting it and then typing.
  55. txt,You can press {Browse} to display the source-code browser.
  56. res,You can press {InsertResource} to create a new resource.
  57. dbg,When debugging, you can press {ActivateWatchWindow} to display the Watch window.
  58. 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.
  59. res,You can press {InsertDialog} to create a new dialog resource.
  60. txt,When editing, you can press {SelectionFormat} to format the selection using the smart indent settings
  61. txt,You can press {Find} to display the Find dialog.
  62. dbg,When debugging, you can press {DebugRunToCursor} to run the program to the cursor. This shortcut works in the Call Stack, too!
  63. bld,You can press {Build} to build the current target.
  64. 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}.
  65. 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.
  66. dbg,You can extract useful information from your program using LINK /DUMP <file>.EXE.
  67. txt,When editing, you can press {GoTo} to move to a line in the file.
  68. 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}.
  69. twl,You can move or copy selected text or graphics by dragging and dropping. To copy the item, hold down Ctrl as you drag.
  70. res,You can press {InsertIcon} to create a new icon resource.
  71. res,You can press {InsertCursor} to create a new cursor resource.
  72. 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.
  73. dbg,You can easily add variables to the Watch window by selecting them in your code and dragging them into the Watch window.
  74. 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.
  75. bld,You can press Ctrl+Break to stop a build in progress.
  76. 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.
  77. dbg,You should single-step new or changed code.
  78. dbg,When debugging, you can press {DebugHexadecimalDisplay} to toggle the hexadecimal-display option.
  79. dbg,When debugging, you can step over functions by pressing {DebugStepOver}.
  80. dbg,When debugging, you can press {DebugQuickWatch} to open the QuickWatch window to evaluate an expression.
  81. dbg,When debugging, you can press {ActivateWatchWindow} to display the Watch window.
  82. brw,When browsing, you can press {BrowseNext} to go to the next definition.
  83. txt,When editing, you can press {LineCut} to delete the current line.
  84. 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.
  85. txt,You can find a match for a parenthesis, square bracket, or angle bracket by placing the insertion point on it and pressing {GoToMatchBrace}.
  86. twl,When editing, you can press {GoTo} to move to a line, address, or bookmark.
  87. dbg,When debugging, you can press {ActivateDisassemblyWindow} to display the Disassembly window.
  88. twl,You can select text by holding down Shift and then pressing an arrow key.
  89. txt,You can navigate matching #if statements by pressing {ConditionalDown} or {ConditionalUp}.
  90. 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.
  91. txt,Developer Studio displays the name of a toolbar button when you point to the button.
  92. 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.
  93. dbg,When debugging, you can press {ActivateRegistersWindow} to display the Registers window.
  94. txt,You can select a rectangular block of text by holding down Alt while you drag.
  95. dbg,With Data Tips, you can place the mouse pointer on a variable when debugging and instantly see its value.
  96. res,You can press {InsertBitmap} to create a new bitmap resource.
  97. 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.
  98. brw,You can find the definitions and references for a symbol by using the browser commands in the pop-up menu.
  99. 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}.
  100. 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.
  101. dbg,When debugging, you press {ActivateCallStackWindow} to display the Call Stack window.
  102. txt, When editing, you can press {FindNextWord} to find the next occurrence of the selected text. {FindPrevWord} finds the previous occurrence.
  103. bld,You can press {BuildCompile} to compile the current file.
  104. 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.
  105. txt,Many source code control packages, such as SourceSafe, can be seamlessly integrated into Visual C++.
  106. 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.
  107. dbg,When debugging, you can find the cause of an assertion by using the Call Stack window to view the calling function frames.
  108. txt,When editing, you can press {GoToMatchBrace} to find the matching brace, parenthesis, or angle bracket.
  109. brw,While browsing source code, you can press {BrowsePopContext} to 'pop' you back to your previous location.
  110.