Question

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.

Était-ce utile?

La 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.

Autres conseils

C++Builder does not have any native functionality that wraps resource dialogs in classes. You have to set that up manually in your own code if you need it. Otherwise, just use Win32 API functions like CreateDialog() when working with resource dialogs, or else redesign your UI to make use of VCL TForm windows instead of resource dialogs.

TTaskDialog is not what you think it is. It is just a wrapper for the Win32 API TaskDialogIndirect() function (Vista and later only), which is not related to what you are attempting to accomplish.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top