Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

Help for c++

Post Reply
Lion85
Posts: 15
Joined: Tue Dec 06, 2022 9:19 am

Help for c++

Post 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!
Lion85
Posts: 15
Joined: Tue Dec 06, 2022 9:19 am

Re: Help for c++

Post 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
Last edited by Lion85 on Wed Dec 07, 2022 9:31 am, edited 1 time in total.
Post Reply