Вниз
Скачать: 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.041 c
10-1110961006
mik1971
2005-03-16 11:16
2006.01.15
Использование dll, написанной в VB.NET в Delphi 7.


3-1132653851
G707
2005-11-22 13:04
2006.01.15
Не присваиваются значения, Вот фрагмент:


3-1132066468
Vlad
2005-11-15 17:54
2006.01.15
ADOQuery + ClientDataSet. Ошибка при пустом параметре


8-1123530510
Valentin
2005-08-08 23:48
2006.01.15
Play res


14-1134725654
sax_ol
2005-12-16 12:34
2006.01.15
задача для 6 класса




   Наверх