Bugs fixed in MFC in Visual Studio 2008 SP1

Bugs fixed in MFC in Visual Studio 2008 SP1

  • Comments 34

Hello, everyone.  This is Pat Brenner.  I’m an SDE on the Visual C++ Libraries team.

We’ve just released Visual Studio 2008 SP1, and it includes about 55 fixes to the MFC library.  Many of these fixes are for the new features that were added in the Feature Pack, but others were bugs in the RTM version of Visual Studio 2008 that we have fixed.  Here is a partial list of the issues that we addressed:

·         Some accessibility issues in toolbar and ribbon components were fixed.

·         Running MFC applications on Windows 2000 (with or without GDIPlus.dll) is supported.

·         Alignment (packing) issues using the new MFC headers were fixed.

·         All security-related issues that we found were fixed.

·         Some issues with display of international characters in ribbon edit controls were fixed.

·         Issues with wizard-generated code in various non-standard configurations were fixed.

·         A number of small issues in the rendering of the ribbon and toolbar were fixed.

·         Warnings in the MFC samples when compiling /analyze were eliminated.

I hope this has been helpful.  As always, if you find bugs in MFC or any of the Visual C++ libraries, please log a bug on Microsoft Connect and to let us know about it.  At least 10 of the MFC bugs fixed for the SP1 release were reported by customers like you!

Pat Brenner
Visual C++ Libraries Team


  • There are still some bugs left in toolbar rendering.

    One of them can be reproduced by turning to large icons and enabling Customize buttons on toolbars. The gluphs on the buttons are scaled up and the result looks really bad. The same happens with CMFCToolberMenuButton and its arrow.

    The cause is CMenuImages class which loads glyph images from resources in size 9x9 and scales them if larger images are required. It should use another set of images instead of scaling small ones.

    The worst thing is that it cannot be fixed without recompiling MFC, because there is no way to change this behavior "from outside".

  • I'm building an MFC DLL, using VS2008 SP1 but

    the compiler is ignoring my _BIND_TO_CURRENT_VCLIBS_VERSION=1 preprocessor directive (I've defined it in the project properties and checked that it's inherited by the cpp files). I've tried defining the _BIND_TO_CURRENT_MFC_VERSION=1 and _BIND_TO_CURRENT_CRT_VERSION=1 symbols, but that doesn't work either.

    As a result the embedded manifest references the old 9.0.21022.8 version of Microsoft.VC90.CRT instead of the new 9.0.30729.1 version, which breaks our Vista installation :(

    I heard there were some issues with MFC DLLs, but thought they were fixed with SP1. Does anyone have any suggestions or links that could help?


  • Did you use #pragma comment style manifest declaration's to specify dependencies, or did you build the XML yourself?

    I've found that the #pragma's work best in my build env.  Project properties were more difficult for me to manage and remember ;)

  • Thanks. My experience of using #pragmas has been that I just got both versions as dependencies in the embedded manifest.

    I think I have solved the problem by including the line:

    #pragma comment(linker, "/include:__forceCRTManifestCUR")

    at the top of my StdAfx.h. I don't know why the _BIND_TO_CURRENT_VCLIBS_VERSION flag wasn't working (like I said, I've heard that MFC DLLs are quirky), but this seems to do the trick! Hope this helps someone out there :o)

Page 3 of 3 (34 items) 123