Вниз
Скачать: CL | DM;

Invalid typecast   Найти похожие ветки 

 
DUDAS ©   (2005-12-09 12:08) [0]

Помогите, пожалуйста...
При компиляции процедуры:

procedure TAutoCustomImageListBox.CNDrawItem(var Message: TWMDrawItem);
var
 State: TOwnerDrawState;
begin
 with Message.DrawItemStruct^ do
 begin
   State := TOwnerDrawState(WordRec(LongRec (itemState).Lo).Lo);
   Canvas.Handle := hDC;
   Canvas.Font := Font;
   Canvas.Brush := Brush;
   if (Integer(itemID) >= 0) and (odSelected in State) then
   begin
     Canvas.Brush.Color := clHighlight;
     Canvas.Font.Color := clHighlightText
   end;
   if Integer(itemID) >= 0 then
     DrawItem(itemID, rcItem, State) else
     Canvas.FillRect(rcItem);
   if odFocused in State then begin
     if(FImageList <> Nil) then
       InflateRect(rcItem, -2, -3);
     DrawFocusRect(hDC, rcItem);
   end;
   Canvas.Handle := 0;
 end;
end;

В строчке:  State := TOwnerDrawState(WordRec(LongRec (itemState).Lo).Lo);

Ошибка "Invalid typecast ".

В чем может быть проблема?


 
Игорь Шевченко ©   (2005-12-09 12:13) [1]

State := TOwnerDrawState(LongRec(itemState).Lo);


 
DUDAS ©   (2005-12-09 12:26) [2]

Спасибо!!!


 
han_malign ©   (2005-12-09 13:32) [3]


> State := TOwnerDrawState(LongRec(itemState).Lo);

State := TOwnerDrawState(itemState);
???



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.031 c
9-1122578344
Dr.Nemo
2005-07-28 23:19
2006.01.15
Как сделать игровой сервак на php для delphi online игр


2-1135717341
Freezz
2005-12-28 00:02
2006.01.15
работа с записями


1-1134025349
cyborg
2005-12-08 10:02
2006.01.15
Обращение к переменным в потоках


6-1128337224
Zmiy
2005-10-03 15:00
2006.01.15
Сжим строки на Веб-сервере


14-1134796881
begin...end
2005-12-17 08:21
2006.01.15
С Днём рождения! 17 декабря




   Наверх