Вниз
Скачать: 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.051 c
14-1134716196
Ник (пишу с работы)
2005-12-16 09:56
2006.01.15
ТВ тюнер на winxp


14-1135165766
Den'IS
2005-12-21 14:49
2006.01.15
Цифровая камера и lan возможно?


8-1123065792
BFG9k
2005-08-03 14:43
2006.01.15
Перетаскивание изображения как в ACDsee


14-1134973829
Интересно мне
2005-12-19 09:30
2006.01.15
День добрый!


14-1134634406
Progger
2005-12-15 11:13
2006.01.15
Мороженые пельмени.




   Наверх