ВУЗ:
Составители:
45
void __fastcall TForm1::DirectoryListBox1Change(TObject *Sender)
{
DirectoryListBox1-Drive = DriveComboBox1-Drive;
FileListBox1-Drive = DriveComboBox1-Drive;
FileListBox1-Directory = DirectoryListBox1-Directory;
Edit1-Text=DirectoryListBox1-Directory;
file=false;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FileListBox1Change(TObject *Sender)
{
DirectoryListBox1-Drive = DriveComboBox1-Drive;
FileListBox1-Drive = DriveComboBox1-Drive;
FileListBox1-Directory = DirectoryListBox1-Directory;
Edit1-Text=FileListBox1-FileName;
file=true;
}
//---------------------------------------------------------------------------
result.h - заголовочный файл
//----------------------------------------------------------------------------
#ifndef OCBH
#define OCBH
//----------------------------------------------------------------------------
#include <System.hpp
#include <Windows.hpp
#include <SysUtils.hpp
#include <Classes.hpp
#include <Graphics.hpp
#include <StdCtrls.hpp
#include <Forms.hpp
#include <Controls.hpp
#include <Buttons.hpp
#include <ExtCtrls.hpp
#include <dir.h
//----------------------------------------------------------------------------
class TOKBottomDlg : public TForm
{
__published:
TButton *CancelBtn;
TListBox *ListBox1;
TLabel *Label1;
private:
char path[256];
TStringList *dirItem;
void scanDir(char *,TStringList *);
public:
virtual __fastcall TOKBottomDlg(TComponent* ,char *,bool);
};
//----------------------------------------------------------------------------
extern PACKAGE TOKBottomDlg *OKBottomDlg;
//----------------------------------------------------------------------------
#endif
result.cpp - форма "Результат полного сканирования каталога"
//---------------------------------------------------------------------
#include <vcl.h
void __fastcall TForm1::DirectoryListBox1Change(TObject *Sender) { DirectoryListBox1-Drive = DriveComboBox1-Drive; FileListBox1-Drive = DriveComboBox1-Drive; FileListBox1-Directory = DirectoryListBox1-Directory; Edit1-Text=DirectoryListBox1-Directory; file=false; } //--------------------------------------------------------------------------- void __fastcall TForm1::FileListBox1Change(TObject *Sender) { DirectoryListBox1-Drive = DriveComboBox1-Drive; FileListBox1-Drive = DriveComboBox1-Drive; FileListBox1-Directory = DirectoryListBox1-Directory; Edit1-Text=FileListBox1-FileName; file=true; } //--------------------------------------------------------------------------- result.h - заголовочный файл //---------------------------------------------------------------------------- #ifndef OCBH #define OCBH //---------------------------------------------------------------------------- #include
Страницы
- « первая
- ‹ предыдущая
- …
- 43
- 44
- 45
- 46
- 47
- …
- следующая ›
- последняя »