Free Source Code and Program Tips
Posts tagged Visual Studio
CComModule in porting ATL DLL project to VC8
Jun 22nd
When migrating an ATL project from vc6 to vc8, you will get a problem about CComModule. Problem: In vc6, there is such a declaration in stdafx.h as: extern CComModule _Module; and in the main module: CComModule _Module; But when you complie it in vc8, the following errors apears: c:\temp\myatl\stdafx.h(24) : error C2146: syntax error :
How to enable “profile” in Visual C++ 6.0
Dec 28th
From MSDN: The profiler is an analysis tool that you can use to examine the run-time behavior of your programs. By using profiler information, you can determine which sections of your code are working efficiently. The profiler can produce information showing areas of code that are not being executed or that are taking a long
Make the Code Completion working again in VC++ 6.0
Dec 6th
Code Completion is a very useful feature of programiing, but it often strikes in VC++ 6.0. If you meet such matter, try the following step: 1. delete *.ncb, *.opt, *.plg and *.clw files from your project directory 2. rebuild your project. And you often need CTRL+W to generate the class wizard infmation again. But the above works
Some useful shortcut of Visual Studio 6
Nov 30th
Hide/Show white spaces: Ctrl+Shift+8 Column Selection Alt+Mouse SelectLine Ctrl+F8 LineCut Ctrl+L LineDelete Ctrl+Shift+L
Some comment about Visual SourceSafe
Nov 21st
Here is the short introduction of the great article of Alan De Smet . Please goto the author’s website for the fulltext and there are some upgrade of the article. The author introduced the shortcomings of SourceSafe and hoped to dissuade us from using SourceSafe, and have spared us the bad experiences he had.
Microsoft Visual C++ Tips
Nov 21st
Here are some tips of Microsoft Visual Studio 6.0. Display the LastError’s value When we want to get the LastError message, we often using the following code. LPVOID lpMsgBuf; FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language (LPTSTR) &lpMsgBuf, 0, NULL ); // Process any inserts in lpMsgBuf. // …