Click here to Skip to main content
14,978,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a strange problem with WinXPSP3, VS2008Pro, MFC C++.

All of a sudden i seem to have lost the green check marks and indicators on the selected radio buttons and check boxes in an existing application which has been running fine for some time until i decided to move some items around a little to make it easier to enter data. The program when compiled will loose the green colors on selected radio buttons and check boxes. They now appear gray instead. But if i remain in the VS2008 IDE and click Ctrl+T to popup the test dialog, and I can select radio buttons and check boxes - and it shows up green.

So I tried to find out where I fouled up and did the following:
1. Create a new project with same name in another location
2. Create the same dialog items on this new app (short of rewriting the event handlers...)
3. Compile the app (it does nothing except allow me to select/unselect buttons as a check)
4. running it works fine - selected radio buttons are highlighted green,and so are check boxes.
5. Now, exit program and compare the .vcproj .sln .rc .rc2 files with the broken app and there are the same (ignoring the slight differences in the positioning of controls) - i found nothing missing. There are both same except for the guid. Strange!
6. Save a copy of this new project.
7. Now i copied all source files including the .vcproj and resource.h and .rc files from broken app to the new app and recompile
8. The new compile also looses the colors.
9. Now if i copy back the the .vcproj .h .rc files back to the new project and recompile
10. Again the green selected radio button and check boxes colors are gone
11. New project is also fouled up..

Has anyone encountered such a problem?
Niklas L 1-Jul-10 6:52am
This sounds like a manifest problem. Does your controls look old-style?
Hans Dietrich 5-Jul-10 18:10pm
Are you compiling for MBCS or UNICODE? If you are compiling for MBCS, there is code in stdafx.h (#ifdef _UNICODE) that will prevent the manifest from being activated. Just comment out that line and its #endif.

1 solution

Thanks Hans. I found the same "answer" over the weekend. You are absolutely correct.

I think this is a bug in the wizard generator that puts the #ifdef _UNICODE. It should not be there at all. Removing it allows me to compile in MBCS, UNICODE and "not set"


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900