Page 1 of 1

Help for c++

Posted: Tue Dec 06, 2022 9:35 am
by Lion85
Hello friends,
Sorry, I hope I'm not off topic. (Sorry for my English) :cry:
I'm creating a project with RADSTUDIO XE7 and I need to be able to use chromium.
I compiled this project in pascal outputting the hpp files and the various libs.
I'm able to install the component but I'm stuck at the code equivalent:

Code: Select all

  GlobalCEFApp := TCefApplication.Create; 
I can't go on, I've been stuck for quite a while.
Can any of you tell me a possible solution?
Thanks a lot to everyone!

Re: Help for c++

Posted: Wed Dec 07, 2022 9:30 am
by Lion85
Hi friends, I'm an idiot.. the solution was very simple. :? {with a clear mind one thinks better :D }
I added (in project.cpp)

Code: Select all

#include "uCEFApplicationCore.hpp"
and the alternative to

Code: Select all

GlobalCEFApp := TCefApplication.Create; 
is

Code: Select all

GlobalCEFApp = new TCefApplicationCore();
in conclusione il risultato รจ:

Code: Select all

#include "uCEFApplicationCore.hpp"

//---------------------------------------------------------------------------
USEFORM("Unit1.cpp", Form1);
//---------------------------------------------------------------------------
int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
{

    GlobalCEFApp = new TCefApplicationCore();
    if(GlobalCEFApp->StartMainProcess())
    {
        try
        {

            Application->Initialize();
            Application->MainFormOnTaskBar = true;
            Application->CreateForm(__classid(TForm1), &Form1);
            Application->Run();
        }
        catch (Exception &exception)
        {
            Application->ShowException(&exception);
        }
        ecc..............
        
I hope this can help other people