dpr Files |
Top Previous Next |
Delphi projects > dpr Files
Delphi project files with the extension "dpr" are listing all files that are used in a project and contain the code, which starts the application. Normally such files only contains code, which is generated by the Delphi IDE:Though Delphi2Cpp converts such dpr files to C++ files, it is recommended not to use the converted file, but to let C++Builder create and maintain this file. What C++Builder exactly does isn't documented anywhere and it changes with different versions of C++Builder.
The default dpr file for a VCL forms application looks like:
program Project1;
uses Vcl.Forms, Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
begin Application.Initialize; Application.MainFormOnTaskbar := True; Application.CreateForm(TForm1, Form1); Application.Run; end.
The according file created by C++Builder XE10 Tokyo 2 looks like:
//---------------------------------------------------------------------------
#include <vcl.h> #pragma hdrstop #include <tchar.h> //--------------------------------------------------------------------------- USEFORM("Unit1.cpp", Form1); //--------------------------------------------------------------------------- int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int) { try { Application->Initialize(); Application->MainFormOnTaskBar = true; Application->CreateForm(__classid(TForm1), &Form1); Application->Run(); } catch (Exception &exception) { Application->ShowException(&exception); } catch (...) { try { throw Exception(""); } catch (Exception &exception) { Application->ShowException(&exception); } } return 0; } //---------------------------------------------------------------------------
|
This page belongs to the Delphi2Cpp Documentation |
Delphi2Cpp home Content |