Forum > Other

Delphi7, and BCB6 TSplitter - set parent window

(1/1)

paule32:
Hello,
I hope the question request is not wrong there, but I can not find a right Forum anymore as BORLAND goes down.
In C++ Builder 6 (32-Bit), I created a Package, that includes a TFrame.
This TFrame, I can use/place into Delphi7 (32-Bit, too) Application without problems.
Except TSplitter's.
When I add TSplitter into the TFrame (C++), and Compile the Delphi RunTime, I get Exception Message, that the
Splitter1 has no parent window.
So the question is:
How can I fix this problem ?

Here are some Code snippet artefacts:

C++ Builder:


--- Code: C  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---//---------------------------------------------------------------------------#pragma package(smart_init)#pragma resource "*.dfm"TBCB6_Frame *BCB6_Frame; static int pos_left;static int pos_width;static int pos_height;static int pos_top; static TBCB6_Frame *my_parent = NULL;//---------------------------------------------------------------------------__fastcall TBCB6_Frame::TBCB6_Frame(TComponent* Owner)        : TFrame(Owner){  Width  = pos_width;  Height = pos_height;  Top    = pos_top;  Left   = pos_left;   Panel1   ->Parent = this;  Panel2   ->Parent = Panel1; }//---------------------------------------------------------------------------extern "C"__declspec(dllexport) TCustomFrameClass__stdcall getMyCppFrameClass(TScrollBox *hwndParent, int X, int Y, int W, int H){  pos_width  = W;  pos_height = H;  pos_left   = X;  pos_top    = Y;   BCB6_Frame = new TBCB6_Frame(hwndParent);  BCB6_Frame->Parent = hwndParent;  BCB6_Frame->Align  = alClient;   my_parent = BCB6_Frame;   return __classid(TBCB6_Frame);}

Delphi7:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---type  TFrameClassFunc =  function(scr: TScrollBox; x,y,w,h:Integer): TCustomFrameClass; stdcall; var  CppModule: HMODULE = 0;  FrameClassFunc : TFrameClassFunc;  FFrame: TCustomFrame;   // debug  if CppModule = 0 then  begin    CppModule := LoadPackage('dbgFrame.bpl');    if CppModule < 1 then    begin      ShowMessage('can''t load: dbgFrame.bpl');      exit;    end;  end;   FrameClassFunc := TFrameClassFunc(  GetProcAddress(CppModule, 'getMyCppFrameClass'));   if not Assigned(FrameClassFunc) then  raise Exception.Create(  'can not find export symbol:  ' +  'getMyCppFrameClass() in:'      + #13#10 +  'dbgFrame.bpl');   FFrame := FrameClassFunc(    ScrollBox29, 0,0,    ScrollBox29.Width  + 200 ,    ScrollBox29.Height + 200).CreateParented(Form2.Handle);  FFrame.Parent := ScrollBox29; 
Für Alle Hinweise dankend:
paule32

MarkMLl:
Sorry, not our problem.

This forum exists to support the FPC compiler and the Lazarus IDE, and its only interest in Borland products is in retaining compatibility in certain modes.

MarkMLl

p.s. It particularly doesn't exist to support C++, and while we might, out of interest, suggest that you recompile your Delphi code using Lazarus/FPC we can't recommend any compatible C++-based environment.

Navigation

[0] Message Index

Go to full version