| 1 |
#ifndef _dirw |
| 2 |
#define _dirw |
| 3 |
|
| 4 |
#include <stdio.h> |
| 5 |
#include <commctrl.h> |
| 6 |
|
| 7 |
class dirw |
| 8 |
{ |
| 9 |
int tabpos; |
| 10 |
int lr; |
| 11 |
char dir[1000]; |
| 12 |
char dirhis[1000]; |
| 13 |
char *clipname; |
| 14 |
char drive[1000]; |
| 15 |
int clipmax; |
| 16 |
BOOL clipf; |
| 17 |
BOOL hisf; |
| 18 |
BOOL mainf; |
| 19 |
BOOL mousef; |
| 20 |
BOOL hisRf; |
| 21 |
BOOL hisLf; |
| 22 |
ULARGE_INTEGER FreeBytesAv; |
| 23 |
ULARGE_INTEGER Bytes; |
| 24 |
ULARGE_INTEGER FreeBytes; |
| 25 |
DWORD SectorsPerCluster; |
| 26 |
DWORD BytesPerSector; |
| 27 |
DWORD NumberOfFreeClusters; |
| 28 |
DWORD TotalNumberOfClusters; |
| 29 |
char file[1000]; |
| 30 |
HWND hList; |
| 31 |
HWND hEdit; |
| 32 |
DWORD itemnum; |
| 33 |
double space; |
| 34 |
double total; |
| 35 |
HIMAGELIST hImage; |
| 36 |
public: |
| 37 |
dirw(){wsprintf(dir,"."); clipname =dir+5;}; |
| 38 |
dirw(int t){wsprintf(dir,"."); setLR(t); clipname =dir+5;}; |
| 39 |
BOOL isclip() ; |
| 40 |
BOOL ishis() ; |
| 41 |
BOOL ismain() ; |
| 42 |
BOOL ismouse() ; |
| 43 |
char *getClipName() {return clipname;} ; |
| 44 |
int getClipMax() ; |
| 45 |
int getTabpos(){return tabpos;}; |
| 46 |
int getLR() {return lr;}; |
| 47 |
void setTabpos(int t) {tabpos =t;}; |
| 48 |
void setLR(int t) {lr =t;}; |
| 49 |
void setList(HWND li) {hList = li;}; |
| 50 |
void setDir( char *d) {strcpy(dir, d);}; |
| 51 |
void setDirHis( char *d) {strcpy(dirhis, d);}; |
| 52 |
void setEdit(HWND ed) {hEdit = ed;}; |
| 53 |
void resetEditText() { SetWindowText(hEdit, dir); }; |
| 54 |
void EditTextNow() { SetWindowText(hEdit, dirhis); }; |
| 55 |
DWORD GetItemNum() {return itemnum;}; |
| 56 |
double GetTotal() {return total;}; |
| 57 |
double GetSpace() {return space;}; |
| 58 |
void SetItemNum(DWORD n) {itemnum =n;}; |
| 59 |
void SetSpace(DWORD sp) {space =sp;}; |
| 60 |
void setImage(HIMAGELIST im) {hImage = im;}; |
| 61 |
HWND getEdit() {return hEdit;}; |
| 62 |
HWND getList() {return hList;}; |
| 63 |
HIMAGELIST getImage() {return hImage;}; |
| 64 |
void SetHandle(HWND li, HWND ed, HIMAGELIST im) {setEdit(ed); setList(li); setImage(im); } |
| 65 |
char *cd(char *d) {this->SetCurrentDirectory(d); return dir; }; |
| 66 |
char *SetCurrentDirectory(char *d); |
| 67 |
void setfile(char *f) {wsprintf(file,"%s",f);}; |
| 68 |
char *getfile() {return file;}; |
| 69 |
char *cd() {return GetCurrentDirectory(0,NULL);}; |
| 70 |
char *GetCurrentDirectory(DWORD l,char *d){if(d!=NULL)wsprintf(d,"%s",dir); return dir;}; |
| 71 |
void savedir(); |
| 72 |
void savedir(char*); |
| 73 |
void hisback(); |
| 74 |
void hisnext(); |
| 75 |
void hisBackSee(); |
| 76 |
void hisNextSee(); |
| 77 |
void hispos(int i); |
| 78 |
void cdroot() {cd(drive);}; |
| 79 |
char *getClip(int); |
| 80 |
}; |
| 81 |
|
| 82 |
#include "folder.h" |
| 83 |
|
| 84 |
void Exchange(dirw&, dirw&); |
| 85 |
BOOL isclip(char *d); |
| 86 |
BOOL ishis(char *d); |
| 87 |
BOOL ismain(char *d); |
| 88 |
BOOL addclip(char *,char *to); |
| 89 |
|
| 90 |
#endif |