In Visual Studio 2005 / 2008 you can enable Code Analysis of your Unmanaged C++ project. The Code Analysis gives useful information of what part of your code does not meet the quality criteria. However, the Code Analysis also performs analysis of all system header files, which are used in the project. As it’s least likely that system header files will be modified by developers, this behavior is undesirable. For instance, Code Analysis will display a lot of messages compiling WTL header files.
Read the rest of this entry

The process of migration of source code to Team Foundation Server from Visual Source Safe databases is described in details here.

However, this Manual contains some discrepancies and I would like to mention here some of them and also to give some recommendations.
Read the rest of this entry

There is no difference in project files (.vcproj) except the version number, you can easily open projects created with VS2005 in VS.NET 2003 by modyfing the version number of the project using the text editor.

Unfortunately, solution files (.sln) in VS2005 and VS.NET 2003 have different formats and there is no utilities available to convert solution files from VS2005 to VS.NET 2003 format. So you must create a new solution in VS.NET 2003 and then add converted projects.

Read the rest of this entry

STL containers like vector or list are harder to debug in the VS.NET 2003, because the VS.NET 2003 Debugger has no direct support for STL containers in the Watch window.
Instead you have to work with the members of the corresponding container types.

Here is a couple of tricks on how you can view the content of STL vectors and lists.
Read the rest of this entry

If you ever programmed networking applications then you should know that it is impossible to control the timeout for blocking sockets on calling connect() function. This timeout is controlled by the operating system and may last up to 45 seconds when you want to connect to a non-existing host. Since blocking sockets are very attractive due to their simplicity in usage comparing to non-blocking (asynchronous) sockets, such a limitation disappoints many developers. You can change the value of timeout globally for the system, but I would like to warn you to avoid making any changes of the operating systems, as these changes will affect ALL networking applications running on your computer. In most cases, such a behavior is not desired.

In order to solve this problem you can use the following trick.
Read the rest of this entry

An MFC application generated using the Project Wizard of the VS2005 by default uses a Unicode character set for the project. If you are using __argv to access the command line arguments this might cause an application crash.

The following code illustrates the problem:
Read the rest of this entry

Problem description

When two objects of the MainMenu class having menu items with the MergeType=MergeItems and with the identical MergeOrder are merged using the MergeMenu method, the Popup event handler of the target menu item is getting lost.

The following example illustrates the problem.
Read the rest of this entry

Mercedes-Benz Museum

Recently, I have visited the new Mercedes-Benz Museum in Stuttgart. I was really impressed. Looks like the whole history of the automobile has passed before my eyes. Unfortunately, I hadn’t too much time to see everything in the museum. Nevertheless, here is a short photo report.

Useful WordPress plugins

This site is powered by WordPress – a great blogging engine. Indeed, it takes you five minutes to set it up and create your own site. WordPress has a flexible architecture. You can easily extend the functionality of your site by using thousands of plugins. While creating my site I needed some special features, so I spent some time to find and to select the best plugins. I think this can save you a lot of time too.

Here is a list of plugins I use.

Read the rest of this entry

My Brainbench achievements

Recently, I have found an old page with my Brainbench achievements. For those who don’t know what Brainbench is, it is a place where you can measure your knowledge and skills in different areas online. When Brainbench was free, it was interesting to check yourself.

It was like a game, and like in any game you want to get the highest score. So here is my transcript.

Read the rest of this entry