3 static char * fileIconNames[] =
5 "<:ecere>mimeTypes/file.png", /* none */
7 "<:ecere>mimeTypes/file.png", /* normalFile */
8 "<:ecere>mimeTypes/textEcereWorkspace.png", /* ewsFile */
9 "<:ecere>mimeTypes/textEcereProject.png", /* epjFile */
10 "<:ecere>mimeTypes/textEcereSource.png", /* ecFile */
11 "<:ecere>mimeTypes/textEcereHeader.png", /* ehFile */
12 "<:ecere>mimeTypes/textCSource.png", /* cFile */
13 "<:ecere>mimeTypes/textCHeader.png", /* hFile */
14 "<:ecere>mimeTypes/textC++Source.png", /* cppFile */
15 "<:ecere>mimeTypes/textC++Header.png", /* hppFile */
16 "<:ecere>mimeTypes/text.png", /* textFile */
17 "<:ecere>mimeTypes/textHyperTextMarkup.png", /* webFile */
18 "<:ecere>mimeTypes/image.png", /* pictureFile */
19 "<:ecere>status/audioVolumeHigh.png", /* soundFile */
20 "<:ecere>mimeTypes/package.png", /* archiveFile */
21 "<:ecere>mimeTypes/packageSoftware.png", /* packageFile */
22 "<:ecere>mimeTypes/packageOpticalDisc.png", /* opticalMediaImageFile */
24 "<:ecere>places/folder.png", /* folder */
25 "<:ecere>status/folderOpen.png", /* folderOpen */
26 "<:ecere>devices/computer.png", /* computer */
27 "<:ecere>devices/driveHardDisk.png", /* drive */
28 "<:ecere>places/driveRemote.png", /* netDrive */
29 "<:ecere>devices/mediaOptical.png", /* cdrom */
30 "<:ecere>devices/driveRemovableMedia.png", /* removable */
31 "<:ecere>devices/mediaFloppy.png", /* floppy */
32 "<:ecere>places/networkWorkgroup.png", /* network */
33 "<:ecere>places/networkServer.png", /* server */
34 "<:ecere>places/folderRemote.png", /* share */
36 "<:ecere>mimeTypes/package.png", /* treeLoader */
37 "<:ecere>places/startHere.png", /* lineNumbers */
42 //define guiApp = ((GuiApplication)__thisModule);
43 //define selectionColor = guiApp.currentSkin.selectionColor; //Color { 10, 36, 106 };
45 public enum __FileType
49 normalFile, ewsFile, epjFile, ecFile, ehFile, cFile, hFile, cppFile, hppFile,
50 textFile, webFile, pictureFile, soundFile,
51 archiveFile, packageFile, opticalMediaImageFile, /* these (all previous) are sort equal */
53 folder, folderOpen, computer,
54 drive, netDrive, cdrom, removable, floppy, network, server, share, // these are sort equal
64 this = SelectByExtension(value);
68 public property bool isFolder
70 get { return this >= folder && this <= share; }
73 public property bool isFile
75 get { return this >= normalFile && this <= opticalMediaImageFile; }
78 __FileType ::SelectByExtension(char * extension)
80 if(!strcmpi(extension, "ews"))
82 else if(!strcmpi(extension, "epj"))
84 else if(!strcmpi(extension, "ec"))
86 else if(!strcmpi(extension, "eh"))
88 else if(!strcmpi(extension, "cpp") ||
89 !strcmpi(extension, "cc") || !strcmpi(extension, "cxx"))
91 else if(!strcmpi(extension, "hpp") ||
92 !strcmpi(extension, "hh") || !strcmpi(extension, "hxx"))
94 else if(!strcmpi(extension, "c"))
96 else if(!strcmpi(extension, "h"))
98 else if(!strcmpi(extension, "txt") || !strcmpi(extension, "text") ||
99 !strcmpi(extension, "nfo") || !strcmpi(extension, "info"))
101 else if(!strcmpi(extension, "htm") || !strcmpi(extension, "html") ||
102 !strcmpi(extension, "css") || !strcmpi(extension, "php") ||
103 !strcmpi(extension, "js"))
105 else if(!strcmpi(extension, "bmp") || !strcmpi(extension, "pcx") ||
106 !strcmpi(extension, "jpg") || !strcmpi(extension, "jpeg") ||
107 !strcmpi(extension, "gif") || !strcmpi(extension, "png") ||
108 !strcmpi(extension, "ico"))
110 else if(!strcmpi(extension, "wav") || !strcmpi(extension, "mp3") ||
111 !strcmpi(extension, "ogg") || !strcmpi(extension, "snd"))
113 else if(!strcmpi(extension, "ear") || !strcmpi(extension, "7z") ||
114 !strcmpi(extension, "rar") || !strcmpi(extension, "zip") ||
115 !strcmpi(extension, "gz") || !strcmpi(extension, "bz2") ||
116 !strcmpi(extension, "tar") || !strcmpi(extension, "arj") ||
117 !strcmpi(extension, "lza") || !strcmpi(extension, "lzh") ||
118 !strcmpi(extension, "cpio") || !strcmpi(extension, "z"))
120 else if(!strcmpi(extension, "cab") || !strcmpi(extension, "deb") ||
121 !strcmpi(extension, "rpm"))
123 else if(!strcmpi(extension, "iso") || !strcmpi(extension, "mds") ||
124 !strcmpi(extension, "cue") || !strcmpi(extension, "bin") ||
125 !strcmpi(extension, "ccd") || !strcmpi(extension, "bwt") ||
126 !strcmpi(extension, "cdi") || !strcmpi(extension, "nrg"))
127 return opticalMediaImageFile;
132 //public enum FileSystemNodeType { file, folder, system };
134 define guiApp = ((GuiApplication)__thisModule); // how to do this in a dll?
135 define selectionColor = guiApp.currentSkin.selectionColor; //Color { 10, 36, 106 };
137 public class FileSystemNode : struct // : struct
140 /*//LinkElement<FileSystemNode> link;
141 FileSystemNode parent;
143 FileSystemNodeType type;
147 FileSystemNode prev, next;
149 bool loaded, childrenLoaded;
158 FileSystemNode parent;
164 void GetPath(String outputPath)
169 strcpy(outputPath, name);
170 for(up = parent; up; up = up.parent)
172 char temp[MAX_LOCATION];
173 strcpy(temp, up.name);
174 PathCat(temp, outputPath);
175 strcpy(outputPath, temp);
180 strcpy(outputPath, "/");
182 strcpy(outputPath, name);
187 bool IsChildOf(FileSystemNode node)
190 for(test = parent; test; test = test.parent)
196 void DuplicateChildren(bool recursive, bool forceExpanded, FileSystemNode addTo, FileSystemBox fsb)
200 FileSystemNode child;
202 for(child = children.first; child; child = child.next)
204 FileSystemNode copy { };
205 copy.name = CopyString(child.name);
206 copy.type = child.type;
207 fsb.AddTreeNode(copy, child.loaded, false, addTo);
209 copy.row.collapsed = false;
211 child.DuplicateChildren(recursive, forceExpanded, copy, fsb);
216 void EnsureVisible(bool expand)
219 parent.EnsureVisible(true);
221 row.collapsed = false;
222 // TODO: row.EnsureVisible(); // making the row visible by scrolling
232 FileSystemNode child;
233 for(; (child = children.first); )
236 children.Delete(child);
247 parent.children.Delete(this);
250 void OnDisplay(Surface surface, int x, int y, int width, FileSystemBox fsb, Alignment alignment, DataDisplayFlags displayFlags)
252 //int indentSize = (displayFlags.dropBox) ? 0 : 10;
258 char label[MAX_FILENAME];
265 icon = fsb.fileIcons[type].bitmap;
266 /*if(type == normalFile)
268 //xStart = indent * indent + x + (icon ? (icon.width + 5) : 0);
269 xStart = x + (icon ? (icon.width + 5) : 0);
275 sprintf(label, "%s [%s]", name, info);
282 if(type == folder || type == folderOpen)
283 surface.SetForeground(yellow);
287 //textOffset = indent * indentSize + (icon ? (icon.width + 4) : 0);
289 surface.TextOpacity(false);
290 surface.TextExtent(label, len, &w, &h);
293 // Draw the current row stipple
294 if(displayFlags.selected)
295 //surface.Area(xStart - 1, y, xStart - 1, y + h - 1);
296 //surface.Area(xStart + w - 1, y, xStart + w + 1, y + h - 1);
297 surface.Area(xStart - 3, y, xStart + w + 1, y + h - 1);
299 //surface.WriteTextDots(alignment, x + textOffset, y + 2, width - textOffset, name, strlen(name));
300 surface.WriteTextDots(alignment, xStart, y + 2, width, label, len);
302 //if(!guiApp.textMode) -- how to do this in a dll?
304 if(displayFlags.current)
306 if(displayFlags.active)
308 surface.LineStipple(0x5555);
309 if(displayFlags.selected)
310 surface.SetForeground(0xFFFFFF80);
312 surface.SetForeground(black);
316 surface.SetForeground(selectionColor);
318 surface.Rectangle(xStart - 3, y, xStart + w + 1, y + h - 1);
319 surface.LineStipple(0);
324 //surface.blend = true;
325 //surface.alphaWrite = blend;
326 surface.SetForeground(white);
327 //surface.Blit(icon, x + indent * indentSize, y,0,0, icon.width, icon.height);
328 surface.Blit(icon, x,y,0,0, icon.width, icon.height);
333 int OnCompare(FileSystemNode b)
336 FileSystemNode a = this;
337 if(a.type == b.type || (a.type < folder && b.type < folder) || (a.type >= drive))
338 result = strcmpi(a.name, b.name);
341 if(a.type == folder && b.type < folder) result = -1;
342 else if(a.type < folder && b.type == folder) result = 1;
348 /*int OnCompare(FileSystemNode b)
351 FileSystemNode a = this;
352 if(a.parent < b.parent) result = -1;
353 else if(a.parent > b.parent) result = 1;
355 result = fstrcmp(a.name, b.name);
359 char * OnGetString(char * tempString, FileSystemToolWindow fileSysToolWnd, bool * needClass)
361 return name ? name : "";
365 /*FileSystemNode MakeFileSystemNode(const FileStats stats, const char * name)
367 FileSystemNode node { stats = stats };
368 node.name = CopyString(name);
371 if(stats.attribs.isDirectory)
373 node.type = (stats.attribs.isDrive) ? drive : folder;
374 if(stats.attribs.isServer) node.type = server;
375 if(stats.attribs.isShare) node.type = share;
376 if(stats.attribs.isCDROM) node.type = cdrom;
377 if(stats.attribs.isRemote) node.type = netDrive;
378 if(stats.attribs.isRemovable)
380 if(name[0] == 'A' || name[0] == 'B')
383 node.type = removable;
388 char extension[MAX_EXTENSION];
389 GetExtension(node.name, extension);
390 node.type = __FileType::SelectByExtension(extension);
394 static FileSystemNode MakeFileSystemNode(const FileStats stats, const char * fileName, const char * filePath, const bool previewPicture, const DisplaySystem displaySystem)
396 int len = strlen(fileName);
397 char info[MAX_LOCATION];
398 char name[MAX_LOCATION];
399 char extension[MAX_EXTENSION];
401 FileSystemNode node { stats = stats };
403 //if(stats.attribs.isFile) // TODO fix this in ecere
404 if(stats.attribs.isDirectory)
408 node.type = (stats.attribs.isDrive) ? drive : folder;
409 if(stats.attribs.isServer) node.type = server;
410 if(stats.attribs.isShare) node.type = share;
411 if(stats.attribs.isCDROM) node.type = cdrom;
412 if(stats.attribs.isRemote) node.type = netDrive;
413 if(stats.attribs.isRemovable)
415 if(fileName[0] == 'A' || fileName[0] == 'B')
418 node.type = removable;
423 GetExtension(fileName, extension);
426 node.type = __FileType::SelectByExtension(extension);
429 if(stats.attribs.isDrive &&
430 len > 3 && !strncmp(&fileName[1], ": [", 3))
432 strncpy(name, fileName, 2);
434 strncpy(info, &fileName[4], len - 5);
439 strcpy(name, fileName);
443 node.path = CopyString(filePath);
444 node.name = CopyString(name);
446 node.info = CopyString(info);
447 node.extension = CopyString(extension);
449 if(node.type == pictureFile && previewPicture)
451 node.bitmap = Bitmap { };
452 node.bitmap.Load(filePath, null, displaySystem);
458 class FileSystemBoxBits
460 bool foldersOnly:1, filesOnly:1, details:1, treeBranches:1, previewPictures:1;
461 //bool header:1, freeSelect:1, fullRowSelect:1, multiSelect:1, autoScroll:1, alwaysHL : 1, moveRows:1, resizable:1;
462 //bool moveFields:1, clearHeader:1, alwaysEdit:1, collapse:1, treeBranch:1, rootCollapse:1, heightSet:1;
463 //bool sortable:1, noDragging:1, fillLastField:1, expandOnAdd:1;
466 public class FileSystemBox : Window // should we not derive from ListBox instead?
468 this stuff from the listbox would be nicely exposed...
469 fullRowSelect = false;
471 collapseControl = true;
472 rootCollapseButton = true;
477 hasHorzScroll = false;
478 hasVertScroll = false;
484 FileSystemNode selection;
486 virtual bool Window::NotifyNodeSelect(FileSystemBox box, FileSystemNode node);
493 if(value && value[0])
494 path = CopyString(value);
500 //isset { return path && path[0]; }
503 property bool foldersOnly { set { bits.foldersOnly = value; bits.filesOnly = !value; } get { return bits.foldersOnly; } };
504 property bool filesOnly { set { bits.filesOnly = value; bits.foldersOnly = !value; } get { return bits.filesOnly; } };
505 property bool previewPictures { set { bits.previewPictures = value; } get { return bits.previewPictures; } };
506 property char * extensions { set { delete extensions; if(value && value[0]) extensions = CopyString(value); } get { return extensions; } }
507 property bool details { set { bits.details = value; } get { return bits.details; } };
508 property bool treeBranches
512 bits.treeBranches = value;
513 list.treeBranches = value;
514 list.collapseControl = value;
515 list.rootCollapseButton = value;
517 get { return bits.treeBranches; }
520 property FileSystemNode node
528 if(!list.currentRow.tag)
530 return (FileSystemNode)list.currentRow.tag;
534 void Select(FileSystemNode node)
538 node.EnsureVisible(false);
539 list.SelectRow(node.row);
543 FileSystemNode Find(const char * name, FileSystemNode parent)
546 FileSystemNode start = parent ? parent : root;
547 if(!start.loaded || !start.childrenLoaded)
549 for(node = start.children.first; node; node = node.next)
550 if(node.name && !strcmpi(node.name, name))
556 FileSystemBoxBits bits;
561 BitmapResource fileIcons[__FileType];
565 char wd[MAX_LOCATION];
566 GetWorkingDir(wd, sizeof(wd));
570 list.AddField(nameField);
580 for(c = 0; c < __FileType::enumSize; c++)
582 fileIcons[c] = BitmapResource { fileIconNames[c], alphaBlend = true };
583 AddResource(fileIcons[c]);
587 DataField nameField { dataType = "FileSystemNode", width = 240, userData = this };
588 DataField typeField { header = "Type", dataType = /*"String"*/ "char *", width = 40, freeData = false };
589 DataField sizeField { header = "Size", dataType = "FileSize", width = 96, alignment = right };
602 hasHorzScroll = true;
603 hasVertScroll = true;
604 fullRowSelect = false;
607 anchor = Anchor { left = 0, top = 0, right = 0, bottom = 0 };
609 // WHY is this not working ?
610 /*void OnResize(int width, int height)
612 if(vertScroll.visible)
613 nameField.width = width - vertScroll.size.w;
615 nameField.width = width;
618 bool NotifyCollapse(ListBox listBox, DataRow row, bool collapsed)
622 FileSystemNode node = (FileSystemNode)row.tag;
623 FileSystemNode child;
627 for(child = node.children.last; child; child = node.children.last)
629 listBox.DeleteRow(child.row);
633 node.childrenLoaded = false;
638 if(!node.loaded || !node.childrenLoaded)
641 //list.Sort(nameField, 1);
644 for(child = node.children.first; child && child.next; child = child.next);
646 child.EnsureVisible(false);
652 bool NotifyRightClick(ListBox listBox, int x, int y, Modifiers mods)
654 DataRow row = listBox.currentRow;
657 FileSystemNode node = (FileSystemNode)row.tag;
663 MenuItem { menu, "Cut\tCtrl+X", t, NotifySelect = null, disabled = false };
664 MenuItem { menu, "Copy\tCtrl+C", c, NotifySelect = null, disabled = false };
665 MenuItem { menu, "Paste\tCtrl+V", p, NotifySelect = null, disabled = false /*!clipboard*/ };
666 MenuItem { menu, "Delete\tDel", d, NotifySelect = null, disabled = false };
667 //MenuDivider { menu };
671 master = this, menu = menu,
673 x + clientStart.x + absPosition.x - guiApp.desktop.position.x,
674 y + clientStart.y + absPosition.y - guiApp.desktop.position.y }
682 bool NotifySelect(ListBox listBox, DataRow row, Modifiers mods)
686 FileSystemNode node = (FileSystemNode)row.tag;
687 NotifyNodeSelect(listBox.parent.master, this, node);
693 bool NotifyEditing(ListBox listBox, DataRow row)
697 FileSystemNode node = (FileSystemNode)row.tag;
702 bool NotifyEdited(ListBox listBox, DataRow row)
706 FileSystemNode node = (FileSystemNode)row.tag;
711 bool NotifyEditDone(ListBox listBox, DataRow row)
715 FileSystemNode node = (FileSystemNode)row.tag;
723 Menu editMenu { menu, "Edit", e };
726 editMenu, "Cut\tCtrl+X", t, disabled = true;
728 bool NotifySelect(MenuItem selection, Modifiers mods)
734 MenuItem itemEditCopy
736 editMenu, "Copy\tCtrl+C", c, disabled = true;
738 bool NotifySelect(MenuItem selection, Modifiers mods)
744 MenuItem itemEditPaste
746 editMenu, "Paste\tCtrl+V", p;
748 bool NotifySelect(MenuItem selection, Modifiers mods)
754 MenuItem itemEditDelete
756 editMenu, "Delete\tDel", d, disabled = true;
758 bool NotifySelect(MenuItem selection, Modifiers mods)
765 // WHY is this crashing ?
766 /*void OnResize(int width, int height)
768 if(this && nameField)
769 nameField.width = width - 80;
775 // this is crashing in for designer when details = true // can't save the file, always yields a crash
776 /*if(list && created)
779 list.AddField(nameField);
782 list.AddField(typeField);
783 list.AddField(sizeField);
786 if(bits.treeBranches)
794 FileListing listing { path, extensions = extensions };
797 while(listing.Find())
799 if((!bits.foldersOnly && !bits.filesOnly) ||
800 (bits.foldersOnly && listing.stats.attribs.isDirectory) ||
801 (bits.filesOnly && !listing.stats.attribs.isDirectory/*listing.stats.attribs.isFile*/)) // TOCHECK: isFile broken?
803 FileSystemNode node = MakeFileSystemNode(listing.stats, listing.name, listing.path, bits.previewPictures, displaySystem);
804 DataRow row = list.AddRow();
806 row.SetData(nameField, node);
809 row.SetData(typeField, node.extension);
810 row.SetData(sizeField, (void *)node.stats.size);
814 list.Sort(nameField, 1);
819 //char startPath[MAX_LOCATION];
820 FileSystemNode parent;
822 FileListing listing { path, extensions = extensions };
825 GetWorkingDir(startPath, sizeof(startPath));
827 strcpy(path, startPath);*/
832 //root = FileSystemNode { type = computer, loaded = true, childrenLoaded = true };
833 root = MakeFileSystemNode(FileStats { attribs = FileExists(path)}, path, path, bits.previewPictures, displaySystem);
835 //root.name = rootName;
836 AddTreeNode(root, true, false, null, list);
840 AddTreeNode(root, false, true, null);
842 // How can this make sense for linux?
844 while(listing.Find())
846 int len = strlen(listing.name);
847 char info[MAX_LOCATION];
848 char name[MAX_LOCATION];
849 if(listing.stats.attribs.isDrive &&
850 len > 3 && !strncmp(&listing.name[1], ": [", 3))
852 strncpy(name, listing.name, 2);
854 strncpy(info, &listing.name[4], len - 5);
859 strcpy(name, listing.name);
863 parent = MakeFileSystemNode(listing.stats, name);
865 parent.info = CopyString(info);
866 parent.loaded = true;
867 AddTreeNode(parent, !listing.stats.attribs.isDirectory, listing.stats.attribs.isDirectory, root, this);
868 if(!listing.stats.attribs.isDirectory)
869 parent.childrenLoaded = true;
872 node = FileSystemNode { name = msNetwork, type = network };
873 AddTreeNode(node, false, true, null, this);
874 node.row.collapsed = true;
879 list.Sort(nameField, 1);
882 void LoadTreeNode(FileSystemNode node)
886 char path[MAX_LOCATION];
889 FileListing listing { path, extensions = extensions };
890 if(node.children.count == 1)
891 DeleteNode(node.children.first);
893 while(listing.Find())
895 if((!bits.foldersOnly && !bits.filesOnly) ||
896 (bits.foldersOnly && listing.stats.attribs.isDirectory) ||
897 (bits.filesOnly && !listing.stats.attribs.isDirectory/*listing.stats.attribs.isFile*/)) // TOCHECK: isFile broken?
899 FileSystemNode child = MakeFileSystemNode(listing.stats, listing.name, listing.path, bits.previewPictures, displaySystem);
900 AddTreeNode(child, true, false, node);
901 NodeChildLoad(child, node);
905 node.childrenLoaded = true;
907 node.row.SortSubRows(false);
909 else if(!node.childrenLoaded)
911 FileSystemNode child;
912 if(node.children.first)
914 for(child = node.children.first; child; child = child.next)
918 else if(!child.childrenLoaded)
919 NodeChildLoad(child, node);
921 node.childrenLoaded = true;
922 node.row.SortSubRows(false);
927 void NodeChildLoad(FileSystemNode parent, FileSystemNode node)
929 char path[MAX_LOCATION];
930 parent.GetPath(path);
933 FileListing listing { path, extensions = extensions };
934 while(listing.Find())
936 if((!bits.foldersOnly && !bits.filesOnly) ||
937 (bits.foldersOnly && listing.stats.attribs.isDirectory) ||
938 (bits.filesOnly && !listing.stats.attribs.isDirectory/*listing.stats.attribs.isFile*/)) // TOCHECK: isFile broken?
940 FileSystemNode child = MakeFileSystemNode(listing.stats, listing.name, listing.path, bits.previewPictures, displaySystem);
941 AddTreeNode(child, true, false, parent);
948 //parent.childrenLoaded = true;
951 void AddTreeNode(FileSystemNode node, bool loaded, bool addLoader, FileSystemNode addTo)
953 DataRow row = (addTo && addTo.row) ? addTo.row.AddRow() : list.AddRow();
957 node.indent = addTo.indent + 1;
958 addTo.children.Add(node);
962 row.SetData(null, node);
964 node.loaded = loaded;
966 //AddTreeNode(FileSystemNode { }, false, false, node); // why would this create a compile error?
967 AddTreeNode(FileSystemNode { type = none }, false, false, node);
970 row.collapsed = true;
971 else if(node.type == folder)
972 node.type = folderOpen;
975 void DeleteNode(FileSystemNode node)
977 FileSystemNode child;
978 for(; (child = node.children.first); )
980 list.DeleteRow(node.row);
984 public class ClipBoardFiles
998 int size = SelSize();
1001 // Try to allocate memory
1002 ClipBoard clipBoard { };
1003 if(clipBoard.Allocate(size+1))
1005 GetSel(clipBoard.memory, true);
1018 ClipBoard clipBoard { };
1019 if(clipBoard.Load())
1020 PutS(clipBoard.memory);
1031 SetViewToCursor(true);
1036 Private Type DROPFILES
1042 For iCounter = 0 To filelist.ListCount - 1
1043 If filelist.Selected(iCounter) = True Then
1044 strFiles = strFiles & FixPath(filelist.Path) & filelist.List(iCounter) & vbNullChar
1047 'all selected items are now put in strFiles
1049 hGlobal = GlobalAlloc(GHND, Len(DF) + Len(strFiles)) 'put all files to a exclusive number
1050 If hGlobal Then 'if the globalalloc worked
1051 lpGlobal = GlobalLock(hGlobal) 'lock the hGlobal
1052 DF.pFiles = Len(DF) 'set the size of the files
1054 Call CopyMem(ByVal lpGlobal, DF, Len(DF)) 'copy df to the lpglobal
1055 Call CopyMem(ByVal (lpGlobal + Len(DF)), ByVal strFiles, Len(strFiles)) 'copy strfiles to lpglobal
1056 Call GlobalUnlock(hGlobal) 'unlock hglobal again
1058 SetClipboardData CF_HDROP, hGlobal 'put files to the clipboard
1061 bool SaveFile(const char * filePath)