Kitchen Pages, KitCAD i3 KGC rX - SDK source - Index
This, mainc.cpp requires:- main.pas
modified DCEF 1.0; C++ Builder example
Before calling WINAPI; link to the main.pas header, as follows - in bold red font;-
USEFORMNS("main.pas", Main, MainForm);
USEFORM("mainc.cpp", SplashForm);
//---------------------------------------------------------------------------
WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
{
...
DCEF 1.0 mainc.h
//---------------------------------------------------------------------------
#ifndef maincH
#define maincH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <"cefvcl.hpp">
#include <ActnList.hpp>
#include <Buttons.hpp>
#include <ComCtrls.hpp>
#include <Dialogs.hpp>
#include <ExtCtrls.hpp>
#include <Menus.hpp>
//---------------------------------------------------------------------------
class TSplashForm : public TForm
{
__published: // IDE-managed Components
void __fastcall FormCreate(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TSplashForm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TSplashForm *SplashForm;
//---------------------------------------------------------------------------
#endif
modified DCEF 1.0; mainc.cpp
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "mainc.h"
USEFORMNS("main.pas", Main, MainForm);
//---------------------------------------------------------------------------
#pragma package(smart_init)
//#pragma link "main"
#pragma link "cefvcl"
#pragma resource "*.dfm"
TSplashForm *SplashForm;
//---------------------------------------------------------------------------
__fastcall TSplashForm::TSplashForm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TSplashForm::FormCreate(TObject *Sender)
{
Application->CreateForm(__classid(TMainForm), &MainForm);
}
//---------------------------------------------------------------------------
Copyright 2015-2016, all rights reserved. License.