20
« on: November 19, 2023, 12:00:34 am »
The Dialog Editor opens RES files, but when you save the file after making any change to any dialog, it should both update the RES file and create a DLG file alongside it. (I just tested and confirmed that here.) It will not make any changes to an RC file, since those by convention contain non-dialog resources (which the Dialog Editor knows nothing about).
IMO this is a good thing, because the Dialog Editor is old and stupid and isn't capable of properly parsing or saving certain control properties or attributes. (In particular, it knows nothing about properties or styles which were added after around Warp 3.) Unfortunately, its solution to encountering stuff it doesn't know about is to silently replace or remove it when the resources are saved. In other words, you can end up with changes you didn't want, or (sadly all too often) actually corrupted and unusable resources.
Basically, using the Dialog Editor to create new dialogs is generally fine. You can also use it to modify dialogs if you're confident there's nothing in them that might cause the Dialog Editor confusion (which should be the case if you originally created them using Dialog Editor and didn't hand-modify them later).
In all other cases, you should not use the Dialog Editor to modify existing dialog resources in-place, especially if you didn't originally write them yourself. If you need to make changes visually, use the Dialog Editor but Save As instead of saving over the original file, then hand-copy the changes you need over to the original DLG file.
FWIW, the code you quoted is not in a valid RC format that I recognize (which uses BEGIN and END instead of {}), so perhaps it's specific to the Borland toolchain? Never used Borland so I can't speculate further.