C++Builder 10.2 - IDE automatically changes USEFORM macros to incorrect value when adding a file to the project

114 Views Asked by At

I am updating a VCL forms application originally written in C++Builder 5 to be used in C++Builder 10.2. For the most part I have this worked out, however the IDE keeps automatically updating its syntax to an incorrect value. In the projects main .cpp, it has various USEFORM macros, such as USEFORM("Location.cpp", FrmLocation);, and a corresponding line in the WinMain to set it up of the form Application->CreateForm(__classid(TFrmSelect), &FrmSelect);.

When I add an unrelated static library file to the project, the IDE automatically updates the USEFORM macros to USEFORM("Location.cpp", frmLocation); with a lower case f at the start of the form name. This of course means that the line in main no longer parses and the macro no longer links up to the form as it has changed the name to an incorrect value.

A simple find and replace of "frm" -> "Frm" fixes the issue, however I will need to perform the same update on several other old programs and would like to avoid having to process this manually for every single one of them. I would also quite like to know why the IDE is doing this so I can avoid running into such issues in future.

0

There are 0 best solutions below