Board index » cppbuilder » Using a VCL component outside a form ...

Using a VCL component outside a form ...

Hello
I use a TNMHTTP component on a form, it works fine

But now I want to use it inside a class. This component is
no more dropped on a form.
Declaration works fine :
TNMHTTP *NMHTTP1 = new TNMHTTP(0);

But I don't know how to trap the event messages ....

Thans for help
Adam

 

Re:Using a VCL component outside a form ...


How to set event handlers at runtime:
http://www.bcbdev.com/faqs/faq1.htm
I notice that in BCB3, all of the Help for TNMHTTP is really Delphi
help.  If you want to see the CPB code for the events, pretend you're
going to use a "dropped on form" component and double-click on the
events in the Object Inspector to see the C++ code.  After copying the
function declarations, delete the visual component.
--
Timothy H. Buchman
========================================
City Center Theater
New York NY
tbuchmanPLEASE(at sign)REMOVEcitycenter.org
Please treat this signature information as confidential.
========================================
Search .borland newsgroup archives at:
http://www.mers.com/searchsite.html

Quote
Adam Billot <Abil...@yahoo.com> wrote in message

news:3a59de9a_2@dnews...
Quote
> Hello
> I use a TNMHTTP component on a form, it works fine

> But now I want to use it inside a class. This component is
> no more dropped on a form.

Re:Using a VCL component outside a form ...


"Timothy H. Buchman" <tbuch...@citycenter.org> wrote:

The article here basically illustrates how to work with closures at runtime. In fact, one thing I've done from time to time is to assign NULL to a closure (e.g. when I'm updating the control and don't want the closure to fire) then reassign the original handler when I'm done updating the control.

Quote
>How to set event handlers at runtime:
>http://www.bcbdev.com/faqs/faq1.htm
>I notice that in BCB3, all of the Help for TNMHTTP is really Delphi
>help.  If you want to see the CPB code for the events, pretend you're
>going to use a "dropped on form" component and double-click on the
>events in the Object Inspector to see the C++ code.  After copying the
>function declarations, delete the visual component.
>--
>Timothy H. Buchman
>========================================
>City Center Theater
>New York NY
>tbuchmanPLEASE(at sign)REMOVEcitycenter.org
>Please treat this signature information as confidential.
>========================================
>Search .borland newsgroup archives at:
>http://www.mers.com/searchsite.html

>Adam Billot <Abil...@yahoo.com> wrote in message
>news:3a59de9a_2@dnews...
>> Hello
>> I use a TNMHTTP component on a form, it works fine

>> But now I want to use it inside a class. This component is
>> no more dropped on a form.

Other Threads