- Open RegEdit
- On 32-bit Windows, go to:
On 64-bit Windows, go to:
At least for Visual Studio 2010, there are several default functions defined.
- Add a new String value. Name it CStringT.
- Edit the key and set the value to:
The colons must be backslashed as shown. CStringT is the template class used for CString, CStringA and CStringW. The CStringT class is shared with ATL, so that's why it's in the ATL namespace, even if you are using MFC. The "dot star" at the end matches anything for the rest of the line.
- Here are a couple of other examples:
Thursday, July 1, 2010
Debug "Just My Code" for C++ and MFC
One of my biggest annoyances with debugging MFC code is constantly stepping through CString functions and COM object functions. In Visual C++ 6 there was some functionality in autoexp.dat for handing this, but I never got it to work to my satifaction.
This week I was able to solve the problem. Here's how (note that the 10.0 is for Visual Studio 2010. The value will be 9.0 for VS2008. For earlier versions, see the link at the end of this article.)