Welcome to MSDN Blogs Sign in | Join | Help

Bugs fixed in MFC in Visual Studio 2008 SP1

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

 

Published Tuesday, August 12, 2008 4:16 PM by vcblog

Comments

# funny wallpaper » Bugs fixed in MFC in Visual Studio 2008 SP1

Tuesday, August 12, 2008 7:44 PM by DotNetKicks.com

# Bugs fixed in MFC in Visual Studio 2008 SP1

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Tuesday, August 12, 2008 11:07 PM by Kevin

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

THE SP1 eats my disk over 2.5G

Is there a way to retrieve some space ?

Wednesday, August 13, 2008 6:42 AM by Kim Gräsman

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

Hello,

> Alignment (packing) issues using the new

> MFC headers were fixed.

What were those issues, specifically? We've had our share of problems with inconsistent struct alignment, and the symptoms range from memory leaks to memory corruption.

We won't be able to install SP1, so do we need to use #pragma pack or similar as a workaround?

Thanks,

- Kim

Wednesday, August 13, 2008 12:57 PM by mario

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

It's possible to apply styles (CMFCVisualManager) to a CDialog?

thanks.

Wednesday, August 13, 2008 5:36 PM by john

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

Does the Visual Studio 2008 SP1 include C++ Feature Pack?

Wednesday, August 13, 2008 9:47 PM by GregM

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

"Here is a partial list of the issues that we addressed."

Where can we find the complete list?

Thursday, August 14, 2008 2:56 AM by samsa

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

First of all: great news and great update! Congratulations and MFC rulz...

Besides: why VS still use different GDIPlus.dll version as Office Team?

thanks...

Thursday, August 14, 2008 4:24 AM by yuguang.hu

# the Microsoft.VC90.CRT version in manifest

I found version in the \VC\redist\x86\Microsoft.VC90.CRT\Microsoft.VC90.CRT.manifest is 9.0.30729.1, but I created a new project and build, the release.exe's manifest version still 9.0.21022.8.

Why?

Thursday, August 14, 2008 11:12 AM by Ted.

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

yuguang.hu - read this blog entry

http://blogs.msdn.com/vcblog/archive/2008/05/15/vc-runtime-binding.aspx

the real solution for you is (which I'm happy to say actually works in SP1) is to:

#define _BIND_TO_CURRENT_VCLIBS_VERSION 1

near the top of your stdafx.h

Thursday, August 14, 2008 11:16 AM by Ted.

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

Kim: the packing issues referred to related to feature pack headers only, if you don't use the default alignment in your project.  The workaround is to use

#pragma pack(push, _AFX_PACKING)

and

#pragma pack(pop)

around any place you include feature pack header files (e.g. afxcontrolbars.h), see

http://forums.msdn.microsoft.com/en-US/vcgeneral/thread/ba52a728-a9e3-4d8f-b327-21716332ce29/

for more info

Thursday, August 14, 2008 10:13 PM by yuguang.hu

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

Ted:

very thanks, I just test it, it really works.

Thursday, August 14, 2008 11:45 PM by yuguang.hu

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

I just read the http://blogs.msdn.com/vcblog/archive/2008/05/15/vc-runtime-binding.aspx and know more about this issue.

But I still think it's a bug.

Someone copy exe&dll&Microsoft.VC90.CRT to destination folder, in vs2k8 RTM, it works well, but in vs2k8 sp1, it would broken. If he copy the RTM's Microsoft.VC90.CRT, it will work. But, the old Microsoft.VC90.CRT has been overwritten!

So the poor guy must change all his project and add the #define _BIND_TO_CURRENT_VCLIBS_VERSION 1, it's really horrible.

Another scenario, a newbie install vs2k8 with sp1, he create a project with app wizard, he build, and copy the binary with folder Microsoft.VC90.CRT to a clean machine, he will very surprise it doesn't work!

Friday, August 15, 2008 10:30 AM by Ted.

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

Yes, agreed Hu I think that at least the applocal situation should be emphasized in documentation, it's not obvious to a new users they have to use _BIND_TO_CURRENT_VCLIBS_VERSION if they want to use applocal.

Also you're right they don't leave the RTM versions of the applocal folders in the redist directories, in case you want to use them.  So you have to manually "re-create" them by digging around in WinSxS or hope you have a backup from before installing SP1.

I don't consider these bugs, but almost all users will encounter this issue trying to use applocal.  

by the way the old way (use SP1 versions by default) used to work in VC2005, you had to use _USE_RTM_VERSION to get it back to RTM.  I think a lot of users will be surprised, if not confused by the new situation in 2008 SP1 (since many more people will be using 2008 SP1 than the 2008 feature pack. Consider the feature pack a "beta" test of this new approach :))

Friday, August 15, 2008 2:49 PM by SvenC

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

Hi Ted, Hi Hu,

I think the new default in VS2008 SP1 to make RTM binding default makes sense for many software companies as you can continue developing exe and dll modules with the new SP1 on your developer machine without the need to redistribute the SP1 crt/mfc to all your customer machines. So patching a current release is kept simple.

To make this easier to use/find it would be nice to have a switch in the project settings dialog for RTM/SP1 - or a combobox for RTM/SP1/SP2... who knows ;-)

--

SvenC

Saturday, August 16, 2008 4:18 PM by FilaK

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

Really good work :)

I'm now porting some of my applications where I use combination of new MFC and OpenGL. Only problem is custom buttons for toolbars. In MSDN is mentioned the AFX_WM_RESETTOOLBAR, but I really can't figure out how to consume this message. I need some example code.

I can't find download link with samples for new MFC library.

Thanks.

Sunday, August 17, 2008 12:13 AM by Mo

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

I've installed SP1 to my VisualStudio 2008 RTM.

Where can I find MFC Feature Pack samples?

This file doesn't get updated by SP1 C:\Program Files (x86)\Microsoft Visual Studio 9.0\Samples\1033\AllVCLanguageSamples.zip

The Help, Samples and MSDN still link to 2008 RTM samples dated 11/30/2007.

Monday, August 18, 2008 1:49 PM by Patrick

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

I allready filled a connect bug (ID 362127) for the samples.

Is there an easy way to get the samples? i don´t want to reinstall the sp1 but i did not find a single download of the samples.

Monday, August 18, 2008 2:02 PM by samsa

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

Wednesday, August 20, 2008 12:51 AM by Rollo Tomasi

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

the installer requires a lot of space

the installer could be configurable, so we can select specific languages (C#, VC++, etc)

Question: Does this change the symbol files?

Wednesday, August 20, 2008 8:12 AM by chris

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

found a nasty bug: CMFCMenuBar::EnableHelpCombobox only works with SDI, MDI will disable the control

is there any way to enable the control manually? i tried to get the control and enable it via enablewindow(TRUE) but still no luck

Wednesday, August 20, 2008 8:24 AM by MFC

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

Not sure where to report bugs in the new MFC, but here's one in case someone is listening:

If docking is enabled on a frame before the status bar is created, it becomes possible to dock things underneath the status bar.  When this happens, the resize gripper on the status bar no longer resizes the frame.  It only resizes the client area of the status bar, which gets very glitchy.  It is easily reproduced using the SetPaneSize sample.  In OnCreate, move the call to EnableDocking above the creation of the status bar.

Cheers

Wednesday, August 20, 2008 1:01 PM by chris

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

InsertButton applied on CMFCMenuBar and CMFCToolbar will result in disabled controls in MDI mode too...

Thursday, August 21, 2008 9:50 AM by Werner

# Visual Studio 2008 [SP1] and Vista SP1

I have a bug problem with VS2008 and Vista SP1:

Changing the source while the unmanaged/MFC application is interrupted crash and werfault.exe is creating a minidump.

It impossible to work reasonable.

I posted it on connect.microsoft.com in may 2008, but it was closed (not reproducable). I still have the problem on all Vista SP1 installations (even english ones!) and found today others with the same problem.

Can you say anything about this issue ? In May I sent a minidump with heap, today I debugged VS2008 on my own and found interessing hints.

Wednesday, August 27, 2008 1:05 AM by Eric

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

I have installed VS2008 and SP1. But I still can't find any documentation about the prereleased feature pack.

This article (http://blogs.msdn.com/vcblog/archive/2008/04/07/visual-c-2008-feature-pack-released.aspx) said "The documentation for this feature pack has already been added  to MSDN online and will be included with the local MSDN documentation with SP1."

Is it the problem of SP1 or my installation of SP1?

Wednesday, August 27, 2008 1:15 AM by Eric

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

I mean I cannot find MFC feature pack documenation on my local machine. When I press F1 for the help of MFC feature pack class, MSDN still downloads help from Microsoft MSDN website.

Wednesday, August 27, 2008 1:16 AM by Eric

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

I mean I cannot find MFC feature pack documenation on my local machine. When I press F1 for the help of MFC feature pack class, MSDN still downloads help from Microsoft MSDN website.

Wednesday, August 27, 2008 2:18 AM by samsa

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

@Eric

You need to install MSDN Library for Visual Studio 2008 SP1: http://www.microsoft.com/downloads/details.aspx?FamilyID=7bbe5eda-5062-4ebb-83c7-d3c5ff92a373&DisplayLang=en

Greetz...

Wednesday, August 27, 2008 2:28 AM by SvenC

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

@eric:

In addition to samsa, you must set tools->options->help->online to local first or only. Otherwise online content will be prefered.

--

SvenC

Wednesday, August 27, 2008 2:49 AM by Marc

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

(maybe twice...?)

I'v been trying to download the MSDN Library for VS2008 SP1 for a few days now. But after several moments I'm only getting a file of about 3kB in size instead of the full download of approx 2.15GB!

Does anyone has the same problem or can someone at Microsoft please fix this problem? (I am able to download other huge files like MSDN Library VS2008 non-SP1).

Marc

Wednesday, September 24, 2008 10:34 AM by kamol

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

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".

Wednesday, October 08, 2008 12:33 PM by Tim

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

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?

Thanks

Wednesday, October 08, 2008 5:12 PM by Shane Macaulay

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

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 ;)

Thursday, October 09, 2008 9:16 AM by Tim

# re: Bugs fixed in MFC in Visual Studio 2008 SP1

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)

New Comments to this post are disabled
 
Page view tracker