1.检测程序中的括号是否匹配 
  把光标移动到需要检测的括号(如大括号{}、方括号[]、圆括号()和尖括号<>)前面,键入快捷键“Ctrl+]”。如果括号匹配正确,光标就跳到匹配的括号处,否则光标不移动,并且机箱喇叭还会发出一声警告声。 
2.查看一个宏(或变量、函数)的宏定义 
  把光标移动到你想知道的一个宏上,就比如说最常见的DECLARE_MAP_MESSAGE上按一下F12(或右键菜单中的Go To Defition Of …),如果没有建立Browse files,会出现提示对话框,确定,然后就会跳到定义那些东西的地方。 
3.格式化一段乱七八糟的源代码 
  选中那段源代码,按ATL+F8。 
4.在编辑状态下发现成员变量或函数不能显示 
  删除该项目扩展名为.ncb文件,重新打开该项目。 
5.如何整理ClassView视图中大量的类 
  可以在classview 视图中右键新建文件夹(new folder),再把具有相近性质的类拖到对应的文件夹中,使整个视图看上去清晰明了. 
6.定位预处理指定 
在源文件中定位光标到对称的#if, #endif,使用Ctrl+K. 
7.如何添加系统中Lib到当前项目 
  在Project | Settings | Link | Object/library modules:输入Lib名称,不同的Lib之间用空格格开. 
8.如何添加系统中的头文件(.h)到当前项目. 
  #include <FileName.h>,告诉编译到VC系统目录去找;使用#include "FileName.h",告诉编译在当前目录找. 
9.如何在Studio使用汇编调试 
  在WorkBench的Debugger状态下按CTRL+F7. 
10.怎样处理ClassZiard找不到的系统消息 
  如果要在ClassWizard中处理WM_NCHITTEST等系统消息,请在ClassWizard中Class Info页中将Message filter改为Window就有了. 
11.如何干净的删除一个类 
  先从Workspace中的FileView中删除对应的.h和.cpp文件,再关闭项目,从实际的文件夹中删除对应的.h和.cpp文件与.clw文件。 
12.如果让控制台应用程序支持mfc类库 
  可以在控制台应用程序中include 来引入mfc库,但是控制台应用程序缺省是单线程的,mfc是多线程的,为解决该矛盾,在project setting->c/c++ 选项,选择code generation,在use run-time library 下拉框中选择debug multithread。 
13.如何汉化只有可执行代码的.exe 文件 
  在nt 下利用vc open file 以resources方式打开*.exe 文件,直接修改资源文件,然后保存即可 

解决方案 »

  1.   

    Ctrl+1  插入对话框资源;
        Ctrl+2  插入菜单资源;
        Ctrl+3  插入光标资源;
        Ctrl+4  插入图标资源;
        Ctrl+5  插入位图资源;
        Ctrl+6  插入工具栏资源;
        Ctrl+7  插入加速健表资源;
        Ctrl+8  打开字符串资源;
        Ctrl+9  打开版本资源。    Ctrl+b  设置断点对话框;
        Ctrl+d  编辑查找字符串;
        Ctrl+e  从当前"{"或"}"处跳到与其对应的"}"或"{"处;  
        Ctrl+i  渐近查找;
        Ctrl+j  从#endif跳到#ifdef;
        Ctrl+k  从#ifdef跳到#endif;
        Ctrl+l  删除光标所在行;
        Ctrl+m  同Tab;
      

  2.   

    Dialog ControlHeightDecrease Shift+Up Arrow Sizes the selected control or dialog up one dialog unit
    Dialog ControlHeightIncrease Shift+Down Arrow Moves the selected control or dialog down one dialog unit
    Dialog ControlMoveDown Down Arrow Moves the selected control(s) down one dialog unit
    Dialog ControlMoveLeft Left Arrow Moves the selected control(s) left one dialog unit
    Dialog ControlMoveRight Right Arrow Moves the selected control(s) right one dialog unit
    Dialog ControlMoveUp Up Arrow Moves the selected control(s) up one dialog unit
    Dialog ControlWidthDecrease Shift+Left Arrow Sizes the selected control or dialog left one dialog unit
    Dialog ControlWidthIncrease Shift+Right Arrow Sizes the selected control or dialog right one dialog unit
    Dialog LayoutAlignBottom Ctrl+Down Arrow Aligns the bottom edges of the selected controls with the dominant control
    Dialog LayoutAlignHorizontalCenter Shift+F9 Aligns the horizontal centers of the selected controls with the dominant control
    Dialog LayoutAlignLeft Ctrl+Left Arrow Aligns the left edges of the selected controls with the dominant control
    Dialog LayoutAlignRight Ctrl+Right Arrow Aligns the right edges of the selected controls with the dominant control
    Dialog LayoutAlignTop Ctrl+Up Arrow Aligns the top edges of the selected controls with the dominant control
    Dialog LayoutAlignVerticalCenter F9 Aligns the vertical centers of the selected controls with the dominant control
    Dialog LayoutArrangeButtonsBottom Ctrl+Shift+B Places the selected buttons along the bottom-center of the dialog box
    Dialog LayoutArrangeButtonsRight Ctrl+B Places the selected buttons in the top-right corner of the dialog box
    Dialog LayoutCenterInDialogHorizontally Ctrl+Shift+F9 Centers the controls horizontally within the dialog box
    Dialog LayoutCenterInDialogVertically Ctrl+F9 Centers the controls vertically within the dialog box
    Dialog LayoutSizeToContent Shift+F7 Resizes the selected control(s) to fit the caption text
    Dialog LayoutSpaceEvenlyAcross Alt+Right Arrow Evenly spaces the selected controls horizontally
    Dialog LayoutSpaceEvenlyAcross Alt+Left Arrow Evenly spaces the selected controls horizontally
    Dialog LayoutSpaceEvenlyDown Alt+Down Arrow Evenly spaces the selected controls vertically
    Dialog LayoutSpaceEvenlyDown Alt+Up Arrow Evenly spaces the selected controls vertically
    Dialog LayoutTabOrder Ctrl+D Sets the order of controls within the dialog
    Dialog ResourceTest Ctrl+T Runs the dialog box to test appearance and behavior
    Dialog SelectDialogGuideType Ctrl+G Cycles between no grid, guidelines, and grid for dialog editing
    Image ImageAirbrushTool A Draws using an airbrush with the selected size
    Image ImageBrushLarger = Increases the brush size by one pixel in each direction
    Image ImageBrushLarger + Increases the brush size by one pixel in each direction
    Image ImageBrushOutlineTool Shift+O Outlines the brush or selection with the current drawing color
    Image ImageBrushPixel . Sets the brush size to one pixel
    Image ImageBrushSmaller - Reduces the brush size by one pixel in each direction
    Image ImageBrushTool D Draws using a brush with the selected shape and size
    Image ImageColorNext ] Changes the drawing color to the next palette color
    Image ImageColorPrev [ Changes the drawing color to the previous palette color
    Image ImageColorSelectTool , Adopts a color from the image for drawing
    Image ImageEllipseTool E Draws an ellipse with the selected line width
    Image ImageEraseColorNext } Changes the erase color to the next palette color
    Image ImageEraseColorPrev { Changes the erase color to the previous palette color
    Image ImageEraseTool Shift+P Erases a portion of the image
    Image ImageFillTool F Fills an area with the current drawing color
    Image ImageFilledEllipseTool Shift+E Draws a filled ellipse
    Image ImageFilledRectangleTool Shift+R Draws a filled rectangle
    Image ImageFilledRoundRectTool Shift+N Draws a filled round rectangle
    Image ImageFlipHorizontal X Flips the image or selection horizontally
    Image ImageFlipVertical Y Flips the image or selection vertically
    Image ImageLineTool L Draws a straight line with the selected shape and size
    Image ImageMagnify M Changes to the highest magnification for the current view
    Image ImageMagnifyTool Shift+M Changes the magnification for the current view
    Image ImageNewDevice Ins Creates an image for a different display device
    Image ImageOutlinedEllipseTool Ctrl+Shift+E Draws a filled ellipse with an outline
    Image ImageOutlinedRectangleTool Ctrl+Shift+R Draws a filled rectangle with an outline
    Image ImageOutlinedRoundRectTool Ctrl+Shift+N Draws a filled round rectangle with an outline
    Image ImagePencilTool P Draws using a single-pixel pencil
    Image ImagePickupBrush Ctrl+B Creates a custom brush from the selection
    Image ImageRectSelectTool S Selects a rectangular portion of the image to move, copy, or edit
    Image ImageRectangleTool R Draws a rectangle with the selected line width
    Image ImageRotate90 Z Rotates the image or selection 90 degrees
    Image ImageRoundRectTool N Draws a round rectangle with the selected line width
    Image ImageTextTool T Draws text
    Image ImageToggleGrid G Toggles the grid on and off
    Image ImageToggleOpaque O Makes the current selection either opaque or transparent
    Image ImageToggleTileGrid Ctrl+G Toggles the tile grid on and off
    Image ImageZoomIn > Increases the magnification for the current view
    Image ImageZoomOut < Reduces the magnification of the current view
    Main ActivateCallStackWindow Alt+7 Activates the Call Stack window
    Main ActivateDisassemblyWindow Alt+8 Activates the Disassembly window
    Main ActivateMemoryWindow Alt+6 Activates the Memory window
    Main ActivateOutputWindow Alt+2 Activates the Output window
    Main ActivateRegistersWindow Alt+5 Activates the Registers window
    Main ActivateVariablesWindow Alt+4 Activates the Variables window
    Main ActivateWatchWindow Alt+3 Activates the Watch window
    Main ActivateWorkspaceWindow Alt+0 Activates the Workspace window
    Main ApplyCodeChanges Alt+F10 Applies code changes made to C/C++ source files while debugging
    Main Books Alt+F2 Edits or navigates books
    Main Browse Alt+F12 Queries on the selected object or current context
    Main BrowseGoToDefinition F12 Displays a symbol definition
    Main BrowseGoToReference Shift+F12 Displays a symbol reference
    Main BrowseNext Ctrl+Num + Displays the next symbol definition or reference
    Main BrowsePopContext Ctrl+Num * Returns to the location preceding the last browse operation
    Main BrowsePrev Ctrl+Num - Displays the previous symbol definition or reference
    Main Build F7 Builds the project
    Main BuildCompile Ctrl+F7 Compiles the file
    Main BuildExecute Ctrl+F5 Executes the program
    Main BuildStop Ctrl+Break Stops the build
    Main Cancel Esc Hides windows or cancels modes
    Main CheckMnemonicKeys Ctrl+M Detects duplicate mnemonics in the resource
    Main ClassWizard Ctrl+W Edits the application classes and ties resources to code
    Main CompleteWord Ctrl+Space Completes the current statement
    Main Copy Ctrl+C Copies the selection to the Clipboard
    Main Copy Ctrl+Ins Copies the selection to the Clipboard
    Main Cut Ctrl+X Cuts the selection and moves it to the Clipboard
    Main Cut Shift+Del Cuts the selection and moves it to the Clipboard
    Main DebugBreakpoints Alt+F9 Edits breakpoints in the program
    Main DebugBreakpoints Ctrl+B Edits breakpoints in the program
    Main DebugEnableBreakpoint Ctrl+F9 Enables or disables a breakpoint
    Main DebugGo F5 Starts or continues the program
    Main DebugMemoryNextFormat Alt+F11 Switches the memory window to the next display format
    Main DebugMemoryPrevFormat Alt+Shift+F11 Switches the memory window to the previous display format
    Main DebugQuickWatch Shift+F9 Performs immediate evaluation of variables and expressions
    Main DebugRemoveAllBreakpoints Ctrl+Shift+F9 Removes all breakpoints
    Main DebugRestart Ctrl+Shift+F5 Restarts the program
    Main DebugRunToCursor Ctrl+F10 Runs the program to the line containing the cursor
    Main DebugSetNextStatement Ctrl+Shift+F10 Sets the instruction pointer to the line containing the cursor
    Main DebugShowNextStatement Alt+Num * Displays the source line for the instruction pointer
    Main DebugStepInto F11 Steps into the next statement
    Main DebugStepOut Shift+F11 Steps out of the current function
    Main DebugStepOver F10 Steps over the next statement
    Main DebugStopDebugging Shift+F5 Stops debugging the program
    Main DebugToggleBreakpoint F9 Inserts or removes a breakpoint
    Main DebugToggleMixedMode Ctrl+F11 Switches between the source view and the disassembly view for this instruction
    Main Delete Del Deletes the selection
    Main FileGoTo Ctrl+Shift+G Opens a file based on the selected text
    Main FileOpen Ctrl+O Opens an existing document
    Main FilePrint Ctrl+P Prints all or part of the document
    Main FileSave Ctrl+S Saves the document
    Main Find Ctrl+F Finds the specified text
    Main Find Alt+F3 Finds the specified text
    Main FindNext F3 Finds the next occurrence of the specified text
    Main FindPrev Shift+F3 Finds the previous occurrence of the specified text
    Main FindReplace Ctrl+H Replaces the specified text with different text
    Main FindTool Ctrl+D Activates the Find tool
    Main GoTo Ctrl+G Moves to a specified location
    Main GoToNextErrorTag F4 Moves to the line containing the next error or tag
    Main GoToPrevErrorTag Shift+F4 Moves to the line containing the previous error or tag
    Main InsertAcceleratorTable Ctrl+7 Creates a new accelerator table resource
    Main InsertBitmap Ctrl+5 Creates a new bitmap resource
    Main InsertCursor Ctrl+3 Creates a new cursor resource
    Main InsertDialog Ctrl+1 Creates a new dialog box resource
    Main InsertIcon Ctrl+4 Creates a new icon resource
    Main InsertMenu Ctrl+2 Creates a new menu resource
    Main InsertResource Ctrl+R Creates a new resource of any type
    Main InsertStringTable Ctrl+8 Creates or opens the string table resource
    Main InsertToolbar Ctrl+6 Creates a toolbar resource
    Main InsertVersionInfo Ctrl+9 Creates or opens a version information resource
    Main ListMembers Ctrl+Alt+T Brings up the completion list box
    Main MacroPlayQuick Ctrl+Shift+P Plays the quick macro
    Main MacroRecordQuick Ctrl+Shift+R Start recording a temporary, throw-away macro
    Main New Ctrl+N Creates a new document, project or workspace
    Main ParameterInfo Ctrl+Shift+Space Provides help with parameters of functions
    Main Paste Shift+Ins Inserts the Clipboard contents at the insertion point
    Main Paste Ctrl+V Inserts the Clipboard contents at the insertion point
    Main ProjectSelectTool Ctrl+Alt+P Activates the Project selection tool
    Main ProjectSettings Alt+F7 Edits the project build and debug settings
    Main Properties Alt+Enter Edits the current selection's properties
    Main Redo Ctrl+Shift+Z Redoes the previously undone action
    Main Redo Ctrl+Y Redoes the previously undone action
    Main SelectAll Ctrl+A Selects the entire document
    Main TypeInfo Ctrl+T Provides the syntax for a variable, function or method selected in the editor
    Main Undo Ctrl+Z Undoes the last action
    Main Undo Alt+Backspace Undoes the last action
    Main WindowDockingView Alt+F6 Toggles the docking feature for the window on and off
    Main WindowHide Shift+Esc Hides the window
    Main WindowNextPane F6 Activates the next pane
    Main WindowPrevPane Shift+F6 Activates the previous pane
    Text BookClearAll Ctrl+Shift+F2 Clears all books in the window
    Text BookNext F2 Moves to the line containing the next book
    Text BookPrev Shift+F2 Moves to the line containing the previous book
    Text BookToggle Ctrl+F2 Toggles a book for the current line on and off
    Text CharLeft Left Arrow Moves the cursor one character to the left
    Text CharLeftExtend Shift+Left Arrow Extends the selection one character to the left
    Text CharRight Right Arrow Moves the cursor one character to the right
    Text CharRightExtend Shift+Right Arrow Extends the selection one character to the right
    Text ConditionalDown Ctrl+K Finds the next matching preprocessor condition
    Text ConditionalDownExtend Ctrl+Shift+K Extends the selection to the next matching preprocessor condition
    Text ConditionalUp Ctrl+J Finds the previous matching preprocessor condition
    Text ConditionalUpExtend Ctrl+Shift+J Extends the selection to the previous matching preprocessor condition
    Text DeleteBack Backspace Deletes the selection or, if there is no selection, the character to the left of the cursor
    Text DeleteBack Shift+Backspace Deletes the selection or, if there is no selection, the character to the left of the cursor
    Text DocumentEnd Ctrl+End Moves to the end of the document
    Text DocumentEndExtend Ctrl+Shift+End Extends the selection to the end of the document
    Text DocumentStart Ctrl+Home Moves to the beginning of the file
    Text DocumentStartExtend Ctrl+Shift+Home Extends the selection to the beginning of the file
    Text EditToggleOvertype Ins Toggles between inserting and replacing text
    Text FindNextWord Ctrl+F3 Finds the next occurrence of the selected text
    Text FindPrevWord Ctrl+Shift+F3 Finds the previous occurrence of the selected text
    Text GoToMatchBrace Ctrl+E Finds the matching brace
    Text GoToMatchBrace Ctrl+] Finds the matching brace
    Text GoToMatchBraceExtend Ctrl+Shift+E Extends the selection to the matching brace
    Text GoToMatchBraceExtend Ctrl+Shift+] Extends the selection to the matching brace
    Text Home Home Moves to either the start of the current line or the start of the text on that line
    Text HomeExtend Shift+Home Extends the selection to either the start of the current line or the start of the text on that line
    Text LineCut Ctrl+L Deletes the selected lines and puts them on the Clipboard
    Text LineDelete Ctrl+Shift+L Deletes the selected line
    Text LineDown Down Arrow Moves the cursor down one line
    Text LineDownExtend Shift+Down Arrow Extends the selection down one line
    Text LineEnd End Moves to the end of the current line
    Text LineEndExtend Shift+End Extends the selection to the end of the current line
    Text LineTranspose Alt+Shift+T Swaps current and previous lines
    Text LineUp Up Arrow Moves the cursor up one line
    Text LineUpExtend Shift+Up Arrow Extends the selection up one line
    Text PageDown Page Down Moves the cursor down one page
    Text PageDownExtend Shift+Page Down Extends the selection down one page
    Text PageUp Page Up Moves the cursor up one page
    Text PageUpExtend Shift+Page Up Extends the selection up one page
    Text SearchIncremental Ctrl+I Starts an incremental search forward
    Text SearchIncrementalBack Ctrl+Shift+I Starts an incremental search backward
    Text SelectChar F8 Starts character selection mode
    Text SelectColumn Ctrl+Shift+F8 Selects a columnar block of text
    Text SelectLine Ctrl+F8 Selects lines of text
    Text SelectionFormat Alt+F8 Formats the selection using the smart indent settings
    Text SelectionLowercase Ctrl+U Makes the selection all lowercase
    Text SelectionUppercase Ctrl+Shift+U Makes the selection all uppercase
    Text SentenceCut Alt+Shift+L Deletes the remainder of the sentence
    Text ToggleViewWhitespace Ctrl+Shift+8 Shows or hides tab characters
    Text WindowScrollDown Ctrl+Up Arrow Scrolls the file contents down one line
    Text WindowScrollUp Ctrl+Down Arrow Scrolls the file contents up one line
    Text WordDeleteToEnd Ctrl+Del Deletes a word to the right
    Text WordDeleteToStart Ctrl+Backspace Deletes a word to the left
    Text WordLeft Ctrl+Left Arrow Moves back one word
    Text WordLeftExtend Ctrl+Shift+Left Arrow Extends the selection back one word
    Text WordRight Ctrl+Right Arrow Moves forward one word
    Text WordRightExtend Ctrl+Shift+Right Arrow Extends the selection forward one word
    Text WordTranspose Ctrl+Shift+T Swaps the current and previous words