Solved

ISAPI DLL's and (yes) VCL objects

Posted on 1998-10-21
5
305 Views
Last Modified: 2010-04-06
Is it possible to create a VCL object, like a TChart, from within an ISAPI DLL, giving it a 'parent' and calling it's methods to save to a graphic file (of course so I can stream the chart, as a jpeg eventually, back to the happy browser)???  Seems we would just need a valid parent for the TChart, and that's the hitch.  I.e., can another object be the parent (nil don't work), perhaps some non-visual TForm derivative??  Need an approach here, or even an unrelated solution method.

Thanks, experts.  This would be very cool, indeed!
0
Comment
Question by:daviscon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 

Author Comment

by:daviscon
ID: 1343827
Ground-breaking?  No, just a nice way to do web-based database with graphs...
0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1343828
Any container VCL object (such as a TForm, TPanel, TGroupBox etc) can be the parent of a TChart component.

You could certainly create a hidden form and use this as the parent of the TChart component.

eg:
var
  MyForm : TForm;
  MyChart : TChart;
.
  MyForm := Application.CreateForm(TForm, MyForm);
  MyChart := TChart.Create(MyForm);
  MyChart.Parent := MyForm;
// And away you go...

Cheers,

Raymond.

0
 

Author Comment

by:daviscon
ID: 1343829
Tapplication.Createform is not possible since this is a TWebModule and not a TApplication as the defines are different.  Your code in an ISAPI WebModule causes this error"

[Error] SPDB.pas(89): Incompatible types: 'TForm' and 'procedure, untyped pointer or untyped parameter'

which indicates that the ISAPIApp and HTTPApp sources for a TWebModule do not support this.  I agree that it should be doable, but I don't want to incurr the overhead of including (even if it works, which I'm not sure it would) TApplication just to declare a container object.  Maybe what's needed is a container that is 'lighter'...

Thanks for your response.  I'll try anything that's suggested with appreciation.

Ed
0
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 100 total points
ID: 1343830
Hmm..., try it this way: (modifying my original)

eg:
       var
         MyForm : TForm;
         MyChart : TChart;
       .
         MyForm := TForm.Create(Nil);
         MyChart := TChart.Create(MyForm);
         MyChart.Parent := MyForm;

        // And away you go...

Does this improve things?

Raymond.
0
 

Author Comment

by:daviscon
ID: 1343831
Nice work!  I had failed in my earlier attempts at identical code to add the line assigning Parent to the chart, thinking Owner would be all that was needed!

Thanks again for a fast and effective response!

Ed
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month10 days, 13 hours left to enroll

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question