|
|
|
FindNext
|
|||
|---|---|---|---|
|
#18+
На второе нажатие пишет что ошибка какая-то, но работать продолжает, а содержимое Label не меняется Кнопка void __fastcall TForm1::Button1Click(TObject *Sender) { static bool begin=true; TSearchRec sr; if(begin){ FindFirst("D://Param.exe", faAnyFile, sr); begin=false; } else FindNext(sr); Label->Caption=sr.Name; } ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.10.2005, 15:49 |
|
||
|
FindNext
|
|||
|---|---|---|---|
|
#18+
TSearchRec sr; тоже надо бы static тогда уж Posted via ActualForum NNTP Server 1.3 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.10.2005, 15:51 |
|
||
|
FindNext
|
|||
|---|---|---|---|
|
#18+
Исправил, но тоже, но без ошибки Кнопка void __fastcall TForm1::Button1Click(TObject *Sender) { static bool begin=true; TSearchRec sr; if(begin){ FindFirst("D://Param.exe", faAnyFile, sr); begin=false; } else FindNext(sr); Label->Caption=sr.Name; } ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.10.2005, 15:51 |
|
||
|
FindNext
|
|||
|---|---|---|---|
|
#18+
В смысле я ststic поставил ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.10.2005, 15:52 |
|
||
|
FindNext
|
|||
|---|---|---|---|
|
#18+
Я ничего не понимаю из твоих многочисленных постов :) Ты ищешь один-единственный файл ? зачем ты второй раз вызываешь поиск ? Posted via ActualForum NNTP Server 1.3 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.10.2005, 15:56 |
|
||
|
FindNext
|
|||
|---|---|---|---|
|
#18+
Коротче, мне надо получить список файлов в папку C:\, а как - я не знаю. Если можно, то киньте Example ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.10.2005, 16:03 |
|
||
|
FindNext
|
|||
|---|---|---|---|
|
#18+
C++Builder HelpThe following example uses an edit control, a button, a string grid, and seven check boxes. The check boxes correspond to the seven possible file attributes. When the button is clicked, the path specified in the edit control is searched for files matching the checked file attributes. The names and sizes of the matching files are inserted into the string grid. void __fastcall TForm1::Button1Click(TObject *Sender) { TSearchRec sr; int iAttributes = 0; StringGrid1->RowCount = 1; iAttributes |= faReadOnly * CheckBox1->Checked; iAttributes |= faHidden * CheckBox2->Checked; iAttributes |= faSysFile * CheckBox3->Checked; iAttributes |= faVolumeID * CheckBox4->Checked; iAttributes |= faDirectory * CheckBox5->Checked; iAttributes |= faArchive * CheckBox6->Checked; iAttributes |= faAnyFile * CheckBox7->Checked; StringGrid1->RowCount = 0; if (FindFirst(Edit1->Text, iAttributes, sr) == 0) { do { if ((sr.Attr & iAttributes) == sr.Attr) { StringGrid1->RowCount = StringGrid1->RowCount + 1; StringGrid1->Cells[1][StringGrid1->RowCount-1] = sr.Name; StringGrid1->Cells[2][StringGrid1->RowCount-1] = IntToStr(sr.Size); } } while (FindNext(sr) == 0); FindClose(sr); } } Posted via ActualForum NNTP Server 1.3 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.10.2005, 16:07 |
|
||
|
FindNext
|
|||
|---|---|---|---|
|
#18+
Я её в help'е 5 минут назад видел. И чё эта штука делает? И что такое StringGrid1? (Я нуб) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.10.2005, 16:11 |
|
||
|
FindNext
|
|||
|---|---|---|---|
|
#18+
Короче, читай F1, вся информация есть Posted via ActualForum NNTP Server 1.3 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.10.2005, 16:12 |
|
||
|
FindNext
|
|||
|---|---|---|---|
|
#18+
То-же самое: отображается тока один файл, имя которого я ввожу в Edit1. И всё. 8( ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.10.2005, 16:15 |
|
||
|
FindNext
|
|||
|---|---|---|---|
|
#18+
Медитировать на словом маска Posted via ActualForum NNTP Server 1.3 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.10.2005, 16:23 |
|
||
|
|

start [/forum/topic.php?fid=57&msg=33309566&tid=2032663]: |
0ms |
get settings: |
5ms |
get forum list: |
16ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
84ms |
get topic data: |
15ms |
get forum data: |
5ms |
get page messages: |
66ms |
get tp. blocked users: |
3ms |
| others: | 301ms |
| total: | 501ms |

| 0 / 0 |
