I still get the error message: C:\Program Files (x86)\Microsoft SDK's\Windoes\v7.0 A\include\prsht.h(0)error RC2247 : SYMBOL name too long.
The .rc files now looks like this:
// Generated by ResEdit 1.5.11
// Copyright (C) 2006-2012
I guess that commctrl.h is including that long symbol. Put in the #define directly, then.
Thanks, OK, I've now added the following and I don't get any errors when compiling or double clicking on the .rc file.
#define WC_STATIC "Static"
#define UPDOWN_CLASS "Static"
#define PROGRESS_CLASS "Static"
#define WC_TABCONTROL "Static"
#define TRACKBAR_CLASS "Static"
But I don't see the resources window - maybe it's just turned off.Which one is it?In View|Other Windows|Resource View is greyed out.
If you are using VS2010, make sure that VS2010 SP1 is installed or else you won't be able to bring up the resource editor in a Fortran project.
Thanks, I have now got SP1 installed and the Resource View is visible.It contains three entries: 'Grade' (the name of my project) and 'Miscellaneous Files' twice. Beside them is a rectangle with a line and small circle on the left. I cannot click on them or do anything with them. I think they may be left over from failed attempts to display them.Any suggestions?
What happens if you double-click on the .rc in Solution Explorer?
I took your grade.rc and resource.h files, edited the grade.rc as you showed, created dummy bmp and ico files, and was able to open the grade.rc in the resource editor by double-clicking on it. You should see something like this:
If I double click on Grade.rc, I get the message "The document ......grade.rc is already open - do you wish to close it" - I reply Yes (I have always been getting this message). Now nothing happens.When I go to View|Other Windows|Resource View is greyed out - I don't know why, it was available before.I'm using Visual Studio withVB2010 and Visual Fortran - I don't if that is causing the problem.
Does your VS install also include VC++? It needs to.
Try removing the .rc file from the project and re-adding it.
I've tried removing it and re-adding it - it makes no difference.
I have VC++ installed. I created a small VC++ project the Resource View is available and it looks like your screen grab on a previous post. But with Visual Fortran, Resource View is greyed out. I'm sure it was available yesterday after installing SP1.Resource View is also available with VB2010.
I am not sure what to suggest at this point. Maybe uninstall and reinstall Fortran. You might try, as an experiment, creating a new project, adding all the files to it, and see what happens.
When I create a new Visual Fortran project and click on the .rc file on the Solution Explorer in the .rc tab on the main window thefile is displayed as a directory structure and I can view the dialogs (as your diagram from a previous post).
On my projectwhen I click on the .rc file I get the message that the file is already open do I want to close it etc. But in the .rc tab on the main window the file is displayed as a text file.
As you suggested, I copied my .rc file (and the ico files) into the new project and it is displayed correctly.
Therefore your suggestion on creating a new project and importing the files looks the way forward. How can I be sure that I copy the project settingsso that the project will run correctly? Or is there a solution to the fact that the /rc file is being displayed as text.
Ah, that I think I can answer. Try this.
Uninstall Fortran.Delete the registry key HKEY_CLASSES_ROOT\.rcDo a "repair" on Visual StudioReinstall Fortran.
This should fix up the .rc issue.
As for the project settings, you could "diff" the old and new .vfproj files, or look at the Command Line property page for the compiler and linker. but you will have to compare these for each configuration.
Steve,I tried unistall/install but that made no difference.Therefore I created a new project and added all the files to it, changed some of the project settings and it compiles and the resources are displayed correctly.The problem now is that when I run my program nographics is displayed on the screen.The program is a CAD application (like AutoCAD).I have no idea why there is no graphics, it is going through the routines,maybe something is missing from some project settings. Do you have any ideas?
Did you create the project as the correct type (Windowing, QuickWin, etc.)?
Windowing with MDI (maybe it should have been SDI) as there is only one main form.
I don't know that makes much difference as it's just the sample code that is filled in - the project is otherwise the same. Are you willing/able to attach a ZIP of the project (after doing a Build > Clean)?
Steve,I have attached the project. I did a Build - not sure about Build Clean.I have cut down the project as much as I could in 1 hr.When the project runs it should draw some text and graphics on the screen then it will ask for a licence key.You should not have to go any further than that. I don't think the menu or tool bar buttons will work as I have removed most of the functionality.Hope you can see what the problem is, its been a long process. Thanks for your help.
The program works for me - I just ran the EXE that you had built. I get the window with text and graphics and the license window.
Steve,That was strange.I have found that it works on 64 bit machinesbut not 32 bit ones.
I have done some more investigation and went back to the original project where I couldn'tsee the dialogs and now they are available. I don't know why but I now have a verson that I can view the rc file and it displays the graphics.
There are some strange effects - if I go into properties is displays all the options, but if I go to the cut down project I sent to you it only displays some options - there is nothing below Fortran and the include directories are blank but the command line contains them.
I do wonder if there is a conflict with running Visual Fortran and Visual Basic on Visual Studio before Visual Studio 2010the two were seperate - but I have been using them both for the last few weeks.
Thanks for your patience and help. Hopefullyit will contunueworking.
That is odd. If you need further help, let us know.
I should have tested this before but I have just added a new contolto form and it said the rc file was not in the correct format and it would update it.It now gives many errors and the rc file is shown as a text file and my project won't compile.
"error RC2144 : PRIMARY LANGUAGE ID not a number"
"error RC2135 : file not found" for the icons
There are someother errors as well.
Looking at the rc file of a new project and my project I cannot see any problem with the language definition or icons (they do exist in the same directory as the rc file).
I could send the rc file if you want but you have previous ones.
Also when placing the control I could not see in the properties, the location values of the control, I sometimes use these to fine tune the placing of controls -are they there?
I need to talk to the VS integration developers about the resource editor issues. There are numerous things not working and I want to get them sorted out. It may take a few days. Please do attach the "updated" .rc so I can see what it is doing.
A not-so-random question - which other VS versions do you have installed? By any chance do you have the VS2012 beta installed?
I aso have VS2008 Shell installed. I have migrated to VS2100.
I have attached the rc file.
I have been going crazy trying to figure this out. I have not gotten anywhere and asked our VS integration developers for help. Our issue ID is DPD200235387. Here are some things I learned:
1. If I take your project to a second system that has just VS2010, I can open the .rc file without problems.2. On the same system where I do have problems, if I open the project in VS2012 (with our soon-to-be-released next compiler version), it works3. I find many complaints on the web from VC 2010 Express users of the same behavior4. If I add your .rc to a C++ project, I can edit it there5. Even though I can't edit it, I can still build the project - the resource compiler has no problems with it
For now, I suggest that if you want to edit the resources, create a C++ project with the .rc, .ico, etc. files and do it there. Then copy the changed files back (or even just add them from your original project, perhaps addint to the include path.)
If I learn any more about this, I will let you know here.
Steve,Thanks for all your help on this.Rather than use a C++ project to edit the .rc file, I will just continue to use resedit as I can edit the file in situ.If you do get a solution, would it be possible to email me.Thanks,David
I will let you know if I learn anything. This is a very strange problem...