Delphi 4 -> Delphi 5 [Error] Invalid typecast

[Error] Invalid typecast

I just updated Delphi 4 to Delphi 5 and one of the components
I have gave Error "Invalid typecast".

I am a beginner so maybe somebody can help me.

I noticed that the TOwnerDrawState was changed...

Delphi 4.0
type TOwnerDrawState = set of (odSelected, odGrayed, odDisabled,
     odChecked, odFocused);

Delphi 5.0
type TOwnerDrawState = set of (odSelected, odGrayed, odDisabled,
     odChecked, odFocused, odDefault, odComboBoxEdit);

Would this cause Error "Invalid typecast"?

How can I fix the procedure below?
The line where it says "<<- Error Here" is where I get the error and
won't compile.

procedure TColumnsListBox.CNDrawItem(var Message: TWMDrawItem);
var
  State: TOwnerDrawState;
begin
  with Message.DrawItemStruct^ do
  begin
    State := TOwnerDrawState(WordRec(LongRec(itemState).Lo).Lo);  <<- Error Here
    Canvas.Handle := hDC;
    Canvas.Font := Font;
    Canvas.Brush := Brush;
    if Integer(itemID) >= 0 then
      DrawItem(itemID, rcItem, State) else
      Canvas.FillRect(rcItem);
    Canvas.Handle := 0;
  end;
end;

Thank you,
Chris <no...@mcs.com>