renaming project file ??

C

Chris

Hi,

I create a new VC++ project, then want to rename the default filename Form1
(used for .h, .cpp, .resx) to something else.

If I rename it from within Windows explorer the project becomes all messed
up.

So, how do I rename the files properly ?

thnx
Chris
 
T

Tarek Madkour [MSFT]

I create a new VC++ project, then want to rename the default
filename Form1 (used for .h, .cpp, .resx) to something else.

If I rename it from within Windows explorer the project becomes
all messed up.

So, how do I rename the files properly ?

First, you'll need to rename the files in the project. You can
either, rename the files from the command-line then go to the
solution explorer and make the project point to the new renamed
files. Or (easier), just rename the files from solution explorer
(which both renames the file on disk and makes the project point
to the new file name).

Second, you'll need to make resgen.exe use the correct name for
the .resources file. The correct name is
"namespace.formclassname.resources". You'll need to update the
input name property on the .resx file to reflect the correct name.
The reason you need to do this step is that, by default, the input
to resgen is set to use the "filename.resources" but now that the
filename is not the same as the class name, you need to make it
point to the class name.

Hope this helps.

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top