Board index » cppbuilder » customizing TCustomUpDown

customizing TCustomUpDown


2005-10-27 12:44:37 AM
cppbuilder102
The standard TUpDown control in the VCL allows a range of -32k to +32k. I
need an UpDown control that goes from 0 to +64k. Can I do this if I start
from TCustomUpDown? Is that the best way to approach this?
Thanks in advance!
 
 

Re:customizing TCustomUpDown

"Myles Rippenhagen" < XXXX@XXXXX.COM >wrote in message
Quote
The standard TUpDown control in the VCL allows a range of -32k to +32k.
That is because TUpDown uses the older 16-bit versions of the relavant
messages. Newer versions of Windows implement 32-bit versions of the
messages, but TUpDown has not been updated to use them yet.
Quote
I need an UpDown control that goes from 0 to +64k. Can I
do this if I start from TCustomUpDown?
Yes, but it will take several steps to set up. TCustomUpDown() does not
provide virtual methods that you can override to change the existing
behavior, so you will have to preserve it while adding your own custom
functionality on top of it.
Have a look at the following discussion for details:
groups.google.com/group/borland.public.cppbuilder.vcl.components.using/browse_thread/thread/249bb33d825eb591/dd1fdefe57593416
Gambit
 

Re:customizing TCustomUpDown

I really only need 16 bits. I just need them as an un-signed 0 to 64k
rather than as a signed -32k to +32k.
Myles
"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote

"Myles Rippenhagen" < XXXX@XXXXX.COM >wrote in message
news:435fb1bd$ XXXX@XXXXX.COM ...

>The standard TUpDown control in the VCL allows a range of -32k to +32k.

That is because TUpDown uses the older 16-bit versions of the relavant
messages. Newer versions of Windows implement 32-bit versions of the
messages, but TUpDown has not been updated to use them yet.

>I need an UpDown control that goes from 0 to +64k. Can I
>do this if I start from TCustomUpDown?

Yes, but it will take several steps to set up. TCustomUpDown() does not
provide virtual methods that you can override to change the existing
behavior, so you will have to preserve it while adding your own custom
functionality on top of it.

Have a look at the following discussion for details:

groups.google.com/group/borland.public.cppbuilder.vcl.components.using/browse_thread/thread/249bb33d825eb591/dd1fdefe57593416


Gambit


 

{smallsort}

Re:customizing TCustomUpDown

"Myles Rippenhagen" < XXXX@XXXXX.COM >wrote in message
Quote
I really only need 16 bits. I just need them as an un-signed
0 to 64k rather than as a signed -32k to +32k.
The 16-bit messages that Up-Down controls use operate on signed 16-bit
values, not unsigned values. If you specify unsigned values outside of the
valid range, the values will be misinterpreted. You need to use the 32-bit
messages in order to use unsigned 16-bit values.
Gambit