Página 1 de 1
Custom Component
Publicado: Jue Mar 12, 2009 10:55 pm
por Nick Hilder
Hi Jose
I have created a little custom component called TThermometer.
Well not quite created, I have the basic bit working, ie I can drop it on a
form.
I'm want to create something similar to one of these
http://www.dncc.co.za/images/thermomitor.jpg
I have added basic properties etc, and it all works in the editor nicely.
The project is here
www.capsol.com.au/thermometer.zip
Problem is of course, I have no idea how to draw a circle and a box and fill
it.
Is this a hard thing to do, am I biting off more than I can chew maybe?
I was hoping you could maybe show me how to draw it roughly and then I can
tweak it. Obvoisly the group would then see all this as well and learn a
bit.
It's for a community project I'm working on.
Cheers
Nick
Custom Component
Publicado: Vie Mar 13, 2009 1:33 pm
por ignacio
Nick,
Take a look at TPlanning sample under samplescontrols. BTW you will surely
need some 'C' knowledge to do the job.
Regards,
--
Ignacio Ortiz de Zúñiga
Xailer support / Soporte de Xailer
http://www.xailer.com
http://www.xailer.info
"Nick Hilder" <nick_n0_spam_atcapsol.com.au> escribió en el mensaje
news:[email=49b984cf@svctag-j7w3v3j....]49b984cf@svctag-j7w3v3j....[/email]
> Hi Jose
>
> I have created a little custom component called TThermometer.
>
> Well not quite created, I have the basic bit working, ie I can drop it on
> a
> form.
>
> I'm want to create something similar to one of these
>
>
http://www.dncc.co.za/images/thermomitor.jpg
>
> I have added basic properties etc, and it all works in the editor nicely.
>
> The project is here
>
www.capsol.com.au/thermometer.zip
>
>
> Problem is of course, I have no idea how to draw a circle and a box and
> fill
> it.
>
> Is this a hard thing to do, am I biting off more than I can chew maybe?
>
> I was hoping you could maybe show me how to draw it roughly and then I can
> tweak it. Obvoisly the group would then see all this as well and learn a
> bit.
>
> It's for a community project I'm working on.
>
> Cheers
>
> Nick
>
>
>
>
>
>
Custom Component
Publicado: Vie Mar 13, 2009 1:33 pm
por ignacio
Nick,
Take a look at TPlanning sample under samplescontrols. BTW you will surely
need some 'C' knowledge to do the job.
Regards,
--
Ignacio Ortiz de Zúñiga
Xailer support / Soporte de Xailer
http://www.xailer.com
http://www.xailer.info
"Nick Hilder" <nick_n0_spam_atcapsol.com.au> escribió en el mensaje
news:[email=49b984cf@svctag-j7w3v3j....]49b984cf@svctag-j7w3v3j....[/email]
> Hi Jose
>
> I have created a little custom component called TThermometer.
>
> Well not quite created, I have the basic bit working, ie I can drop it on
> a
> form.
>
> I'm want to create something similar to one of these
>
>
http://www.dncc.co.za/images/thermomitor.jpg
>
> I have added basic properties etc, and it all works in the editor nicely.
>
> The project is here
>
www.capsol.com.au/thermometer.zip
>
>
> Problem is of course, I have no idea how to draw a circle and a box and
> fill
> it.
>
> Is this a hard thing to do, am I biting off more than I can chew maybe?
>
> I was hoping you could maybe show me how to draw it roughly and then I can
> tweak it. Obvoisly the group would then see all this as well and learn a
> bit.
>
> It's for a community project I'm working on.
>
> Cheers
>
> Nick
>
>
>
>
>
>
Custom Component
Publicado: Vie Mar 13, 2009 10:08 pm
por notengo
Nick,
these days I am very busy but once I get some spare time I'll help you to
finish this control.
Regards,
José Lalín
Custom Component
Publicado: Vie Mar 13, 2009 10:08 pm
por notengo
Nick,
these days I am very busy but once I get some spare time I'll help you to
finish this control.
Regards,
José Lalín
Custom Component
Publicado: Vie Mar 13, 2009 10:44 pm
por Capsol Coder
Hi Ignacio
I copied the TPlanning to create my project.
Basically I got stuck at Paint()

I will have to pull down my mate Charles Petzel off the shelf and see if I
can work out how to draw a circle....
Thanks
Nick
"Ignacio Ortiz de Zúñiga" <
NoNameToAvoidSpam@xailer.com> wrote in message
news:49ba5298$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Nick,
>
> Take a look at TPlanning sample under samplescontrols. BTW you will
> surely need some 'C' knowledge to do the job.
>
> Regards,
>
> --
> Ignacio Ortiz de Zúñiga
> Xailer support / Soporte de Xailer
>
http://www.xailer.com
>
http://www.xailer.info
> "Nick Hilder" <nick_n0_spam_atcapsol.com.au> escribió en el mensaje
> news:[email=49b984cf@svctag-j7w3v3j....]49b984cf@svctag-j7w3v3j....[/email]
>> Hi Jose
>>
>> I have created a little custom component called TThermometer.
>>
>> Well not quite created, I have the basic bit working, ie I can drop it
>> on a
>> form.
>>
>> I'm want to create something similar to one of these
>>
>>
http://www.dncc.co.za/images/thermomitor.jpg
>>
>> I have added basic properties etc, and it all works in the editor nicely.
>>
>> The project is here
>>
www.capsol.com.au/thermometer.zip
>>
>>
>> Problem is of course, I have no idea how to draw a circle and a box and
>> fill
>> it.
>>
>> Is this a hard thing to do, am I biting off more than I can chew maybe?
>>
>> I was hoping you could maybe show me how to draw it roughly and then I
>> can
>> tweak it. Obvoisly the group would then see all this as well and learn a
>> bit.
>>
>> It's for a community project I'm working on.
>>
>> Cheers
>>
>> Nick
>>
>>
>>
>>
>>
>>
>
>
Custom Component
Publicado: Vie Mar 13, 2009 10:44 pm
por Capsol Coder
Hi Ignacio
I copied the TPlanning to create my project.
Basically I got stuck at Paint()

I will have to pull down my mate Charles Petzel off the shelf and see if I
can work out how to draw a circle....
Thanks
Nick
"Ignacio Ortiz de Zúñiga" <
NoNameToAvoidSpam@xailer.com> wrote in message
news:49ba5298$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Nick,
>
> Take a look at TPlanning sample under samplescontrols. BTW you will
> surely need some 'C' knowledge to do the job.
>
> Regards,
>
> --
> Ignacio Ortiz de Zúñiga
> Xailer support / Soporte de Xailer
>
http://www.xailer.com
>
http://www.xailer.info
> "Nick Hilder" <nick_n0_spam_atcapsol.com.au> escribió en el mensaje
> news:[email=49b984cf@svctag-j7w3v3j....]49b984cf@svctag-j7w3v3j....[/email]
>> Hi Jose
>>
>> I have created a little custom component called TThermometer.
>>
>> Well not quite created, I have the basic bit working, ie I can drop it
>> on a
>> form.
>>
>> I'm want to create something similar to one of these
>>
>>
http://www.dncc.co.za/images/thermomitor.jpg
>>
>> I have added basic properties etc, and it all works in the editor nicely.
>>
>> The project is here
>>
www.capsol.com.au/thermometer.zip
>>
>>
>> Problem is of course, I have no idea how to draw a circle and a box and
>> fill
>> it.
>>
>> Is this a hard thing to do, am I biting off more than I can chew maybe?
>>
>> I was hoping you could maybe show me how to draw it roughly and then I
>> can
>> tweak it. Obvoisly the group would then see all this as well and learn a
>> bit.
>>
>> It's for a community project I'm working on.
>>
>> Cheers
>>
>> Nick
>>
>>
>>
>>
>>
>>
>
>
Custom Component
Publicado: Vie Mar 13, 2009 11:06 pm
por notengo
Nick,
you can add this to your project:
#include <windows.h>
#include <xailer. h>
HB_FUNC( ELLIPSE ) // hDC, nLeft, nTop, nRight, nBottom
{
hb_retl( Ellipse( (HDC) hb_parnl( 1 ), hb_parnl( 2 ),
hb_parnl( 3 ), hb_parnl( 4 ), hb_parnl( 5 ) );
}
And use it this way:
oPen := ...
oBrush := CreateSolidBrush( ... )
SelectObject( hdc, oBrush:Handle )
Ellipse( hdc, ... )
oBrush:Destroy()
Regards,
José Lalín
Custom Component
Publicado: Vie Mar 13, 2009 11:06 pm
por notengo
Nick,
you can add this to your project:
#include <windows.h>
#include <xailer. h>
HB_FUNC( ELLIPSE ) // hDC, nLeft, nTop, nRight, nBottom
{
hb_retl( Ellipse( (HDC) hb_parnl( 1 ), hb_parnl( 2 ),
hb_parnl( 3 ), hb_parnl( 4 ), hb_parnl( 5 ) );
}
And use it this way:
oPen := ...
oBrush := CreateSolidBrush( ... )
SelectObject( hdc, oBrush:Handle )
Ellipse( hdc, ... )
oBrush:Destroy()
Regards,
José Lalín