Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[BCB]關於ListView中GetNextItem如何使用. (轉載)

0 views
Skip to first unread message

------

unread,
Oct 15, 1998, 3:00:00 AM10/15/98
to
【 以下文字轉載自 language 討論區 】
【 原文由 guwel 所發表 】


我看了說明檔不知幾次了.還是不知如何使用,每次都有錯誤訊息發生,說明檔內

容大致如下

TListItem* __fastcall GetNextItem(TListItem* StartItem,
TSearchDirection Direction, TItemStates States);

我的程式大略如下:
TListItem* nitem;
TItemStates States=isSelected;
TSearchDirection Direction=idAll;
nitem=ListView1->GetNextItem(ListView1->Items->Item[ListView1->Selected->
Index],Direction,States);

但卻出現下列的錯誤訊息.
[C++Error] ftpmain.cpp(144): Cannot convert 'Comctrls::TItemState' to 'Sys
tem::Set<Comctrls::TItemState,0,4>'.
[C++Warning] ftpmain.cpp(157): 'nitem' is assigned a value that is never
used.

由於BCB的說明檔的和書上的範例都沒發現有提到GetNextItem的使用方法...
所以希望熟悉BCB的同好能指點小弟...不勝感激...謝謝大家...^_^
--
[m● Origin : 雲林科技大學藍天使 <bbs.yuntech.edu.tw> [FROM: 140.125.200.185]

Cheng-jen Tang

unread,
Oct 15, 1998, 3:00:00 AM10/15/98
to

------ wrote in message <3R6U9f$3...@bbs.yuntech.edu.tw>...
> TItemStates States=isSelected;

^^ here is a "s" !!!

> [C++Error] ftpmain.cpp(144): Cannot convert 'Comctrls::TItemState' to 'Sys

^^ here is
not


> tem::Set<Comctrls::TItemState,0,4>'.

我沒用過 BCB 不過 error message 已經講得很清楚了
我猜想 TItemStates 是一個用 enumator TItemState 的
Set (不知道這是不是 STL 的 set ﹖樣子很像)
而 isSelected 是在 enum TItemState {....}; 裡的一個值
(element)

Set 是沒辦法用 assign operator 【except overload it】
來“變成”一個 element 的值 (至少根據這個 error
message) 通常 Set 都是用 insert( xxxx ) 來塞一個值
到這個 set 裡


0 new messages