[fpc-pascal] Type-casting a class variable

Adriaan van Os adriaan at adriaan.biz
Thu May 2 09:30:58 CEST 2024


Olivier Sannier via fpc-pascal wrote:
> 
> Hello,
> 
> You should cast to TWindowClass as TWindow is used to cast an instance, 
> not a class reference.
> 
> Note that you may not have TWindowClass, in which case you need to 
> declare it like this:
> 
> type
>     TWindowClass = class of TWindow;

OK. A typecast with TWindowClass works.

Thanks,

Adriaan van Os



More information about the fpc-pascal mailing list