Search code examples
dialogc++builderrcc++builder-xe2

Implementing dialogs from resource


I'm currently trying to port an application from owl to vcl.

In my old projekt-file I was able to load dialogs with something like

TBatchAcDialog(TWindow* parent) : TAPDialog(parent, BATCH_DIALOG)

However, using TTaskDialog instead it doesn't support the second argument.

I have found an explanation for the user interface designer that when rightclicking on a menu you can load the first declared menu from a rc-file.

However, I don't really know how to load those dialogs as dialogs in this IDE and linking them to my classes again.

Does anyone of you know about this or could link me to an article about a similar problem? I seem to have failed finding a proper solution although implementing rc-dialogs seems to be a common problem to me.


Solution

  • I'm currently trying to port an application from owl to vcl.

    What is your exact goal? To be able to build the application with C++ Builder, or to use VCL instead of OWL?

    If you want to use VCL for the dialogs, then you cannot port them, you need to rewrite all the UI from scratch, as VCL is very different from the standard Windows dialogs.

    If you want just to build the application with C++ Builder, then you can do so by upgrading to OWLNext - it is an open-source upgrade for the OWL framework and works with the modern compilers like C++ Builder and Visual C++. You can also use OWLNext for a gradual migration to VCL - as VCL and OWL can co-exist in the same application, so you can migrate your old OWL application to C++ Builder, write any new UI in VCL, and gradually rewrite the old UI in VCL - it might be easier and safer than rewriting the whole application with VCL.