Re: Disable TListBox Redraw...



On Thu, 28 Jul 2005 09:57:20 +0200, "Maarten Wiltink"
<maarten@xxxxxxxxxxxxxxxxxx> wrote:

>"J French" <erewhon@xxxxxxxxxx> wrote in message
>news:42e88120.1260414@xxxxxxxxxxxxxxxxxxxxxxx
>[...]
>> ListBox1.Perform( WM_SETREDRAW, Integer(False), 0 );
>[...]
>> ListBox1.Perform( WM_SETREDRAW, Integer(True), 0 );
>[...]
>> I'm not too happy about the typecasting of True and False

>Would using Ord or casting to LongBool make you feel better?

I think Ord would be misleading

Also I tried typecasting to LongBool, but it would not compile
- just checked it again D4 Pro
- [Error] Unit1.pas(34): Incompatible types: 'Integer' and 'LongBool'

Integer(LongBool(False)) works, but that is a bit clutzy

Ord works Ok - but ... it is not 'blindingly obvious' to me

Realistically I would probably declare Constants
- although looking at the ASM it looks as if Delphi knows what is
going on
- I tried typecasting 'real' Boolean variables and it just picks up
the byte and inserts it into a pre-cleared register

Thanks - I feel more comfortable now


.



Relevant Pages

  • Re: Disable TListBox Redraw...
    ... > I'm not too happy about the typecasting of True and False ... Would using Ord or casting to LongBool make you feel better? ...
    (alt.comp.lang.borland-delphi)
  • Re: Difference between typecasting and casting
    ... What is difference between typecasting and casting? ... A cast is an explicit conversion, so casting is the act of performing an ... Typecasting, on the other hand, is what happens to an actor when they're ...
    (comp.lang.c)
  • Re: Difference between typecasting and casting
    ... What is difference between typecasting and casting? ... A cast is an explicit conversion, so casting is the act of performing an ... Typecasting, on the other hand, is what happens to an actor when they're ...
    (comp.lang.c)
  • Re: Difference between typecasting and casting
    ... What is difference between typecasting and casting? ... I think, in C atleast, the more precise term is cast. ... are probably better called as implicit conversions. ...
    (comp.lang.c)
  • Re: Difference between typecasting and casting
    ... Nishu wrote: ... What is difference between typecasting and casting? ... An unofficial term is a typecast. ...
    (comp.lang.c)