Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2006.01.15;
Скачать: 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 вся ветка

Текущий архив: 2006.01.15;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.051 c
14-1135254261
IAmDanil
2005-12-22 15:24
2006.01.15
файл <---> папка


11-1110739823
Владимир Кладов
2005-03-13 21:50
2006.01.15
версия 2.08


4-1131459243
vishnia
2005-11-08 17:14
2006.01.15
Вывод на печать на принтер, подключенный по сети


6-1127921709
H@rdDrive
2005-09-28 19:35
2006.01.15
Location: http://home.site.ru/ - как перейти


14-1134935788
QwertyKz
2005-12-18 22:56
2006.01.15
C# и дизайнер форм