Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
46 Views

Editing .rc does not update .h or .fd files

I suddenly have this issue in a QuickWin program. Adding for instance a button to a dialog and compiling does not find any record in the resource.h or resource.fd files and I have to manually add them. And the next time I open the .rc file it finds an error and I have to open it with a text editor. It then included a file "resource" without the .h. Adding the .h and saving allows it to be opened again.

Anyone has any idea what I can look at?

0 Kudos
8 Replies
Highlighted
Valued Contributor III
46 Views

The resource editor should update the .h file. How are you changing the rc file? 

0 Kudos
Highlighted
New Contributor I
46 Views

Using the default resource editor in Visual Studio Professional 2012, Update 5

0 Kudos
Highlighted
Valued Contributor III
46 Views

open the rc file in a text editor and check the .h files is not pathed to somewhere you are not looking, other than that is sounds broken!

You could try creating a new (empty) file in the resource editor and copy-pasting your resources into it to see if that behaves in a better way maybe?

 

 

0 Kudos
Highlighted
46 Views

It may be that your project is not set up to run deftofd. See the topic "Designing a Dialog Box Overview" in https://software.intel.com/en-us/compiler_winapp_f  Today, the direct link for the topic is https://software.intel.com/en-us/node/535386 but this may change in the future.

0 Kudos
Highlighted
New Contributor I
46 Views

Thanks Steve, I have got those pages as a link on my desktop.

When adding a resource with the resource editor in VS 2012 I have to save it and close it, then open it in an external editor that shows the hidden characters and fix the errors:

After this I have to open the resource and resource.h files and update the one using the other one.

Next, I have to update the resource.fd file after which I can compile the program and all works fine.

This does not happen in a number of other projects.

0 Kudos
Highlighted
46 Views

That's very strange - I have not seen other reports of this. So the VS resource editor is corrupting the .rc file? And it's only this one project? What happens if you recreate the project and edit the resource there?

0 Kudos
Highlighted
New Contributor I
46 Views

Steve Lionel (Intel) wrote:

 What happens if you recreate the project and edit the resource there?

I have been trying to avoid that - a few hundred files in different folders but will give a go. Andrew also suggested it.

0 Kudos
Highlighted
Valued Contributor III
46 Views

Why not just remove the rc h fd file from the project and put them somewhere else safe where the project can't see them and then create a new rc in the project. You can open the old rc file and copy past items eg whole dialogs from the old rc file so it will only take 5 minutes to test.out......

0 Kudos