Donald Herman
Donald Herman

Reputation: 464

Close editing of rc resource files in Visual Studios

I'm new to rc files and I'm used to being able to close files in VS and be prompted to save or not save. This way I can quickly undo changes I've made to the file. How do I get similar functionality for rc files? Thanks.

Upvotes: 0

Views: 962

Answers (2)

Serge Roussak
Serge Roussak

Reputation: 1807

I found one tricky workaround to do what you asked for without solution reloading.

  1. Ctrl+Shift+F to open find dialog.
  2. In the "Find what" field, type any text which should preset in the resource-file (for example, ID of some control).
  3. Along with other files, records corresponding to your resource-file should be appeared in search results.
  4. Double-click on any of this records. If the resource-file was opened (exactly as a resource file) at this stage, VS will inform you about this and ask you what to do: to close other editor or to leave all as it's. The first option is our goal.

Upvotes: 0

paddy
paddy

Reputation: 63481

You can't! This is just one of the many infuriating things about both RC files and VS.

The only easy way I have found is to close the solution, discard the changes, and open the solution again.

I've got into the habit of editing resource files in a text editor most of the time. That saves a lot of pain. I also use Git, so it's often quite easy to revert any unstaged changes or cherry-pick those that I want to keep. The bonus is when I modify the resource this way, VS will detect it and prompt me to reload the file, discarding any changes.

Upvotes: 3

Related Questions