remove winfile - it's superseded by winefile.
authorMartin Fuchs <fuchs.martin@gmail.com>
Sun, 17 Jul 2005 09:56:38 +0000 (09:56 +0000)
committerMartin Fuchs <fuchs.martin@gmail.com>
Sun, 17 Jul 2005 09:56:38 +0000 (09:56 +0000)
svn path=/trunk/; revision=16604

56 files changed:
rosapps/directory.xml
rosapps/winfile/StdAfx.cpp [deleted file]
rosapps/winfile/StdAfx.h [deleted file]
rosapps/winfile/about.c [deleted file]
rosapps/winfile/about.h [deleted file]
rosapps/winfile/childwnd.c [deleted file]
rosapps/winfile/childwnd.h [deleted file]
rosapps/winfile/debug.c [deleted file]
rosapps/winfile/debug.h [deleted file]
rosapps/winfile/dialogs.c [deleted file]
rosapps/winfile/dialogs.h [deleted file]
rosapps/winfile/draw.c [deleted file]
rosapps/winfile/draw.h [deleted file]
rosapps/winfile/drivebar.c [deleted file]
rosapps/winfile/drivebar.h [deleted file]
rosapps/winfile/entries.c [deleted file]
rosapps/winfile/entries.h [deleted file]
rosapps/winfile/format.h [deleted file]
rosapps/winfile/framewnd.c [deleted file]
rosapps/winfile/framewnd.h [deleted file]
rosapps/winfile/listview.c [deleted file]
rosapps/winfile/listview.h [deleted file]
rosapps/winfile/main.c [deleted file]
rosapps/winfile/main.h [deleted file]
rosapps/winfile/network.c [deleted file]
rosapps/winfile/network.h [deleted file]
rosapps/winfile/res/drivebar.bmp [deleted file]
rosapps/winfile/res/folder.bmp [deleted file]
rosapps/winfile/res/folder1.bmp [deleted file]
rosapps/winfile/res/folder2.bmp [deleted file]
rosapps/winfile/res/folder3.bmp [deleted file]
rosapps/winfile/res/folder_open.bmp [deleted file]
rosapps/winfile/res/images.bmp [deleted file]
rosapps/winfile/res/small.ico [deleted file]
rosapps/winfile/res/toolbar.bmp [deleted file]
rosapps/winfile/res/winfile.ico [deleted file]
rosapps/winfile/resource.h [deleted file]
rosapps/winfile/run.c [deleted file]
rosapps/winfile/run.h [deleted file]
rosapps/winfile/settings.c [deleted file]
rosapps/winfile/settings.h [deleted file]
rosapps/winfile/shell.c [deleted file]
rosapps/winfile/shell.h [deleted file]
rosapps/winfile/sort.c [deleted file]
rosapps/winfile/sort.h [deleted file]
rosapps/winfile/splitpath.c [deleted file]
rosapps/winfile/trace.c [deleted file]
rosapps/winfile/trace.h [deleted file]
rosapps/winfile/treeview.c [deleted file]
rosapps/winfile/treeview.h [deleted file]
rosapps/winfile/utils.c [deleted file]
rosapps/winfile/utils.h [deleted file]
rosapps/winfile/winfile.rc [deleted file]
rosapps/winfile/winfile.xml [deleted file]
rosapps/winfile/worker.c [deleted file]
rosapps/winfile/worker.h [deleted file]

index c9ba78a..84c5506 100644 (file)
@@ -50,6 +50,3 @@
        <xi:include href="welcome/welcome.xml" />\r
 </directory>\r
 -->\r
-<directory name="winfile">\r
-       <xi:include href="winfile/winfile.xml" />\r
-</directory>\r
diff --git a/rosapps/winfile/StdAfx.cpp b/rosapps/winfile/StdAfx.cpp
deleted file mode 100644 (file)
index 3ea6b57..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// stdafx.cpp : source file that includes just the standard includes
-//  winfile.pch will be the pre-compiled header
-//  stdafx.obj will contain the pre-compiled type information
-
-#include "stdafx.h"
-
-// TODO: reference any additional headers you need in STDAFX.H
-// and not in this file
diff --git a/rosapps/winfile/StdAfx.h b/rosapps/winfile/StdAfx.h
deleted file mode 100644 (file)
index 7d251c6..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-// stdafx.h : include file for standard system include files,
-//  or project specific include files that are used frequently, but
-//      are changed infrequently
-//
-
-#if !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
-#define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-// Windows Header Files:
-#include <windows.h>
-#include <commctrl.h>
-
-// C RunTime Header Files
-#include <stdlib.h>
-#include <malloc.h>
-#include <memory.h>
-#include <tchar.h>
-#include <process.h>
-#include <stdio.h>
-
-// Local Header Files
-
-// TODO: reference additional headers your program requires here
-
-//{{AFX_INSERT_LOCATION}}
-// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
-#endif // !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
diff --git a/rosapps/winfile/about.c b/rosapps/winfile/about.c
deleted file mode 100644 (file)
index 5e457df..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *  ReactOS About Dialog Box
- *
- *  about.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <commctrl.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <memory.h>
-#include <tchar.h>
-#include <process.h>
-#include <stdio.h>
-
-#include "main.h"
-#include "about.h"
-
-
-extern HINSTANCE hInst;
-
-
-LRESULT CALLBACK AboutDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
-{
-    HWND    hLicenseEditWnd;
-    TCHAR   strLicense[0x1000];
-
-    switch (message) {
-    case WM_INITDIALOG:
-        hLicenseEditWnd = GetDlgItem(hDlg, IDC_LICENSE_EDIT);
-        LoadString(hInst, IDS_LICENSE, strLicense, 0x1000);
-        SetWindowText(hLicenseEditWnd, strLicense);
-        return TRUE;
-    case WM_COMMAND:
-        if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL)) {
-            EndDialog(hDlg, LOWORD(wParam));
-            return TRUE;
-        }
-        break;
-    }
-    return 0;
-}
-
-void ShowAboutBox(HWND hWnd)
-{
-    DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, (DLGPROC)AboutDialogWndProc);
-}
-
diff --git a/rosapps/winfile/about.h b/rosapps/winfile/about.h
deleted file mode 100644 (file)
index 1f94d62..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *  ReactOS About Dialog Box
- *
- *  about.h
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __ABOUT_H__
-#define __ABOUT_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-void ShowAboutBox(HWND hWnd);
-
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __ABOUT_H__
diff --git a/rosapps/winfile/childwnd.c b/rosapps/winfile/childwnd.c
deleted file mode 100644 (file)
index 8e5e0a1..0000000
+++ /dev/null
@@ -1,497 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  childwnd.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <commctrl.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <memory.h>
-#include <tchar.h>
-#include <process.h>
-#include <stdio.h>
-
-#include <windowsx.h>
-#include <ctype.h>
-#include <assert.h>
-#define ASSERT assert
-
-#include "main.h"
-#include "framewnd.h"
-#include "childwnd.h"
-#include "treeview.h"
-#include "listview.h"
-#include "dialogs.h"
-#include "utils.h"
-#include "run.h"
-#include "trace.h"
-
-
-#ifdef _NO_EXTENSIONS
-//#define      COLOR_SPLITBAR          WHITE_BRUSH
-#define        COLOR_SPLITBAR          LTGRAY_BRUSH
-#else
-#define        COLOR_SPLITBAR          LTGRAY_BRUSH
-#endif
-
-////////////////////////////////////////////////////////////////////////////////
-// Global Variables:
-//
-
-
-////////////////////////////////////////////////////////////////////////////////
-// Local module support methods
-//
-/*
-static BOOL pane_command(Pane* pane, UINT cmd)
-{
-       switch(cmd) {
-       case ID_VIEW_NAME:
-               if (pane->visible_cols) {
-                       pane->visible_cols = 0;
-                       calc_widths(pane, TRUE);
-#ifndef _NO_EXTENSIONS
-                       set_header(pane);
-#endif
-                       InvalidateRect(pane->hWnd, 0, TRUE);
-                       CheckMenuItem(Globals.hMenuView, ID_VIEW_NAME, MF_BYCOMMAND|MF_CHECKED);
-//                     CheckMenuItem(Globals.hMenuView, ID_VIEW_ALL_ATTRIBUTES, MF_BYCOMMAND);
-//                     CheckMenuItem(Globals.hMenuView, ID_VIEW_SELECTED_ATTRIBUTES, MF_BYCOMMAND);
-               }
-               break;
-#if 0
-       case ID_VIEW_ALL_ATTRIBUTES:
-               if (pane->visible_cols != COL_ALL) {
-                       pane->visible_cols = COL_ALL;
-                       calc_widths(pane, TRUE);
-                       InvalidateRect(pane->hWnd, 0, TRUE);
-                       CheckMenuItem(Globals.hMenuView, ID_VIEW_NAME, MF_BYCOMMAND);
-//                     CheckMenuItem(Globals.hMenuView, ID_VIEW_ALL_ATTRIBUTES, MF_BYCOMMAND|MF_CHECKED);
-//                     CheckMenuItem(Globals.hMenuView, ID_VIEW_SELECTED_ATTRIBUTES, MF_BYCOMMAND);
-               }
-               break;
-#endif
-               // TODO: more command ids...
-       default:
-               return FALSE;
-       }
-       return TRUE;
-}
- */
-static void draw_splitbar(HWND hWnd, int x)
-{
-       RECT rt;
-       HDC hdc = GetDC(hWnd);
-
-       GetClientRect(hWnd, &rt);
-       rt.left = x - SPLIT_WIDTH/2;
-       rt.right = x + SPLIT_WIDTH/2+1;
-       InvertRect(hdc, &rt);
-       ReleaseDC(hWnd, hdc);
-}
-
-static void ResizeWnd(ChildWnd* pChildWnd, int cx, int cy)
-{
-       HDWP hdwp = BeginDeferWindowPos(2);
-       RECT rt = {0, 0, cx, cy};
-
-       cx = pChildWnd->nSplitPos + SPLIT_WIDTH/2;
-       DeferWindowPos(hdwp, pChildWnd->hTreeWnd, 0, rt.left, rt.top, pChildWnd->nSplitPos-SPLIT_WIDTH/2-rt.left, rt.bottom-rt.top, SWP_NOZORDER|SWP_NOACTIVATE);
-       DeferWindowPos(hdwp, pChildWnd->hListWnd, 0, rt.left+cx+1, rt.top, rt.right-cx, rt.bottom-rt.top, SWP_NOZORDER|SWP_NOACTIVATE);
-       EndDeferWindowPos(hdwp);
-}
-
-static void OnSize(ChildWnd* pChildWnd, WPARAM wParam, LPARAM lParam)
-{
-    if (wParam != SIZE_MINIMIZED) {
-               ResizeWnd(pChildWnd, LOWORD(lParam), HIWORD(lParam));
-    }
-}
-
-void OnFileMove(HWND hWnd)
-{
-       struct ExecuteDialog dlg = {{0}};
-    if (DialogBoxParam(Globals.hInstance, MAKEINTRESOURCE(IDD_DIALOG_FILE_MOVE), hWnd, MoveFileWndProc, (LPARAM)&dlg) == IDOK) {
-       }
-}
-
-static void OnPaint(HWND hWnd, ChildWnd* pChildWnd)
-{
-    HBRUSH lastBrush;
-       PAINTSTRUCT ps;
-       RECT rt;
-
-       BeginPaint(hWnd, &ps);
-       GetClientRect(hWnd, &rt);
-    lastBrush = SelectObject(ps.hdc, (HBRUSH)GetStockObject(COLOR_SPLITBAR));
-    Rectangle(ps.hdc, rt.left, rt.top-1, rt.right, rt.bottom+1);
-    SelectObject(ps.hdc, lastBrush);
-//    rt.top = rt.bottom - GetSystemMetrics(SM_CYHSCROLL);
-//    FillRect(ps.hdc, &rt, GetStockObject(BLACK_BRUSH));
-       EndPaint(hWnd, &ps);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//  FUNCTION: _CmdWndProc(HWND, unsigned, WORD, LONG)
-//
-//  PURPOSE:  Processes WM_COMMAND messages for the main frame window.
-//
-//
-
-static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
-       //UINT cmd = LOWORD(wParam);
-       //HWND hChildWnd;
-
-       switch (LOWORD(wParam)) {
-    // Parse the menu selections:
-/*
-//        case ID_FILE_MOVE:
-//            OnFileMove(hWnd);
-//            break;
-        case ID_FILE_COPY:
-        case ID_FILE_COPY_CLIPBOARD:
-        case ID_FILE_DELETE:
-        case ID_FILE_RENAME:
-        case ID_FILE_PROPERTIES:
-        case ID_FILE_COMPRESS:
-        case ID_FILE_UNCOMPRESS:
-            break;
-//        case ID_FILE_RUN:
-//            OnFileRun();
-//            break;
-        case ID_FILE_PRINT:
-        case ID_FILE_ASSOCIATE:
-        case ID_FILE_CREATE_DIRECTORY:
-        case ID_FILE_SEARCH:
-        case ID_FILE_SELECT_FILES:
-            break;
- */
-        case ID_FILE_EXIT:
-            SendMessage(hWnd, WM_CLOSE, 0, 0);
-            break;
-/*
-        case ID_DISK_COPY_DISK:
-                       break;
-        case ID_DISK_LABEL_DISK:
-                       break;
-        case ID_DISK_CONNECT_NETWORK_DRIVE:
-            MapNetworkDrives(hWnd, TRUE);
-                       break;
-        case ID_DISK_DISCONNECT_NETWORK_DRIVE:
-            MapNetworkDrives(hWnd, FALSE);
-                       break;
-        case ID_DISK_SHARE_AS:
-                       break;
-        case ID_DISK_STOP_SHARING:
-                       break;
-        case ID_DISK_SELECT_DRIVE:
-                       break;
- */
-/*
-        case ID_TREE_EXPAND_ONE_LEVEL:
-        case ID_TREE_EXPAND_ALL:
-        case ID_TREE_EXPAND_BRANCH:
-        case ID_TREE_COLLAPSE_BRANCH:
-            MessageBeep(-1);
-                       break;
- */
-        case ID_VIEW_BY_FILE_TYPE:
-                       {
-                       struct ExecuteDialog dlg = {{0}};
-            if (DialogBoxParam(Globals.hInstance, MAKEINTRESOURCE(IDD_DIALOG_VIEW_TYPE), hWnd, ViewFileTypeWndProc, (LPARAM)&dlg) == IDOK) {
-            }
-                       }
-                       break;
-        case ID_OPTIONS_CONFIRMATION:
-                       {
-                       struct ExecuteDialog dlg = {{0}};
-            if (DialogBoxParam(Globals.hInstance, MAKEINTRESOURCE(IDD_DIALOG_OPTIONS_CONFIRMATON), hWnd, OptionsConfirmationWndProc, (LPARAM)&dlg) == IDOK) {
-            }
-                       }
-            break;
-               case ID_WINDOW_NEW_WINDOW:
-            CreateChildWindow(-1);
-//                     {
-//                     ChildWnd* pChildWnd = alloc_child_window(path);
-//                     if (!create_child_window(pChildWnd))
-//                             free(pChildWnd);
-//                     }
-                       break;
-               default:
-//                     return DefMDIChildProc(hWnd, message, wParam, lParam);
-            return FALSE;
-            break;
-       }
-       return TRUE;
-}
-
-BOOL OnNotify(HWND hWnd, WPARAM wParam, LPARAM lParam)
-{
-       ChildWnd* pChildWnd = (ChildWnd*)GetWindowLong(hWnd, GWL_USERDATA);
-    {
-        if ((int)wParam == TREE_WINDOW) {
-
-            switch (((LPNMHDR)lParam)->code) {
-            case TVN_ITEMEXPANDING:
-//                return !OnTreeExpanding(pChildWnd->hTreeWnd, (NMTREEVIEW*)lParam);
-                OnTreeExpanding(pChildWnd->hTreeWnd, (NMTREEVIEW*)lParam);
-                               return FALSE;
-
-            case TVN_SELCHANGED:
-                {
-                Entry* entry = (Entry*)((NMTREEVIEW*)lParam)->itemNew.lParam;
-                if (entry != NULL) {
-                    //RefreshList(pChildWnd->hListWnd, entry);
-                    //void set_curdir(ChildWnd* child, Entry* entry)
-//                    set_curdir(pChildWnd, entry);
-
-//                                     UpdateStatus(hWnd, pChildWnd->left.cur->down);
-
-                }
-                       case TVN_GETDISPINFO:
-                OnGetDispInfo((NMTVDISPINFO*)lParam);
-                break;
-/*
-                    HKEY hKey;
-                    TCHAR keyPath[1000];
-                    int keyPathLen = 0;
-                    keyPath[0] = _T('\0');
-                    hKey = FindRegRoot(pChildWnd->hTreeWnd, ((NMTREEVIEW*)lParam)->itemNew.hItem, keyPath, &keyPathLen, sizeof(keyPath)/sizeof(TCHAR));
-                    RefreshListView(pChildWnd->hListWnd, hKey, keyPath);
-
-                    keyPathLen = 0;
-                    keyPath[0] = _T('\0');
-                    MakeFullRegPath(pChildWnd->hTreeWnd, ((NMTREEVIEW*)lParam)->itemNew.hItem, keyPath, &keyPathLen, sizeof(keyPath)/sizeof(TCHAR));
-                    SendMessage(hStatusBar, SB_SETTEXT, 0, (LPARAM)keyPath);
- */
-                }
-                break;
-            default:
-                break;
-            }
-        } else
-        if ((int)wParam == LIST_WINDOW) {
-            if (!SendMessage(pChildWnd->hListWnd, WM_NOTIFY, wParam, lParam)) {
-                return FALSE;
-            }
-        }
-    }
-
-       return TRUE;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//  FUNCTION: ChildWndProc(HWND, unsigned, WORD, LONG)
-//
-//  PURPOSE:  Processes messages for the child windows.
-//
-//  WM_COMMAND  - process the application menu
-//  WM_PAINT    - Paint the main window
-//  WM_DESTROY  - post a quit message and return
-//
-//
-
-LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
-       ChildWnd* pChildWnd = (ChildWnd*)GetWindowLong(hWnd, GWL_USERDATA);
-       ASSERT(pChildWnd || (message == WM_CREATE));
-
-       switch(message) {
-       case WM_CREATE:
-        pChildWnd = (ChildWnd*)((MDICREATESTRUCT*)((CREATESTRUCT*)lParam)->lpCreateParams)->lParam;
-        ASSERT(pChildWnd);
-        SetWindowLong(hWnd, GWL_USERDATA, (LONG)pChildWnd);
-
-        pChildWnd->nSplitPos = 250;
-        pChildWnd->hTreeWnd = CreateTreeView(hWnd, pChildWnd, TREE_WINDOW);
-        pChildWnd->hListWnd = CreateListView(hWnd, pChildWnd/*, pChildWnd->szPath*/, LIST_WINDOW);
-               //return -1; // terminate window creation on error
-               break;
-    case WM_PAINT:
-        OnPaint(hWnd, pChildWnd);
-        return 0;
-       case WM_NCDESTROY:
-//             free_child_window(pChildWnd);
-               SetWindowLong(hWnd, GWL_USERDATA, 0);
-               break;
-       case WM_SETCURSOR:
-               if (LOWORD(lParam) == HTCLIENT) {
-                       POINT pt;
-                       GetCursorPos(&pt);
-                       ScreenToClient(hWnd, &pt);
-                       if (pt.x>=pChildWnd->nSplitPos-SPLIT_WIDTH/2 && pt.x<pChildWnd->nSplitPos+SPLIT_WIDTH/2+1) {
-                               SetCursor(LoadCursor(0, IDC_SIZEWE));
-                               return TRUE;
-                       }
-               }
-               goto def;
-       case WM_LBUTTONDOWN: {
-               RECT rt;
-               int x = LOWORD(lParam);
-               GetClientRect(hWnd, &rt);
-               if (x>=pChildWnd->nSplitPos-SPLIT_WIDTH/2 && x<pChildWnd->nSplitPos+SPLIT_WIDTH/2+1) {
-                       pChildWnd->last_split = pChildWnd->nSplitPos;
-                       draw_splitbar(hWnd, pChildWnd->last_split);
-                       SetCapture(hWnd);
-               }
-               break;}
-
-       case WM_LBUTTONUP:
-               if (GetCapture() == hWnd) {
-                       RECT rt;
-                       int x = LOWORD(lParam);
-                       draw_splitbar(hWnd, pChildWnd->last_split);
-                       pChildWnd->last_split = -1;
-                       GetClientRect(hWnd, &rt);
-                       pChildWnd->nSplitPos = x;
-                       ResizeWnd(pChildWnd, rt.right, rt.bottom);
-                       ReleaseCapture();
-               }
-               break;
-
-       case WM_CAPTURECHANGED:
-               if (GetCapture()==hWnd && pChildWnd->last_split>=0)
-                       draw_splitbar(hWnd, pChildWnd->last_split);
-               break;
-
-    case WM_KEYDOWN:
-               if (wParam == VK_ESCAPE)
-                       if (GetCapture() == hWnd) {
-                               RECT rt;
-                               draw_splitbar(hWnd, pChildWnd->last_split);
-                               GetClientRect(hWnd, &rt);
-                ResizeWnd(pChildWnd, rt.right, rt.bottom);
-                               pChildWnd->last_split = -1;
-                               ReleaseCapture();
-                               SetCursor(LoadCursor(0, IDC_ARROW));
-                       }
-               break;
-
-       case WM_MOUSEMOVE:
-               if (GetCapture() == hWnd) {
-                       RECT rt;
-                       int x = LOWORD(lParam);
-                       HDC hdc = GetDC(hWnd);
-                       GetClientRect(hWnd, &rt);
-                       rt.left = pChildWnd->last_split-SPLIT_WIDTH/2;
-                       rt.right = pChildWnd->last_split+SPLIT_WIDTH/2+1;
-                       InvertRect(hdc, &rt);
-                       pChildWnd->last_split = x;
-                       rt.left = x-SPLIT_WIDTH/2;
-                       rt.right = x+SPLIT_WIDTH/2+1;
-                       InvertRect(hdc, &rt);
-                       ReleaseDC(hWnd, hdc);
-               }
-               break;
-
-       case WM_SETFOCUS:
-               SetCurrentDirectory(pChildWnd->szPath);
-               SetFocus(pChildWnd->nFocusPanel? pChildWnd->hListWnd: pChildWnd->hTreeWnd);
-               break;
-
-       case WM_DISPATCH_COMMAND:
-        if (_CmdWndProc(hWnd, message, wParam, lParam)) break;
-        if (1) {
-            return SendMessage(pChildWnd->hListWnd, message, wParam, lParam);
-        } else {
-            return SendMessage(pChildWnd->hTreeWnd, message, wParam, lParam);
-        }
-               break;
-
-       case WM_COMMAND:
-        if (_CmdWndProc(hWnd, message, wParam, lParam)) break;
-                       return DefMDIChildProc(hWnd, message, wParam, lParam);
-
-//        if (LOWORD(wParam) > ID_CMD_FIRST && LOWORD(wParam) < ID_CMD_LAST) {
-//            if (!SendMessage(pChildWnd->hListWnd, message, wParam, lParam)) {
-//                return DefMDIChildProc(hWnd, message, wParam, lParam);
-//            }
-//        } else {
-//             return _CmdWndProc(hWnd, message, wParam, lParam);
-//        }
-               break;
-       case WM_NOTIFY:
-
-               if (!OnNotify(hWnd, wParam, lParam)) {
-            return DefMDIChildProc(hWnd, message, wParam, lParam);
-               }
-/*
-        {
-        int idCtrl = (int)wParam;
-               //NMHDR* pnmh = (NMHDR*)lParam;
-               //return pane_notify(pnmh->idFrom==IDW_HEADER_LEFT? &pChildWnd->left: &pChildWnd->right, pnmh);
-        if ((int)wParam == TREE_WINDOW) {
-            if ((((LPNMHDR)lParam)->code) == TVN_SELCHANGED) {
-                Entry* entry = (Entry*)((NMTREEVIEW*)lParam)->itemNew.lParam;
-                if (entry != NULL) {
-                    //RefreshList(pChildWnd->hListWnd, entry);
-                    //void set_curdir(ChildWnd* child, Entry* entry)
-                    set_curdir(pChildWnd, entry);
-                }
-            }
-            if (!SendMessage(pChildWnd->hTreeWnd, message, wParam, lParam)) {
-                return DefMDIChildProc(hWnd, message, wParam, lParam);
-            }
-        } else
-        if ((int)wParam == LIST_WINDOW) {
-            if (!SendMessage(pChildWnd->hListWnd, message, wParam, lParam)) {
-                return DefMDIChildProc(hWnd, message, wParam, lParam);
-            }
-        }
-        }
-*/
-        break;
-
-       case WM_SIZE:
-        if (wParam != SIZE_MINIMIZED && pChildWnd != NULL) {
-               ResizeWnd(pChildWnd, LOWORD(lParam), HIWORD(lParam));
-        }
-        // fall through
-    default: def:
-               return DefMDIChildProc(hWnd, message, wParam, lParam);
-       }
-       return 0;
-}
-
-ATOM RegisterChildWnd(HINSTANCE hInstance, int res_id)
-{
-       WNDCLASSEX wcFrame = {
-               sizeof(WNDCLASSEX),
-               CS_HREDRAW | CS_VREDRAW/*style*/,
-               FrameWndProc,
-               0/*cbClsExtra*/,
-               0/*cbWndExtra*/,
-               hInstance,
-               LoadIcon(hInstance, MAKEINTRESOURCE(IDI_WINFILE)),
-               LoadCursor(0, IDC_ARROW),
-               0/*hbrBackground*/,
-               0/*lpszMenuName*/,
-               szFrameClass,
-               (HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDI_WINFILE), IMAGE_ICON,
-                       GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED)
-       };
-       ATOM hFrameWndClass = RegisterClassEx(&wcFrame); // register frame window class
-    return hFrameWndClass;
-}
diff --git a/rosapps/winfile/childwnd.h b/rosapps/winfile/childwnd.h
deleted file mode 100644 (file)
index 6263c55..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  childwnd.h
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __CHILDWND_H__
-#define __CHILDWND_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-LRESULT CALLBACK ChildWndProc(HWND, UINT, WPARAM, LPARAM);
-
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __CHILDWND_H__
diff --git a/rosapps/winfile/debug.c b/rosapps/winfile/debug.c
deleted file mode 100644 (file)
index 1c72ca9..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *  ReactOS Application Debug Routines
- *
- *  debug.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <commctrl.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <memory.h>
-#include <tchar.h>
-#include <process.h>
-#include <stdio.h>
-
-#include "main.h"
-#include "debug.h"
-
diff --git a/rosapps/winfile/debug.h b/rosapps/winfile/debug.h
deleted file mode 100644 (file)
index 97e5243..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- *  ReactOS Application Debug Routines
- *
- *  debug.h
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __DEBUG_H__
-#define __DEBUG_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __DEBUG_H__
diff --git a/rosapps/winfile/dialogs.c b/rosapps/winfile/dialogs.c
deleted file mode 100644 (file)
index f0e5197..0000000
+++ /dev/null
@@ -1,528 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  dialogs.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <commctrl.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <memory.h>
-#include <tchar.h>
-#include <process.h>
-#include <stdio.h>
-
-#include <shellapi.h>
-//#include <winspool.h>
-#include <windowsx.h>
-#include <shellapi.h>
-#include <ctype.h>
-#include <assert.h>
-#define ASSERT assert
-
-#include "main.h"
-#include "about.h"
-#include "dialogs.h"
-#include "settings.h"
-#include "utils.h"
-#include "debug.h"
-
-
-BOOL CALLBACK ExecuteDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
-{
-       static struct ExecuteDialog* dlg;
-
-       switch(message) {
-               case WM_INITDIALOG:
-                       dlg = (struct ExecuteDialog*) lParam;
-                       return 1;
-
-               case WM_COMMAND: {
-                       int id = (int)wParam;
-
-                       if (id == IDOK) {
-                               GetWindowText(GetDlgItem(hDlg, 201), dlg->cmd, MAX_PATH);
-                               dlg->cmdshow = Button_GetState(GetDlgItem(hDlg,214))&BST_CHECKED?
-                                                                                               SW_SHOWMINIMIZED: SW_SHOWNORMAL;
-                               EndDialog(hDlg, id);
-                       } else if (id == IDCANCEL)
-                               EndDialog(hDlg, id);
-
-                       return 1;}
-       }
-
-       return 0;
-}
-
-
-BOOL CALLBACK OptionsConfirmationWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
-{
-       static struct ExecuteDialog* dlg;
-       int id;
-
-       switch (message) {
-       case WM_INITDIALOG:
-               dlg = (struct ExecuteDialog*) lParam;
-        Button_SetCheck(GetDlgItem(hDlg,IDC_CONFIRMATION_FILE_DELETE),   Confirmation & CONFIRM_FILE_DELETE ? BST_CHECKED : BST_UNCHECKED);
-        Button_SetCheck(GetDlgItem(hDlg,IDC_CONFIRMATION_DIR_DELETE),    Confirmation & CONFIRM_DIR_DELETE ? BST_CHECKED : BST_UNCHECKED);
-        Button_SetCheck(GetDlgItem(hDlg,IDC_CONFIRMATION_FILE_REPLACE),  Confirmation & CONFIRM_FILE_REPLACE ? BST_CHECKED : BST_UNCHECKED);
-        Button_SetCheck(GetDlgItem(hDlg,IDC_CONFIRMATION_MOUSE_ACTIONS), Confirmation & CONFIRM_MOUSE_ACTIONS ? BST_CHECKED : BST_UNCHECKED);
-        Button_SetCheck(GetDlgItem(hDlg,IDC_CONFIRMATION_DISK_COMMANDS), Confirmation & CONFIRM_DISK_COMMANDS ? BST_CHECKED : BST_UNCHECKED);
-        Button_SetCheck(GetDlgItem(hDlg,IDC_CONFIRMATION_MODIFY_SYSTEM), Confirmation & CONFIRM_MODIFY_SYSTEM ? BST_CHECKED : BST_UNCHECKED);
-               return 1;
-       case WM_COMMAND:
-               id = (int)wParam;
-               if (id == IDOK) {
-                       GetWindowText(GetDlgItem(hDlg, 201), dlg->cmd, MAX_PATH);
-                       dlg->cmdshow = Button_GetState(GetDlgItem(hDlg,214))&BST_CHECKED?SW_SHOWMINIMIZED: SW_SHOWNORMAL;
-
-            if (Button_GetState(GetDlgItem(hDlg,IDC_CONFIRMATION_FILE_DELETE)) & BST_CHECKED)
-                 Confirmation |= CONFIRM_FILE_DELETE;
-            else Confirmation &= ~CONFIRM_FILE_DELETE;
-            if (Button_GetState(GetDlgItem(hDlg,IDC_CONFIRMATION_DIR_DELETE)) & BST_CHECKED)
-                 Confirmation |= CONFIRM_DIR_DELETE;
-            else Confirmation &= ~CONFIRM_DIR_DELETE;
-            if (Button_GetState(GetDlgItem(hDlg,IDC_CONFIRMATION_FILE_REPLACE)) & BST_CHECKED)
-                 Confirmation |= CONFIRM_FILE_REPLACE;
-            else Confirmation &= ~CONFIRM_FILE_REPLACE;
-            if (Button_GetState(GetDlgItem(hDlg,IDC_CONFIRMATION_MOUSE_ACTIONS)) & BST_CHECKED)
-                 Confirmation |= CONFIRM_MOUSE_ACTIONS;
-            else Confirmation &= ~CONFIRM_MOUSE_ACTIONS;
-            if (Button_GetState(GetDlgItem(hDlg,IDC_CONFIRMATION_DISK_COMMANDS)) & BST_CHECKED)
-                 Confirmation |= CONFIRM_DISK_COMMANDS;
-            else Confirmation &= ~CONFIRM_DISK_COMMANDS;
-            if (Button_GetState(GetDlgItem(hDlg,IDC_CONFIRMATION_MODIFY_SYSTEM)) & BST_CHECKED)
-                 Confirmation |= CONFIRM_MODIFY_SYSTEM;
-            else Confirmation &= ~CONFIRM_MODIFY_SYSTEM;
-
-                       EndDialog(hDlg, id);
-               } else if (id == IDCANCEL)
-                       EndDialog(hDlg, id);
-               return 1;
-       }
-       return 0;
-}
-
-
-BOOL CALLBACK ViewFileTypeWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
-{
-       static struct ExecuteDialog* dlg;
-       int id;
-
-       switch (message) {
-       case WM_INITDIALOG:
-               dlg = (struct ExecuteDialog*)lParam;
-        Button_SetCheck(GetDlgItem(hDlg,IDC_VIEW_TYPE_DIRECTORIES), ViewType & VIEW_DIRECTORIES ? BST_CHECKED : BST_UNCHECKED);
-        Button_SetCheck(GetDlgItem(hDlg,IDC_VIEW_TYPE_PROGRAMS),    ViewType & VIEW_PROGRAMS    ? BST_CHECKED : BST_UNCHECKED);
-        Button_SetCheck(GetDlgItem(hDlg,IDC_VIEW_TYPE_DOCUMENTS),   ViewType & VIEW_DOCUMENTS   ? BST_CHECKED : BST_UNCHECKED);
-        Button_SetCheck(GetDlgItem(hDlg,IDC_VIEW_TYPE_OTHERS),      ViewType & VIEW_OTHER       ? BST_CHECKED : BST_UNCHECKED);
-        Button_SetCheck(GetDlgItem(hDlg,IDC_VIEW_TYPE_SYSFILES),    ViewType & VIEW_SYSTEM      ? BST_CHECKED : BST_UNCHECKED);
-               return 1;
-       case WM_COMMAND:
-               id = (int)wParam;
-               if (id == IDOK) {
-                       GetWindowText(GetDlgItem(hDlg, 201), dlg->cmd, MAX_PATH);
-                       dlg->cmdshow = Button_GetState(GetDlgItem(hDlg,214))&BST_CHECKED?SW_SHOWMINIMIZED: SW_SHOWNORMAL;
-
-            if (Button_GetState(GetDlgItem(hDlg,IDC_VIEW_TYPE_DIRECTORIES)) & BST_CHECKED)
-                 ViewType |= VIEW_DIRECTORIES;
-            else ViewType &= ~VIEW_DIRECTORIES;
-            if (Button_GetState(GetDlgItem(hDlg,IDC_VIEW_TYPE_PROGRAMS)) & BST_CHECKED)
-                 ViewType |= VIEW_PROGRAMS;
-            else ViewType &= ~VIEW_PROGRAMS;
-            if (Button_GetState(GetDlgItem(hDlg,IDC_VIEW_TYPE_DOCUMENTS)) & BST_CHECKED)
-                 ViewType |= VIEW_DOCUMENTS;
-            else ViewType &= ~VIEW_DOCUMENTS;
-            if (Button_GetState(GetDlgItem(hDlg,IDC_VIEW_TYPE_OTHERS)) & BST_CHECKED)
-                 ViewType |= VIEW_OTHER;
-            else ViewType &= ~VIEW_OTHER;
-            if (Button_GetState(GetDlgItem(hDlg,IDC_VIEW_TYPE_SYSFILES)) & BST_CHECKED)
-                 ViewType |= VIEW_SYSTEM;
-            else ViewType &= ~VIEW_SYSTEM;
-                       EndDialog(hDlg, id);
-        } else if (id == IDCANCEL)
-                       EndDialog(hDlg, id);
-       return 1;
-       }
-       return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-/*
-TotalFileSize           [in] Specifies the total size of the file, in bytes.
-TotalBytesTransferred   [in] Specifies the total number of bytes transferred from the source file to the destination file since the copy operation began.
-StreamSize              [in] Specifies the total size of the current file stream, in bytes.
-StreamBytesTransferred  [in] Specifies the total number of bytes in the current stream that have been transferred from the source file to the destination file since the copy operation began.
-dwStreamNumber          [in] Handle to the current stream. The stream number is 1 the first time CopyProgressRoutine is called.
-dwCallbackReason        [in] Specifies the reason that CopyProgressRoutine was called. This parameter can be one of the following values. Value Meaning
-                             CALLBACK_CHUNK_FINISHED Another part of the data file was copied.
-                             CALLBACK_STREAM_SWITCH  Another stream was created and is about to be copied. This is the callback reason given when the callback routine is first invoked.
-hSourceFile             [in] Handle to the source file.
-hDestinationFile        [in] Handle to the destination file
-lpData                  [in] The argument passed to CopyProgressRoutine by the CopyFileEx or MoveFileWithProgress function.
-
-Return Values           The CopyProgressRoutine function should return one of the following values.
-  Value Meaning
-         PROGRESS_CONTINUE Continue the copy operation.
-         PROGRESS_CANCEL Cancel the copy operation and delete the destination file.
-         PROGRESS_STOP Stop the copy operation. It can be restarted at a later time.
-         PROGRESS_QUIET Continue the copy operation, but stop invoking CopyProgressRoutine to report progress.
- */
-DWORD CALLBACK CopyProgressRoutine(
-  LARGE_INTEGER TotalFileSize,          // file size
-  LARGE_INTEGER TotalBytesTransferred,  // bytes transferred
-  LARGE_INTEGER StreamSize,             // bytes in stream
-  LARGE_INTEGER StreamBytesTransferred, // bytes transferred for stream
-  DWORD dwStreamNumber,                 // current stream
-  DWORD dwCallbackReason,               // callback reason
-  HANDLE hSourceFile,                   // handle to source file
-  HANDLE hDestinationFile,              // handle to destination file
-  LPVOID lpData                         // from CopyFileEx
-)
-{
-    return 0L;
-}
-
-BOOL CALLBACK MoveFileWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
-{
-       static struct ExecuteDialog* dlg;
-       int id;
-    TCHAR buffer_from[1000];
-    TCHAR buffer_to[1000];
-
-       switch (message) {
-       case WM_INITDIALOG:
-               dlg = (struct ExecuteDialog*)lParam;
-
-        _tcscpy(buffer_from, _T("C:\\TEMP\\API_SPY\\TEMP\\foobar.txt"));
-        SetDlgItemText(hDlg, IDC_FILE_MOVE_FROM, buffer_from);
-        _tcscpy(buffer_to, _T("C:\\TEMP\\API_SPY\\TEMP\\foobar2.txt"));
-        SetDlgItemText(hDlg, IDC_FILE_MOVE_TO, buffer_to);
-/*
-        Button_SetCheck(GetDlgItem(hDlg,IDC_VIEW_TYPE_DIRECTORIES), ViewType & VIEW_DIRECTORIES ? BST_CHECKED : BST_UNCHECKED);
- */
-               return 1;
-       case WM_COMMAND:
-               id = (int)wParam;
-               if (id == IDOK) {
-            LPVOID lpData = NULL;                     // parameter for callback
-            DWORD dwFlags = MOVEFILE_COPY_ALLOWED;    // move options
-
-            GetDlgItemText(hDlg, IDC_FILE_MOVE_FROM, buffer_from, sizeof(buffer_from)/sizeof(TCHAR));
-            GetDlgItemText(hDlg, IDC_FILE_MOVE_TO, buffer_to, sizeof(buffer_to)/sizeof(TCHAR));
-/*
-BOOL MoveFileWithProgress(
-  LPCTSTR lpExistingFileName,            // file name
-  LPCTSTR lpNewFileName,                 // new file name
-  LPPROGRESS_ROUTINE lpProgressRoutine,  // callback function
-  LPVOID lpData,                         // parameter for callback
-  DWORD dwFlags                          // move options
-);
- */
-//            if (!MoveFileWithProgress(buffer_from, buffer_to, &CopyProgressRoutine, lpData, dwFlags)) {
-            if (!MoveFileEx(buffer_from, buffer_to, dwFlags)) {
-                DWORD err = GetLastError();
-                HLOCAL hMem;
-                if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0, (LPTSTR)&hMem, 10, NULL)) {
-                    MessageBox(hDlg, hMem, szTitle, MB_OK);
-                    LocalFree(hMem);
-                } else {
-                    MessageBox(hDlg, _T("Unknown Error"), szTitle, MB_OK);
-                }
-            }
-
-                       EndDialog(hDlg, id);
-        } else if (id == IDCANCEL)
-                       EndDialog(hDlg, id);
-       return 1;
-       }
-       return 0;
-}
-
-
-/*
-extern TCHAR ViewTypeMaskStr[MAX_TYPE_MASK_LEN];
- */
-
-void ShowFixedFileInfo(HWND hDlg, VS_FIXEDFILEINFO* pFixedFileInfo)
-{
-    TCHAR* str = NULL;
-
-    switch (pFixedFileInfo->dwFileType) {
-    case VFT_UNKNOWN:    str = _T("The file type is unknown to the system."); break;
-    case VFT_APP:        str = _T("The file contains an application."); break;
-    case VFT_DLL:        str = _T("The file contains a dynamic-link library (DLL)."); break;
-    case VFT_DRV:
-        str = _T("The file contains a device driver. If dwFileType is VFT_DRV, dwFileSubtype contains a more specific description of the driver.");
-        switch (pFixedFileInfo->dwFileSubtype) {
-        case VFT2_UNKNOWN: str = _T("The driver type is unknown by the system."); break;
-        case VFT2_DRV_COMM: str = _T("The file contains a communications driver."); break;
-        case VFT2_DRV_PRINTER: str = _T("The file contains a printer driver."); break;
-        case VFT2_DRV_KEYBOARD: str = _T("The file contains a keyboard driver"); break;
-        case VFT2_DRV_LANGUAGE: str = _T("The file contains a language driver"); break;
-        case VFT2_DRV_DISPLAY: str = _T("The file contains a display driver"); break;
-        case VFT2_DRV_MOUSE: str = _T("The file contains a mouse driver"); break;
-        case VFT2_DRV_NETWORK: str = _T("The file contains a network driver"); break;
-        case VFT2_DRV_SYSTEM: str = _T("The file contains a system driver"); break;
-        case VFT2_DRV_INSTALLABLE: str = _T("The file contains an installable driver"); break;
-        case VFT2_DRV_SOUND: str = _T("The file contains a sound driver"); break;
-        }
-        break;
-    case VFT_FONT:
-        str = _T("The file contains a font. If dwFileType is VFT_FONT, dwFileSubtype contains a more specific description of the font file.");
-        switch (pFixedFileInfo->dwFileSubtype) {
-        case VFT2_UNKNOWN: str = _T("The font type is unknown the system."); break;
-        case VFT2_FONT_RASTER: str = _T("The file contains a raster font."); break;
-        case VFT2_FONT_VECTOR: str = _T("The file contains a vector font."); break;
-        case VFT2_FONT_TRUETYPE: str = _T("The file contains a TrueType font."); break;
-
-        }
-        break;
-    case VFT_VXD:        str = _T("The file contains a virtual device."); break;
-    case VFT_STATIC_LIB: str = _T("The file contains a static-link library."); break;
-    }
-    if (str != NULL) {
-        SetDlgItemText(hDlg, IDC_STATIC_PROP_VERSION, str);
-//        SetDlgItemText(hDlg, IDC_STATIC_PROP_COPYRIGHT, pVersionData);
-    }
-}
-
-// Structure used to store enumerated languages and code pages.
-struct LANGANDCODEPAGE {
-    WORD wLanguage;
-    WORD wCodePage;
-} *lpTranslate;
-
-void AddFileInfoValue(HWND hDlg, void* pVersionData, struct LANGANDCODEPAGE lpTranslate, UINT i, LPCTSTR info_str)
-{
-    TCHAR SubBlock[200];
-    TCHAR* pVal;
-    UINT nValLen;
-
-    wsprintf(SubBlock, TEXT("\\StringFileInfo\\%04x%04x\\%s"),
-             lpTranslate.wLanguage, lpTranslate.wCodePage, info_str);
-    // Retrieve file description for language and code page "i".
-    if (VerQueryValue(pVersionData, SubBlock, (PVOID)&pVal, &nValLen)) {
-        ListBox_InsertItemData(GetDlgItem(hDlg, IDC_LIST_PROP_VERSION_TYPES), i, info_str);
-//             ListBox_InsertItemData(pane->hwnd, idx, entry);
-        SendMessage(GetDlgItem(hDlg, IDC_LIST_PROP_VERSION_VALUES), WM_SETTEXT, 0, (LPARAM)pVal);
-    }
-}
-
-static TCHAR* InfoStrings[] = {
-                TEXT("Comments"),
-                TEXT("InternalName"),
-                TEXT("ProductName"),
-                TEXT("CompanyName"),
-                TEXT("LegalCopyright"),
-                TEXT("ProductVersion"),
-                TEXT("FileDescription"),
-                TEXT("LegalTrademarks"),
-                TEXT("PrivateBuild"),
-                TEXT("FileVersion"),
-                TEXT("OriginalFilename"),
-                TEXT("SpecialBuild"),
-                TEXT(""),
-                NULL
-};
-
-void SelectVersionString(HWND hDlg, LPARAM lParam)
-{
-    int idx;
-
-//     idx = ListBox_FindItemData(hwnd, , child->left.cur);
-       idx = ListBox_GetCurSel(GetDlgItem(hDlg, IDC_LIST_PROP_VERSION_TYPES));
-
-       //Entry* entry = (Entry*) ListBox_GetItemData(GetDlgItem(hDlg, IDC_LIST_PROP_VERSION_TYPES), idx);
-
-//        SendMessage(GetDlgItem(hDlg, IDC_LIST_PROP_VERSION_VALUES), WM_SETTEXT, 0, (LPARAM)pVal);
-
-//     ListBox_SetCurSel(GetDlgItem(hDlg, IDC_LIST_PROP_VERSION_TYPES), idx);
-
-//    ListBox_InsertItemData(GetDlgItem(hDlg, IDC_LIST_PROP_VERSION_TYPES), i, _T("FileDescription"));
-//    SendMessage(GetDlgItem(hDlg, IDC_LIST_PROP_VERSION_VALUES), WM_SETTEXT, 0, pVal);
-
-}
-
-void CheckForFileInfo(HWND hDlg, TCHAR* strFilename)
-{
-    TCHAR SubBlock[200];
-    UINT i;
-    DWORD dwHandle;
-    DWORD dwVersionDataLen = GetFileVersionInfoSize(strFilename, &dwHandle);
-    if (dwVersionDataLen != 0L) {
-        void* pVersionData = malloc(dwVersionDataLen);
-        if (GetFileVersionInfo(strFilename, 0, dwVersionDataLen, pVersionData)) {
-            TCHAR* pVal;
-            UINT nValLen;
-//            LPTSTR SubBlock = _T("\\");
-            _tcscpy(SubBlock, TEXT("\\"));
-            if (VerQueryValue(pVersionData, SubBlock, (PVOID)&pVal, &nValLen)) {
-                if (nValLen == sizeof(VS_FIXEDFILEINFO)) {
-                    ShowFixedFileInfo(hDlg, (VS_FIXEDFILEINFO*)pVal);
-                }
-            }
-#if 1
-            {
-
-    // Read the list of languages and code pages.
-    _tcscpy(SubBlock, TEXT("\\VarFileInfo\\Translation"));
-    if (VerQueryValue(pVersionData, SubBlock, (LPVOID*)&pVal, &nValLen)) {
-        // Read the file description for each language and code page.
-        for (i = 0; i < (nValLen/sizeof(struct LANGANDCODEPAGE)); i++) {
-            int j = 0;
-            TCHAR* pInfoString;
-            while (pInfoString = InfoStrings[j]) {
-                if (pInfoString != NULL && _tcslen(pInfoString)) {
-                    struct LANGANDCODEPAGE* lpTranslate = (struct LANGANDCODEPAGE*)pVal;
-                    AddFileInfoValue(hDlg, pVersionData, lpTranslate[i],
-                                     j, pInfoString);
-                }
-                ++j;
-            }
-//            lpTranslate = (struct LANGANDCODEPAGE*)pVal;
-/*
-            wsprintf(SubBlock, TEXT("\\StringFileInfo\\%04x%04x\\FileDescription"),
-                     lpTranslate[i].wLanguage, lpTranslate[i].wCodePage);
-            // Retrieve file description for language and code page "i".
-            if (VerQueryValue(pVersionData, SubBlock, &pVal, &nValLen)) {
-                ListBox_InsertItemData(GetDlgItem(hDlg, IDC_LIST_PROP_VERSION_TYPES), i, _T("FileDescription"));
-                SendMessage(GetDlgItem(hDlg, IDC_LIST_PROP_VERSION_VALUES), WM_SETTEXT, 0, pVal);
-            }
- */
-        }
-    }
-            }
-#endif
-        }
-        free(pVersionData);
-    }
-}
-
-BOOL CALLBACK PropertiesDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
-{
-       static struct PropertiesDialog* dlg;
-    SYSTEMTIME SystemTime;
-    FILETIME LocalFileTime;
-    TCHAR buffer[MAX_PATH];
-    TCHAR text[100];
-       int id;
-    int offset;
-    DWORD dwFileAttributes;
-    Entry* entry;
-
-       switch (message) {
-       case WM_INITDIALOG:
-               dlg = (struct PropertiesDialog*)lParam;
-        ASSERT(dlg);
-        entry = ((struct PropertiesDialog*)lParam)->pEntry;
-        ASSERT(entry);
-
-        GetWindowText(hDlg, text, sizeof(text)/sizeof(TCHAR));
-        wsprintf(buffer, text, dlg->pEntry->data.cFileName);
-        SetWindowText(hDlg, buffer);
-        SetDlgItemText(hDlg, IDC_STATIC_PROP_FILENAME, dlg->pEntry->data.cFileName);
-        SetDlgItemText(hDlg, IDC_STATIC_PROP_PATH, dlg->pEntry->data.cAlternateFileName);
-
-        if (entry->bhfi_valid) {
-            NUMBERFMT numFmt;
-            memset(&numFmt, 0, sizeof(numFmt));
-            numFmt.NumDigits = 0;
-            numFmt.LeadingZero = 0;
-            numFmt.Grouping = 3;
-            numFmt.lpDecimalSep = _T(".");
-            numFmt.lpThousandSep = _T(",");
-            numFmt.NegativeOrder = 0;
-
-            //entry->bhfi.nFileSizeLow;
-            //entry->bhfi.nFileSizeHigh;
-            //entry->bhfi.ftCreationTime
-            wsprintf(buffer, _T("%u"), entry->bhfi.nFileSizeLow);
-            if (GetNumberFormat(LOCALE_USER_DEFAULT, 0, buffer, &numFmt,
-                    buffer + MAX_PATH/2, MAX_PATH/2)) {
-                SetDlgItemText(hDlg, IDC_STATIC_PROP_SIZE, buffer + MAX_PATH/2);
-            } else {
-                SetDlgItemText(hDlg, IDC_STATIC_PROP_SIZE, buffer);
-            }
-        } else {
-        }
-
-        SetDlgItemText(hDlg, IDC_STATIC_PROP_LASTCHANGE, _T("Date?"));
-        if (FileTimeToLocalFileTime(&entry->bhfi.ftLastWriteTime, &LocalFileTime)) {
-            if (FileTimeToSystemTime(&LocalFileTime, &SystemTime)) {
-                if (GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &SystemTime, NULL, buffer, sizeof(buffer)/sizeof(TCHAR))) {
-//                    SetDlgItemText(hDlg, IDC_STATIC_PROP_LASTCHANGE, buffer);
-                }
-            }
-        }
-        _tcscat(buffer, _T("  "));
-        offset = _tcslen(buffer);
-
-        if (FileTimeToLocalFileTime(&entry->bhfi.ftLastWriteTime, &LocalFileTime)) {
-            if (FileTimeToSystemTime(&LocalFileTime, &SystemTime)) {
-                if (GetTimeFormat(LOCALE_USER_DEFAULT, 0, &SystemTime, NULL, buffer + offset, sizeof(buffer)/sizeof(TCHAR) - offset)) {
-                    SetDlgItemText(hDlg, IDC_STATIC_PROP_LASTCHANGE, buffer);
-                }
-            }
-        }
-
-        dwFileAttributes = dlg->pEntry->bhfi.dwFileAttributes;
-        Button_SetCheck(GetDlgItem(hDlg,IDC_CHECK_READONLY), dwFileAttributes & FILE_ATTRIBUTE_READONLY ? BST_CHECKED : BST_UNCHECKED);
-        Button_SetCheck(GetDlgItem(hDlg,IDC_CHECK_ARCHIVE), dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE ? BST_CHECKED : BST_UNCHECKED);
-        Button_SetCheck(GetDlgItem(hDlg,IDC_CHECK_COMPRESSED), dwFileAttributes & FILE_ATTRIBUTE_COMPRESSED ? BST_CHECKED : BST_UNCHECKED);
-        Button_SetCheck(GetDlgItem(hDlg,IDC_CHECK_HIDDEN), dwFileAttributes & FILE_ATTRIBUTE_HIDDEN ? BST_CHECKED : BST_UNCHECKED);
-        Button_SetCheck(GetDlgItem(hDlg,IDC_CHECK_SYSTEM), dwFileAttributes & FILE_ATTRIBUTE_SYSTEM ? BST_CHECKED : BST_UNCHECKED);
-
-        CheckForFileInfo(hDlg, dlg->pEntry->data.cFileName);
-               return 1;
-
-       case WM_COMMAND:
-               id = (int)wParam;
-               if (id == IDOK) {
-//            LPVOID lpData = NULL;                     // parameter for callback
-//            DWORD dwFlags = MOVEFILE_COPY_ALLOWED;    // move options
-//            GetDlgItemText(hDlg, , buffer, sizeof(buffer)/sizeof(TCHAR));
-//            GetDlgItemText(hDlg, , buffer, sizeof(buffer)/sizeof(TCHAR));
-                       EndDialog(hDlg, id);
-        } else if (id == IDCANCEL) {
-                       EndDialog(hDlg, id);
-        } else {
-                       switch(HIWORD(wParam)) {
-                       case LBN_SELCHANGE:
-                if (LOWORD(wParam) == IDC_LIST_PROP_VERSION_TYPES) {
-                    SelectVersionString(hDlg, lParam);
-                }
-//                {
-//                             int idx = ListBox_GetCurSel(pane->hwnd);
-//                             Entry* entry = (Entry*) ListBox_GetItemData(pane->hwnd, idx);
-//                             if (pane == &child->left) set_curdir(child, entry);
-//                             else                      pane->cur = entry;
-//                }
-                               break;
-                       case LBN_DBLCLK:
-                               //activate_entry(child, pane);
-                               break;
-            }
-        }
-       return 1;
-       }
-       return 0;
-}
diff --git a/rosapps/winfile/dialogs.h b/rosapps/winfile/dialogs.h
deleted file mode 100644 (file)
index 0fe254a..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  dialogs.h
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __DIALOGS_H__
-#define __DIALOGS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#include "resource.h"
-
-struct ExecuteDialog {
-       TCHAR   cmd[MAX_PATH];
-       int             cmdshow;
-};
-
-struct MoveFileDialog {
-       TCHAR   cmd[MAX_PATH];
-       int             cmdshow;
-};
-
-struct PropertiesDialog {
-       TCHAR   cmd[MAX_PATH];
-       int             cmdshow;
-    Entry*  pEntry;
-};
-
-
-BOOL CALLBACK ExecuteDialogWndProc(HWND, UINT, WPARAM, LPARAM);
-BOOL CALLBACK ViewFileTypeWndProc(HWND, UINT, WPARAM, LPARAM);
-BOOL CALLBACK OptionsConfirmationWndProc(HWND, UINT, WPARAM, LPARAM);
-BOOL CALLBACK MoveFileWndProc(HWND, UINT, WPARAM, LPARAM);
-BOOL CALLBACK PropertiesDlgProc(HWND, UINT, WPARAM, LPARAM);
-
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __DIALOGS_H__
diff --git a/rosapps/winfile/draw.c b/rosapps/winfile/draw.c
deleted file mode 100644 (file)
index e8025a5..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  draw.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifdef _MSC_VER
-#include "stdafx.h"
-#else
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <commctrl.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <memory.h>
-#include <tchar.h>
-#include <process.h>
-#include <stdio.h>
-#endif
-
-#include "main.h"
-#include "draw.h"
-
-
diff --git a/rosapps/winfile/draw.h b/rosapps/winfile/draw.h
deleted file mode 100644 (file)
index 38bf1b0..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- *  ReactOS File Manager
- *
- *  draw.h
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __DRAW_H__
-#define __DRAW_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __DRAW_H__
\ No newline at end of file
diff --git a/rosapps/winfile/drivebar.c b/rosapps/winfile/drivebar.c
deleted file mode 100644 (file)
index 5ddf752..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  drivebar.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <commctrl.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <memory.h>
-#include <tchar.h>
-#include <process.h>
-#include <stdio.h>
-
-#include "main.h"
-#include "settings.h"
-#include "framewnd.h"
-#include "childwnd.h"
-
-
-////////////////////////////////////////////////////////////////////////////////
-// Global Variables:
-//
-
-
-void ConfigureDriveBar(HWND hDriveBar)
-{
-    static DWORD dwLogicalDrivesSaved;
-    DWORD dwLogicalDrives = GetLogicalDrives();
-
-    if (!hDriveBar) return;
-#ifndef __GNUC__
-    if (dwLogicalDrives != dwLogicalDrivesSaved) {
-           TBBUTTON drivebarBtn = {0, 0, TBSTATE_ENABLED, TBSTYLE_SEP};
-        COMBOBOXEXITEM cbei;
-       int btn = 1;
-           PTSTR p;
-        int count = SendMessage(hDriveBar, TB_BUTTONCOUNT, 0, 0);
-        while (count) {
-                       SendMessage(hDriveBar, TB_DELETEBUTTON, (WPARAM)--count, 0);
-        }
-        count = SendMessage(Globals.hDriveCombo, CB_GETCOUNT, 0, 0);
-        while (count) {
-//                     SendMessage(Globals.hDriveCombo, CB_DELETESTRING, (WPARAM)--count, 0);
-        }
-        SendMessage(Globals.hDriveCombo, CB_RESETCONTENT, 0, 0);
-
-        memset(Globals.drives, 0, BUFFER_LEN);
-           GetLogicalDriveStrings(BUFFER_LEN, Globals.drives);
-       drivebarBtn.fsStyle = TBSTYLE_BUTTON;
-        drivebarBtn.idCommand = ID_DRIVE_FIRST;
-               for (p = Globals.drives; *p;) {
-                        // insert drive letter
-//                     TCHAR b[3] = { tolower(*p) };
-//                     SendMessage(hDriveBar, TB_ADDSTRING, 0, (LPARAM)b);
-            TCHAR szVolumeNameBuffer[MAX_PATH];
-            TCHAR vol[MAX_PATH] = { tolower(*p) };
-                       SendMessage(hDriveBar, TB_ADDSTRING, 0, (LPARAM)vol);
-                       switch(GetDriveType(p)) {
-                       case DRIVE_REMOVABLE:   drivebarBtn.iBitmap = 1;        break;
-                       case DRIVE_CDROM:               drivebarBtn.iBitmap = 3;        break;
-                       case DRIVE_REMOTE:              drivebarBtn.iBitmap = 4;        break;
-                       case DRIVE_RAMDISK:             drivebarBtn.iBitmap = 5;        break;
-                       default:/*DRIVE_FIXED*/ drivebarBtn.iBitmap = 2;
-                       }
-                       SendMessage(hDriveBar, TB_INSERTBUTTON, btn, (LPARAM)&drivebarBtn);
-
-            vol[0] = toupper(vol[0]);
-            vol[1] = _T(':'); vol[2] = _T('\\'); vol[3] = _T('\0');
-            if (drivebarBtn.iBitmap != 1 /*DRIVE_REMOVABLE*/ &&
-              GetVolumeInformation(vol, szVolumeNameBuffer,
-              sizeof(szVolumeNameBuffer)/sizeof(TCHAR),
-              NULL, NULL, NULL, NULL, 0) &&
-              szVolumeNameBuffer[0] != _T('\0')) {
-                vol[2] = _T(' '); vol[3] = _T('['); vol[4] = _T('\0');
-                _tcscat(vol, szVolumeNameBuffer);
-                _tcscat(vol, _T("] "));
-            } else {
-                vol[2] = _T(' ');
-            }
-//            cbei.mask = CBEIF_TEXT | CBEIF_INDENT | CBEIF_IMAGE| CBEIF_SELECTEDIMAGE;
-            cbei.mask = CBEIF_TEXT/* | CBEIF_IMAGE*/;
-            cbei.iItem          = btn - 1;
-            cbei.pszText        = vol;
-            cbei.cchTextMax     = _tcslen(cbei.pszText);
-            cbei.iImage         = drivebarBtn.iBitmap;
-//            cbei.iSelectedImage = IInf[iCnt].iSelectedImage;
-//            cbei.iIndent        = IInf[iCnt].iIndent;
-            SendMessage(Globals.hDriveCombo, CBEM_INSERTITEM, 0, (LPARAM)&cbei);
-
-                       drivebarBtn.idCommand++;
-                       drivebarBtn.iString++;
-                       while(*p++);
-            ++btn;
-               }
-        dwLogicalDrivesSaved = dwLogicalDrives;
-//        SendMessage(Globals.hDriveCombo, CB_SHOWDROPDOWN, (WPARAM)TRUE, (LPARAM)0);
-    }
-#endif
-}
-/*
-#ifndef __GNUC__
-    {
-#define MAX_ITEMS 7
-
-typedef struct {
-    int iImage;
-    int iSelectedImage;
-    int iIndent;
-    LPTSTR pszText;
-} ITEMINFO, *PITEMINFO;
-
-ITEMINFO IInf[] = {
-        { 0, 3,  0, _T("A:")},
-        { 1, 4,  1, _T("C: [SYSTEM]")},
-        { 2, 5,  2, _T("D:")},
-        { 0, 3,  0, _T("E: [SOFT_RAID_1]")},
-        { 1, 4,  1, _T("F: [DATAVOL]")},
-        { 2, 5,  2, _T("sixth")},
-        { 0, 3,  0, _T("seventh")},
-};
-
-        COMBOBOXEXITEM cbei;
-        int iCnt;
-
-        for (iCnt = 0; iCnt < MAX_ITEMS; iCnt++) {
-//            cbei.mask = CBEIF_TEXT | CBEIF_INDENT | CBEIF_IMAGE| CBEIF_SELECTEDIMAGE;
-            cbei.mask = CBEIF_TEXT;
-            cbei.iItem          = iCnt;
-            cbei.pszText        = IInf[iCnt].pszText;
-//            cbei.cchTextMax     = sizeof(IInf[iCnt].pszText);
-            cbei.cchTextMax     = _tcslen(IInf[iCnt].pszText);
-//            cbei.iImage         = IInf[iCnt].iImage;
-//            cbei.iSelectedImage = IInf[iCnt].iSelectedImage;
-//            cbei.iIndent        = IInf[iCnt].iIndent;
-            SendMessage(Globals.hDriveCombo, CBEM_INSERTITEM, 0, (LPARAM)&cbei);
-        }
-    }
-}
-#endif
- */
-
-void _GetFreeSpaceEx(void)
-{
-   BOOL fResult;
-   TCHAR szDrive[MAX_PATH];
-   ULARGE_INTEGER i64FreeBytesToCaller;
-   ULARGE_INTEGER i64TotalBytes;
-   ULARGE_INTEGER i64FreeBytes;
-
-   fResult = GetDiskFreeSpaceEx(szDrive,
-                (PULARGE_INTEGER)&i64FreeBytesToCaller,
-                (PULARGE_INTEGER)&i64TotalBytes,
-                (PULARGE_INTEGER)&i64FreeBytes);
-}
-
diff --git a/rosapps/winfile/drivebar.h b/rosapps/winfile/drivebar.h
deleted file mode 100644 (file)
index ef5c50c..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *  ReactOS Application Drivebar support routines
- *
- *  drivebar.h
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __DRIVEBAR_H__
-#define __DRIVEBAR_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-void ConfigureDriveBar(HWND hDriveBar);
-
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __DRIVEBAR_H__
diff --git a/rosapps/winfile/entries.c b/rosapps/winfile/entries.c
deleted file mode 100644 (file)
index b85a949..0000000
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  entries.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <commctrl.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <memory.h>
-#include <tchar.h>
-#include <process.h>
-#include <stdio.h>
-
-#include <windowsx.h>
-
-#include "main.h"
-#include "entries.h"
-#include "utils.h"
-
-
-
-Entry* find_entry_win(Entry* parent, LPCTSTR name)
-{
-       Entry* entry;
-
-       for(entry=parent->down; entry; entry=entry->next) {
-               LPCTSTR p = name;
-               LPCTSTR q = entry->data.cFileName;
-
-               do {
-                       if (!*p || *p==_T('\\') || *p==_T('/'))
-                               return entry;
-               } while(tolower(*p++) == tolower(*q++));
-
-               p = name;
-               q = entry->data.cAlternateFileName;
-
-               do {
-                       if (!*p || *p==_T('\\') || *p==_T('/'))
-                               return entry;
-               } while(tolower(*p++) == tolower(*q++));
-       }
-
-       return 0;
-}
-
-
-Entry* read_tree_win(Root* root, LPCTSTR path, int sortOrder)
-{
-       TCHAR buffer[MAX_PATH];
-       Entry* entry = &root->entry;
-       LPCTSTR s = path;
-       PTSTR d = buffer;
-
-#ifndef _NO_EXTENSIONS
-       entry->unix_dir = FALSE;
-#endif
-
-       while(entry) {
-               while(*s && *s!=_T('\\') && *s!=_T('/'))
-                       *d++ = *s++;
-
-               while(*s==_T('\\') || *s==_T('/'))
-                       s++;
-
-               *d++ = _T('\\');
-               *d = _T('\0');
-
-               read_directory(entry, buffer, sortOrder);
-
-               if (entry->down)
-                       entry->expanded = TRUE;
-
-               if (!*s)
-                       break;
-
-               entry = find_entry_win(entry, s);
-       }
-
-       return entry;
-}
-
-
-#if !defined(_NO_EXTENSIONS) && defined(__linux__)
-
-static Entry* find_entry_unix(Entry* parent, LPCTSTR name)
-{
-       Entry* entry;
-
-       for(entry=parent->down; entry; entry=entry->next) {
-               LPCTSTR p = name;
-               LPCTSTR q = entry->data.cFileName;
-
-               do {
-                       if (!*p || *p==_T('/'))
-                               return entry;
-               } while(*p++ == *q++);
-       }
-
-       return 0;
-}
-
-static Entry* read_tree_unix(Root* root, LPCTSTR path, int sortOrder)
-{
-       TCHAR buffer[MAX_PATH];
-       Entry* entry = &root->entry;
-       LPCTSTR s = path;
-       PTSTR d = buffer;
-
-       entry->unix_dir = TRUE;
-
-       while(entry) {
-               while(*s && *s!=_T('/'))
-                       *d++ = *s++;
-
-               while(*s == _T('/'))
-                       s++;
-
-               *d++ = _T('/');
-               *d = _T('\0');
-
-               read_directory(entry, buffer, sortOrder);
-
-               if (entry->down)
-                       entry->expanded = TRUE;
-
-               if (!*s)
-                       break;
-
-               entry = find_entry_unix(entry, s);
-       }
-
-       return entry;
-}
-
-#endif
-
-
- // recursively free all child entries
-void free_entries(Entry* parent)
-{
-       Entry *entry, *next=parent->down;
-
-       if (next) {
-               parent->down = 0;
-               do {
-                       entry = next;
-                       next = entry->next;
-                       free_entries(entry);
-                       free(entry);
-               } while(next);
-       }
-}
-
-// insert listbox entries after index idx
-void insert_entries(HWND hWnd, Entry* parent, int idx)
-{
-       Entry* entry = parent;
-
-       if (!entry)
-               return;
-       ShowWindow(hWnd, SW_HIDE);
-       for(; entry; entry=entry->next) {
-#ifndef _LEFT_FILES
-               if (!(entry->data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY))
-                       continue;
-#endif
-                // don't display entries "." and ".." in the left pane
-               if ((entry->data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)
-                               && entry->data.cFileName[0]==_T('.'))
-                       if (
-#ifndef _NO_EXTENSIONS
-                               entry->data.cFileName[1]==_T('\0') ||
-#endif
-                               (entry->data.cFileName[1]==_T('.') && entry->data.cFileName[2]==_T('\0')))
-                               continue;
-               if (idx != -1)
-                       idx++;
-               ListBox_InsertItemData(hWnd, idx, entry);
-               if (entry->expanded)
-                       insert_entries(hWnd, entry->down, idx);
-       }
-       ShowWindow(hWnd, SW_SHOW);
-}
-
-
-void scan_entry(ChildWnd* child, Entry* entry)
-{
-       TCHAR path[MAX_PATH];
-/*
-       int idx = ListBox_GetCurSel(child->hTreeWnd);
-       HCURSOR crsrOld = SetCursor(LoadCursor(0, IDC_WAIT));
-
-        // delete sub entries in left pane
-       for(;;) {
-               LRESULT res = ListBox_GetItemData(child->hTreeWnd, idx+1);
-               Entry* sub = (Entry*) res;
-
-               if (res==LB_ERR || !sub || sub->level<=entry->level)
-                       break;
-
-               ListBox_DeleteString(child->hTreeWnd, idx+1);
-       }
-
-        // empty right pane
-       ListBox_ResetContent(child->hListWnd);
- */
-        // release memory
-       free_entries(entry);
-
-        // read contents from disk
-       get_path(entry, path);
-       read_directory(entry, path, child->sortOrder);
-/*
-        // insert found entries in right pane
-       insert_entries(&child->right, entry->down, -1);
-       calc_widths(&child->right, FALSE);
-#ifndef _NO_EXTENSIONS
-       set_header(&child->right);
-#endif
-
-       child->header_wdths_ok = FALSE;
-
-       SetCursor(crsrOld);
- */
-}
-
-
-// expand a directory entry
-BOOL expand_entry(ChildWnd* child, Entry* dir)
-{
-       int idx = 0;
-       Entry* p;
-
-       if (!dir || dir->expanded || !dir->down)
-               return FALSE;
-
-       p = dir->down;
-
-       if (p->data.cFileName[0]=='.' && p->data.cFileName[1]=='\0' && p->next) {
-               p = p->next;
-
-               if (p->data.cFileName[0]=='.' && p->data.cFileName[1]=='.' &&
-                               p->data.cFileName[2]=='\0' && p->next)
-                       p = p->next;
-       }
-
-        // no subdirectories ?
-       if (!(p->data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY))
-               return FALSE;
-/*
-       idx = ListBox_FindItemData(child->hTreeWnd, 0, dir);
- */
-       dir->expanded = TRUE;
-
-        // insert entries in left pane
-       insert_entries(child->hTreeWnd, p, idx);
-/*
-       if (!child->header_wdths_ok) {
-               if (calc_widths(&child->left, FALSE)) {
-#ifndef _NO_EXTENSIONS
-                       set_header(&child->left);
-#endif
-
-                       child->header_wdths_ok = TRUE;
-               }
-       }
- */
-       return TRUE;
-}
-
-
-void collapse_entry(Pane* pane, Entry* dir)
-{
-       int idx = ListBox_FindItemData(pane->hWnd, 0, dir);
-
-       ShowWindow(pane->hWnd, SW_HIDE);
-
-        // hide sub entries
-       for(;;) {
-               LRESULT res = ListBox_GetItemData(pane->hWnd, idx+1);
-               Entry* sub = (Entry*) res;
-
-               if (res==LB_ERR || !sub || sub->level<=dir->level)
-                       break;
-
-               ListBox_DeleteString(pane->hWnd, idx+1);
-       }
-
-       dir->expanded = FALSE;
-
-       ShowWindow(pane->hWnd, SW_SHOW);
-}
-
-
-void activate_entry(ChildWnd* child, Pane* pane)
-{
-       Entry* entry = pane->cur;
-
-       if (!entry)
-               return;
-
-       if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
-               int scanned_old = entry->scanned;
-
-               if (!scanned_old)
-                       scan_entry(child, entry);
-
-#ifndef _NO_EXTENSIONS
-               if (entry->data.cFileName[0]=='.' && entry->data.cFileName[1]=='\0')
-                       return;
-#endif
-/*
-               if (entry->data.cFileName[0]=='.' && entry->data.cFileName[1]=='.' && entry->data.cFileName[2]=='\0') {
-                       entry = child->left.cur->up;
-                       collapse_entry(&child->left, entry);
-                       goto focus_entry;
-               } else if (entry->expanded)
-                       collapse_entry(pane, child->left.cur);
-               else {
-                       expand_entry(child, child->left.cur);
-
-                       if (!pane->treePane) focus_entry: {
-                               int idx = ListBox_FindItemData(child->hTreeWnd, ListBox_GetCurSel(child->hTreeWnd), entry);
-                               ListBox_SetCurSel(child->hTreeWnd, idx);
-                               set_curdir(child, entry);
-                       }
-               }
- */
-               if (!scanned_old) {
-                       calc_widths(pane, FALSE);
-#ifndef _NO_EXTENSIONS
-                       set_header(pane);
-#endif
-               }
-       } else {
-
-               //TODO: start program, open document...
-
-       }
-}
diff --git a/rosapps/winfile/entries.h b/rosapps/winfile/entries.h
deleted file mode 100644 (file)
index ebe20e6..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  entries.h
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __ENTRIES_H__
-#define __ENTRIES_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-typedef struct _Entry {
-       struct _Entry*  next;
-       struct _Entry*  down;
-       struct _Entry*  up;
-
-       BOOL    expanded;
-       BOOL    scanned;
-       int             level;
-
-       WIN32_FIND_DATA data;
-    HTREEITEM hTreeItem;
-
-#ifndef _NO_EXTENSIONS
-       BY_HANDLE_FILE_INFORMATION bhfi;
-       BOOL    bhfi_valid;
-       BOOL    unix_dir;
-#endif
-} Entry;
-
-
-typedef enum {
-       SORT_NAME,
-       SORT_EXT,
-       SORT_SIZE,
-       SORT_DATE
-} SORT_ORDER;
-
-//enum SORT_ORDER { SORT_BY_NAME, SORT_BY_TYPE, SORT_BY_SIZE, SORT_BY_DATE };
-
-typedef struct {
-       Entry   entry;
-       TCHAR   path[MAX_PATH];
-       TCHAR   volname[_MAX_FNAME];
-       TCHAR   fs[_MAX_DIR];
-       DWORD   drive_type;
-       DWORD   fs_flags;
-} Root;
-
-
-typedef struct {
-       HWND    hWnd;
-
-#ifndef _NO_EXTENSIONS
-#define        COLUMNS 10
-#else
-#define        COLUMNS 5
-#endif
-       int             widths[COLUMNS];
-       int             positions[COLUMNS+1];
-
-       Entry*  root;
-       Entry*  cur;
-} Pane;
-
-typedef struct {
-       HWND    hWnd;
-    HWND    hTreeWnd;
-    HWND    hListWnd;
-    int     nFocusPanel;      // 0: left  1: right
-       int             nSplitPos;
-       WINDOWPLACEMENT pos;
-       TCHAR   szPath[MAX_PATH];
-
-//     Root    root;
-       Root*   pRoot;
-       Pane    left;
-       Pane    right;
-       SORT_ORDER sortOrder;
-       int last_split;
-
-} ChildWnd;
-
-
-void insert_entries(HWND hWnd, Entry* parent, int idx);
-void scan_entry(ChildWnd* child, Entry* entry);
-void activate_entry(ChildWnd* child, Pane* pane);
-void collapse_entry(Pane* pane, Entry* dir);
-BOOL expand_entry(ChildWnd* child, Entry* dir);
-Entry* find_entry_win(Entry* parent, LPCTSTR name);
-void free_entries(Entry* parent);
-Entry* read_tree_win(Root* root, LPCTSTR path, int sortOrder);
-
-
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __ENTRIES_H__
diff --git a/rosapps/winfile/format.h b/rosapps/winfile/format.h
deleted file mode 100644 (file)
index 71158b7..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-#if !defined(SHFMT_OPT_FULL)
-
-   #if defined (__cplusplus)
-   extern "C" {
-   #endif
-
-   /*****************************************************************
-   The SHFormatDrive API provides access to the Shell's format
-   dialog box. This allows applications that want to format disks to bring
-   up the same dialog box that the Shell uses for disk formatting.
-
-   PARAMETERS
-      hWnd    = The window handle of the window that will own the
-                dialog. NOTE that hWnd == NULL does not cause this
-                dialog to come up as a "top level application"
-                window. This parameter should always be non-null,
-                this dialog box is only designed to be the child of
-                another window, not a stand-alone application.
-
-      drive   = The 0 based (A: == 0) drive number of the drive
-                to format.
-
-      fmtID   = Currently must be set to SHFMT_ID_DEFAULT.
-
-      options = There are currently only two option bits defined.
-
-                   SHFMT_OPT_FULL
-                   SHFMT_OPT_SYSONLY
-
-                SHFMT_OPT_FULL specifies that the "Quick Format"
-                setting should be cleared by default. If the user
-                leaves the "Quick Format" setting cleared, then a
-                full format will be applied (this is useful for
-                users that detect "unformatted" disks and want
-                to bring up the format dialog box).
-
-                If options is set to zero (0), then the "Quick Format"
-                setting is set by default. In addition, if the user leaves
-                it set, a quick format is performed. Under Windows NT 4.0,
-                this flag is ignored and the "Quick Format" box is always
-                checked when the dialog box first appears. The user can
-                still change it. This is by design.
-
-                The SHFMT_OPT_SYSONLY initializes the dialog to
-                default to just sys the disk.
-
-                All other bits are reserved for future expansion
-                and must be 0.
-
-                Please note that this is a bit field and not a
-                value, treat it accordingly.
-
-      RETURN
-         The return is either one of the SHFMT_* values, or if
-         the returned DWORD value is not == to one of these
-         values, then the return is the physical format ID of the
-         last successful format. The LOWORD of this value can be
-         passed on subsequent calls as the fmtID parameter to
-         "format the same type you did last time".
-
-   *****************************************************************/
-   DWORD WINAPI SHFormatDrive(HWND hWnd,
-                              UINT drive,
-                              UINT fmtID,
-                              UINT options);
-
-   //
-   // Special value of fmtID which means "use the defaultformat"
-   //
-
-   #define SHFMT_ID_DEFAULT   0xFFFF
-
-   //
-   // Option bits for options parameter
-   //
-
-   #define SHFMT_OPT_FULL     0x0001
-   #define SHFMT_OPT_SYSONLY  0x0002
-
-   //
-   // Special return values. PLEASE NOTE that these are DWORD values.
-   //
-
-   #define SHFMT_ERROR     0xFFFFFFFFL    // Error on last format,
-                                          // drive may be formatable
-   #define SHFMT_CANCEL    0xFFFFFFFEL    // Last format wascanceled
-   #define SHFMT_NOFORMAT  0xFFFFFFFDL    // Drive is not formatable
-
-   #if defined (__cplusplus)
-   }
-   #endif
-   #endif
-
diff --git a/rosapps/winfile/framewnd.c b/rosapps/winfile/framewnd.c
deleted file mode 100644 (file)
index 4fe9e2d..0000000
+++ /dev/null
@@ -1,872 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  framewnd.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-//#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <commctrl.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <memory.h>
-#include <tchar.h>
-#include <process.h>
-#include <stdio.h>
-
-//#include <shellapi.h>
-#include <windowsx.h>
-#include <assert.h>
-#define ASSERT assert
-
-#include "main.h"
-#include "about.h"
-#include "framewnd.h"
-#include "childwnd.h"
-#include "worker.h"
-#include "utils.h"
-#include "shell.h"
-#include "network.h"
-#include "dialogs.h"
-
-
-////////////////////////////////////////////////////////////////////////////////
-// Global and Local Variables:
-//
-
-BOOL bInMenuLoop = FALSE;        // Tells us if we are in the menu loop
-int  nOldWidth;                  // Holds the previous client area width
-int  nOldHeight;                 // Holds the previous client area height
-
-static HHOOK hcbthook;
-static ChildWnd* newchild = NULL;
-
-
-////////////////////////////////////////////////////////////////////////////////
-// Local module support methods
-//
-
-static void resize_frame_rect(HWND hWnd, PRECT prect)
-{
-       int new_top;
-       RECT rt;
-
-       if (IsWindowVisible(Globals.hToolBar)) {
-               SendMessage(Globals.hToolBar, WM_SIZE, 0, 0);
-               GetClientRect(Globals.hToolBar, &rt);
-               prect->top = rt.bottom+3;
-               prect->bottom -= rt.bottom+3;
-       }
-       if (IsWindowVisible(Globals.hDriveBar)) {
-               SendMessage(Globals.hDriveBar, WM_SIZE, 0, 0);
-               GetClientRect(Globals.hDriveBar, &rt);
-//             new_top = --prect->top + rt.bottom+3;
-               new_top = --prect->top + rt.bottom+0;
-               MoveWindow(Globals.hDriveBar, 0, prect->top, rt.right, new_top, TRUE);
-               prect->top = new_top;
-//             prect->bottom -= rt.bottom+2;
-               prect->bottom -= rt.bottom-1;
-       }
-       if (IsWindowVisible(Globals.hStatusBar)) {
-               SetupStatusBar(TRUE);
-//             int parts[] = {300, 500};
-//             SendMessage(Globals.hStatusBar, WM_SIZE, 0, 0);
-//             SendMessage(Globals.hStatusBar, SB_SETPARTS, 2, (LPARAM)&parts);
-               GetClientRect(Globals.hStatusBar, &rt);
-               prect->bottom -= rt.bottom;
-       }
-       MoveWindow(Globals.hMDIClient, prect->left-1,prect->top-1,prect->right+2,prect->bottom+1, TRUE);
-}
-
-static void resize_frame(HWND hWnd, int cx, int cy)
-{
-       RECT rect = {0, 0, cx, cy};
-
-       resize_frame_rect(hWnd, &rect);
-}
-
-void resize_frame_client(HWND hWnd)
-{
-       RECT rect;
-
-       GetClientRect(hWnd, &rect);
-       resize_frame_rect(hWnd, &rect);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-static LRESULT CALLBACK CBTProc(int code, WPARAM wParam, LPARAM lParam)
-{
-    if (code == HCBT_CREATEWND && newchild) {
-        ChildWnd* pChildWnd = newchild;
-        newchild = NULL;
-        pChildWnd->hWnd = (HWND)wParam;
-        SetWindowLong(pChildWnd->hWnd, GWL_USERDATA, (LPARAM)pChildWnd);
-    }
-    return CallNextHookEx(hcbthook, code, wParam, lParam);
-}
-
-
-/*
-BOOL FindChildWindow(int cmd)
-{
-       TCHAR drv[_MAX_DRIVE];
-       LPCTSTR root = Globals.drives;
-       int i;
-       for(i = cmd - ID_DRIVE_FIRST; i--; root++)
-               while(*root)
-                       root++;
-       if (activate_drive_window(root))
-               return TRUE;
-       _tsplitpath(root, drv, 0, 0, 0);
-       if (!SetCurrentDirectory(drv)) {
-               display_error(hWnd, GetLastError());
-               //return TRUE;
-       }
-       return FALSE;
-}
- */
-
-static ChildWnd* alloc_child_window(LPCTSTR path)
-{
-       TCHAR drv[_MAX_DRIVE+1], dir[_MAX_DIR], name[_MAX_FNAME], ext[_MAX_EXT];
-       Entry* entry;
-       Root* root;
-//     ChildWnd* pChildWnd = (ChildWnd*)malloc(sizeof(ChildWnd));
-//     memset(pChildWnd, 0, sizeof(ChildWnd));
-       ChildWnd* pChildWnd = (ChildWnd*)malloc(sizeof(ChildWnd)+sizeof(Root));
-       memset(pChildWnd, 0, sizeof(ChildWnd)+sizeof(Root));
-       pChildWnd->pRoot = (Root*)((BYTE*)pChildWnd + sizeof(ChildWnd));
-       pChildWnd->pRoot = (Root*)&pChildWnd[1];
-       root = pChildWnd->pRoot;
-
-//     root = &pChildWnd->root;
-//     pChildWnd->left.treePane = TRUE;
-//     pChildWnd->left.visible_cols = 0;
-//     pChildWnd->right.treePane = FALSE;
-//#ifndef _NO_EXTENSIONS
-//     pChildWnd->right.visible_cols = COL_SIZE|COL_DATE|COL_TIME|COL_ATTRIBUTES|COL_INDEX|COL_LINKS;
-//#else
-//     pChildWnd->right.visible_cols = COL_SIZE|COL_DATE|COL_TIME|COL_ATTRIBUTES;
-//#endif
-       pChildWnd->pos.length = sizeof(WINDOWPLACEMENT);
-       pChildWnd->pos.flags = 0;
-       pChildWnd->pos.showCmd = SW_SHOWNORMAL;
-       pChildWnd->pos.rcNormalPosition.left = CW_USEDEFAULT;
-       pChildWnd->pos.rcNormalPosition.top = CW_USEDEFAULT;
-       pChildWnd->pos.rcNormalPosition.right = CW_USEDEFAULT;
-       pChildWnd->pos.rcNormalPosition.bottom = CW_USEDEFAULT;
-       pChildWnd->nFocusPanel = 0;
-       pChildWnd->nSplitPos = 300;
-       pChildWnd->sortOrder = SORT_NAME;
-//     pChildWnd->header_wdths_ok = FALSE;
-       lstrcpy(pChildWnd->szPath, path);
-       _tsplitpath(path, drv, dir, name, ext);
-#if !defined(_NO_EXTENSIONS) && defined(__linux__)
-       if (*path == '/') {
-               root->drive_type = GetDriveType(path);
-               lstrcat(drv, _T("/"));
-               lstrcpy(root->volname, _T("root fs"));
-               root->fs_flags = 0;
-               lstrcpy(root->fs, _T("unixfs"));
-               lstrcpy(root->path, _T("/"));
-               entry = read_tree_unix(root, path, pChildWnd->sortOrder);
-    } else
-#endif
-       {
-               root->drive_type = GetDriveType(path);
-               lstrcat(drv, _T("\\"));
-               GetVolumeInformation(drv, root->volname, _MAX_FNAME, 0, 0, &root->fs_flags, root->fs, _MAX_DIR);
-               lstrcpy(root->path, drv);
-               entry = read_tree_win(root, path, pChildWnd->sortOrder);
-       }
-//@@lstrcpy(root->entry.data.cFileName, drv);
-       wsprintf(root->entry.data.cFileName, _T("%s - %s"), drv, root->fs);
-       root->entry.data.dwFileAttributes = FILE_ATTRIBUTE_DIRECTORY;
-       pChildWnd->left.root = &root->entry;
-       set_curdir(pChildWnd, entry);
-       return pChildWnd;
-}
-
-HWND CreateChildWindow(int drv_id)
-{
-       //TCHAR drv[_MAX_DRIVE];
-       TCHAR path[MAX_PATH];
-       ChildWnd* pChildWnd = NULL;
-/*
-       LPCTSTR root = Globals.drives;
-       int i;
-       for(i = cmd - ID_DRIVE_FIRST; i--; root++)
-               while(*root)
-                       root++;
-       if (activate_drive_window(root))
-               return 0;
-       _tsplitpath(root, drv, 0, 0, 0);
-       if (!SetCurrentDirectory(drv)) {
-               display_error(hWnd, GetLastError());
-               return 0;
-       }
- */
-       GetCurrentDirectory(MAX_PATH, path);
-//     pChildWnd = (ChildWnd*)malloc(sizeof(ChildWnd));
-       pChildWnd = alloc_child_window(path);
-//     if (!create_child_window(pChildWnd))
-//             free(pChildWnd);
-
-       if (pChildWnd != NULL) {
-        MDICREATESTRUCT mcs = {
-            szChildClass, path, hInst,
-//            CW_USEDEFAULT, CW_USEDEFAULT,
-//            CW_USEDEFAULT, CW_USEDEFAULT,
-            20, 20, 200, 200,
-            WS_MAXIMIZE, (LPARAM)pChildWnd
-//            0/*style*/, 0/*lParam*/
-               };
-        hcbthook = SetWindowsHookEx(WH_CBT, CBTProc, 0, GetCurrentThreadId());
-       newchild = pChildWnd;
-        pChildWnd->hWnd = (HWND)SendMessage(Globals.hMDIClient, WM_MDICREATE, 0, (LPARAM)&mcs);
-        UnhookWindowsHookEx(hcbthook);
-        if (pChildWnd->hWnd != NULL) {
-            return pChildWnd->hWnd;
-        } else {
-            free(pChildWnd);
-               newchild = pChildWnd = NULL;
-        }
-       }
-    return 0;
-}
-
-static BOOL CALLBACK CloseEnumProc(HWND hWnd, LPARAM lParam)
-{
-    if (!GetWindow(hWnd, GW_OWNER)) {
-        SendMessage(GetParent(hWnd), WM_MDIRESTORE, (WPARAM)hWnd, 0);
-        if (SendMessage(hWnd, WM_QUERYENDSESSION, 0, 0)) {
-            SendMessage(GetParent(hWnd), WM_MDIDESTROY, (WPARAM)hWnd, 0);
-        }
-    }
-    return 1;
-}
-
-static void OnEnterMenuLoop(HWND hWnd)
-{
-    int nParts;
-
-    // Update the status bar pane sizes
-    nParts = -1;
-    SendMessage(Globals.hStatusBar, SB_SETPARTS, 1, (long)&nParts);
-    bInMenuLoop = TRUE;
-    SendMessage(Globals.hStatusBar, SB_SETTEXT, (WPARAM)0, (LPARAM)_T(""));
-}
-
-static void OnExitMenuLoop(HWND hWnd)
-{
-/*
-    RECT  rc;
-    int   nParts[3];
-
-    bInMenuLoop = FALSE;
-    // Update the status bar pane sizes
-    GetClientRect(hWnd, &rc);
-    nParts[0] = 100;
-    nParts[1] = 210;
-    nParts[2] = rc.right;
-    SendMessage(Globals.hStatusBar, SB_SETPARTS, 3, (long)nParts);
-    SendMessage(Globals.hStatusBar, SB_SETTEXT, 0, (LPARAM)_T(""));
- */
-    SendMessage(Globals.hStatusBar, SB_SETTEXT, 0, (LPARAM)_T(""));
-    bInMenuLoop = FALSE;
-    SetupStatusBar(TRUE);
-       UpdateStatusBar();
-}
-
-static void OnMenuSelect(HWND hWnd, UINT nItemID, UINT nFlags, HMENU hSysMenu)
-{
-    TCHAR str[100];
-
-    if (hSysMenu == NULL) return;
-
-    _tcscpy(str, _T(""));
-    if (nFlags & MF_POPUP) {
-        switch (nItemID) {
-        case ID_FILE_MENU:
-            //EnableMenuItem(hSysMenu, uIDEnableItem,  MF_BYCOMMAND|MF_ENABLED);
-            break;
-        case ID_DISK_MENU:
-//            EnableMenuItem(hSysMenu, ID_DISK_COPY_DISK,  MF_BYCOMMAND|MF_GRAYED);
-            EnableMenuItem(hSysMenu, ID_DISK_COPY_DISK,  MF_BYCOMMAND|MF_ENABLED);
-            break;
-        case ID_TREE_MENU:
-        case ID_VIEW_MENU:
-        case ID_OPTIONS_MENU:
-        case ID_SECURITY_MENU:
-        case ID_WINDOW_MENU:
-        case ID_HELP_MENU:
-            break;
-        }
-//        if (hSysMenu != GetMenu(hWnd)) {
-//            if (nItemID == 2) nItemID = 5;
-//        }
-    }
-    if (LoadString(Globals.hInstance, nItemID, str, 100)) {
-        // load appropriate string
-        LPTSTR lpsz = str;
-        // first newline terminates actual string
-        lpsz = _tcschr(lpsz, '\n');
-        if (lpsz != NULL)
-            *lpsz = '\0';
-    }
-    SendMessage(Globals.hStatusBar, SB_SETTEXT, 0, (LPARAM)str);
-}
-
-
-static BOOL activate_drive_window(LPCTSTR path)
-{
-       TCHAR drv1[_MAX_DRIVE], drv2[_MAX_DRIVE];
-       HWND child_wnd;
-
-       _tsplitpath(path, drv1, 0, 0, 0);
-
-        // search for a already open window for the same drive
-       for (child_wnd = GetNextWindow(Globals.hMDIClient,GW_CHILD);
-            child_wnd;
-                child_wnd = GetNextWindow(child_wnd, GW_HWNDNEXT)) {
-               ChildWnd* pChildWnd = (ChildWnd*) GetWindowLong(child_wnd, GWL_USERDATA);
-               if (pChildWnd) {
-                       //_tsplitpath(pChildWnd->root.path, drv2, 0, 0, 0);
-                       _tsplitpath(pChildWnd->pRoot->path, drv2, 0, 0, 0);
-                       if (!lstrcmpi(drv2, drv1)) {
-                               SendMessage(Globals.hMDIClient, WM_MDIACTIVATE, (WPARAM)child_wnd, 0);
-                               if (IsMinimized(child_wnd))
-                                       ShowWindow(child_wnd, SW_SHOWNORMAL);
-                               return TRUE;
-                       }
-               }
-       }
-       return FALSE;
-}
-
-static void toggle_child(HWND hWnd, UINT cmd, HWND hchild)
-{
-       BOOL vis = IsWindowVisible(hchild);
-
-       CheckMenuItem(Globals.hMenuOptions, cmd, vis?MF_BYCOMMAND:MF_BYCOMMAND|MF_CHECKED);
-       ShowWindow(hchild, vis?SW_HIDE:SW_SHOW);
-#ifndef _NO_EXTENSIONS
-       if (g_fullscreen.mode)
-               fullscreen_move(hWnd);
-#endif
-       resize_frame_client(hWnd);
-}
-
-static BOOL cmd_drive_select(HWND hWnd, UINT cmd)
-{
-       TCHAR drv[_MAX_DRIVE];
-       //TCHAR path[MAX_PATH];
-       //ChildWnd* pChildWnd;
-       LPCTSTR root = Globals.drives;
-       int i;
-       for (i = cmd - ID_DRIVE_FIRST; i--; root++)
-               while (*root)
-                       root++;
-    if (activate_drive_window(root)) {
-        return TRUE;
-    }
-       _tsplitpath(root, drv, 0, 0, 0);
-       if (!SetCurrentDirectory(drv)) {
-               display_error(hWnd, GetLastError());
-        return TRUE;
-       }
-       //GetCurrentDirectory(MAX_PATH, path); //@@ letztes Verzeichnis pro Laufwerk speichern
-    //CreateChildWindow(path);
-    CreateChildWindow(cmd - ID_DRIVE_FIRST);
-//             pChildWnd = alloc_child_window(path);
-//             if (!create_child_window(pChildWnd))
-//                     free(pChildWnd);
-    return FALSE;
-}
-
-static BOOL OnComboBoxCmd(HWND hWnd, WPARAM wParam)
-{
-    int index;
-
-    switch (HIWORD(wParam)) {
-    case CBN_SELCHANGE:
-        index = SendMessage(Globals.hDriveCombo, CB_GETCURSEL, 0, 0);
-        cmd_drive_select(hWnd, index + ID_DRIVE_FIRST);
-        break;
-    default:
-        return FALSE;
-    }
-    return TRUE;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//  FUNCTION: _CmdWndProc(HWND, unsigned, WORD, LONG)
-//
-//  PURPOSE:  Processes WM_COMMAND messages for the main frame window.
-//
-//
-
-static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
-       UINT cmd = LOWORD(wParam);
-       HWND hChildWnd;
-//     HWND hwndClient = (HWND)SendMessage(Globals.hMDIClient, WM_MDIGETACTIVE, 0, 0);
-//     if (hwndClient)
-//         if (SendMessage(hwndClient, WM_DISPATCH_COMMAND, wParam, lParam))
-//                     return 0;
-
-    if ((HWND)lParam == Globals.hDriveCombo) {
-        return OnComboBoxCmd(hWnd, wParam);
-    }
-       if (cmd >= ID_DRIVE_FIRST && cmd <= (ID_DRIVE_FIRST + 0xFF)) {
-        cmd_drive_select(hWnd, cmd);
-       } else {
-               switch (cmd) {
-        case ID_WINDOW_CLOSEALL:
-            EnumChildWindows(Globals.hMDIClient, &CloseEnumProc, 0);
-            break;
-        case ID_WINDOW_CLOSE:
-            hChildWnd = (HWND) SendMessage(Globals.hMDIClient, WM_MDIGETACTIVE, 0, 0);
-            if (!SendMessage(hChildWnd, WM_QUERYENDSESSION, 0, 0))
-                SendMessage(Globals.hMDIClient, WM_MDIDESTROY, (WPARAM)hChildWnd, 0);
-            break;
-        case ID_DISK_COPY_DISK:
-            CopyDisk(hWnd);
-                       break;
-        case ID_DISK_LABEL_DISK:
-            LabelDisk(hWnd);
-                       break;
-        case ID_DISK_FORMAT_DISK:
-            FormatDisk(hWnd);
-#if 0
-//                     SHFormatDrive(hWnd, 0 /* A: */, SHFMT_ID_DEFAULT, 0);
-                       {
-                               UINT OldMode = SetErrorMode(0); // Get the current Error Mode settings.
-                               SetErrorMode(OldMode & ~SEM_FAILCRITICALERRORS); // Force O/S to handle
-                               // Call SHFormatDrive here.
-                               SHFormatDrive(hWnd, 0 /* A: */, SHFMT_ID_DEFAULT, 0);
-                               SetErrorMode(OldMode); // Put it back the way it was.
-                       }
-#endif
-                       break;
-        case ID_DISK_CONNECT_NETWORK_DRIVE:
-            MapNetworkDrives(hWnd, TRUE);
-                       break;
-        case ID_DISK_DISCONNECT_NETWORK_DRIVE:
-            MapNetworkDrives(hWnd, FALSE);
-                       break;
-        case ID_DISK_SHARE_AS:
-            ModifySharing(hWnd, TRUE);
-                       break;
-        case ID_DISK_STOP_SHARING:
-            ModifySharing(hWnd, FALSE);
-                       break;
-        case ID_DISK_SELECT_DRIVE:
-                       break;
-
-        case ID_VIEW_BY_FILE_TYPE:
-                       {
-                       struct ExecuteDialog dlg = {{0}};
-            if (DialogBoxParam(Globals.hInstance, MAKEINTRESOURCE(IDD_DIALOG_VIEW_TYPE), hWnd, ViewFileTypeWndProc, (LPARAM)&dlg) == IDOK) {
-            }
-                       }
-                       break;
-        case ID_OPTIONS_CONFIRMATION:
-                       {
-                       struct ExecuteDialog dlg = {{0}};
-            if (DialogBoxParam(Globals.hInstance, MAKEINTRESOURCE(IDD_DIALOG_OPTIONS_CONFIRMATON), hWnd, OptionsConfirmationWndProc, (LPARAM)&dlg) == IDOK) {
-            }
-                       }
-            break;
-               case ID_OPTIONS_FONT:
-            break;
-               case ID_OPTIONS_CUSTOMISE_TOOLBAR:
-            SendMessage(Globals.hToolBar, TB_CUSTOMIZE, 0, 0);
-            break;
-               case ID_OPTIONS_TOOLBAR:
-                       toggle_child(hWnd, cmd, Globals.hToolBar);
-            break;
-               case ID_OPTIONS_DRIVEBAR:
-                       toggle_child(hWnd, cmd, Globals.hDriveBar);
-            break;
-               case ID_OPTIONS_STATUSBAR:
-                       toggle_child(hWnd, cmd, Globals.hStatusBar);
-            break;
-               case ID_OPTIONS_OPEN_NEW_WINDOW_ON_CONNECT:
-            if (Globals.Options & OPTIONS_OPEN_NEW_WINDOW_ON_CONNECT) {
-                Globals.Options &= ~OPTIONS_OPEN_NEW_WINDOW_ON_CONNECT;
-                CheckMenuItem(Globals.hMenuOptions, cmd, MF_BYCOMMAND);
-            } else {
-                Globals.Options |= OPTIONS_OPEN_NEW_WINDOW_ON_CONNECT;
-                CheckMenuItem(Globals.hMenuOptions, cmd, MF_BYCOMMAND | MF_CHECKED);
-            }
-            break;
-               case ID_OPTIONS_MINIMISE_ON_USE:
-            if (Globals.Options & ID_OPTIONS_MINIMISE_ON_USE) {
-                Globals.Options &= ~ID_OPTIONS_MINIMISE_ON_USE;
-                CheckMenuItem(Globals.hMenuOptions, cmd, MF_BYCOMMAND);
-            } else {
-                Globals.Options |= ID_OPTIONS_MINIMISE_ON_USE;
-                CheckMenuItem(Globals.hMenuOptions, cmd, MF_BYCOMMAND | MF_CHECKED);
-            }
-            break;
-        case ID_OPTIONS_SAVE_ON_EXIT:
-            if (Globals.Options & OPTIONS_SAVE_ON_EXIT) {
-                Globals.Options &= ~OPTIONS_SAVE_ON_EXIT;
-                CheckMenuItem(Globals.hMenuOptions, cmd, MF_BYCOMMAND);
-            } else {
-                Globals.Options |= OPTIONS_SAVE_ON_EXIT;
-                CheckMenuItem(Globals.hMenuOptions, cmd, MF_BYCOMMAND | MF_CHECKED);
-            }
-            break;
-               case ID_WINDOW_NEW_WINDOW:
-            CreateChildWindow(-1);
-                       break;
-               case ID_WINDOW_CASCADE:
-                       SendMessage(Globals.hMDIClient, WM_MDICASCADE, 0, 0);
-            break;
-               case ID_WINDOW_TILE_HORZ:
-                       SendMessage(Globals.hMDIClient, WM_MDITILE, MDITILE_HORIZONTAL, 0);
-            break;
-               case ID_WINDOW_TILE_VERT:
-                       SendMessage(Globals.hMDIClient, WM_MDITILE, MDITILE_VERTICAL, 0);
-            break;
-               case ID_WINDOW_ARRANGE_ICONS:
-                       SendMessage(Globals.hMDIClient, WM_MDIICONARRANGE, 0, 0);
-            break;
-        case ID_WINDOW_REFRESH:
-            // TODO:
-            break;
-               case ID_HELP_CONTENTS:
-                       WinHelp(hWnd, _T("winfile"), HELP_CONTENTS, 0);
-            break;
-               case ID_HELP_SEARCH_HELP:
-                       WinHelp(hWnd, _T("winfile"), HELP_FINDER, 0);
-            break;
-               case ID_HELP_HOW_TO_USE_HELP:
-                       WinHelp(hWnd, _T("winfile"), HELP_HELPONHELP, 0);
-            break;
-        case ID_HELP_ABOUT:
-#ifdef WINSHELLAPI
-            ShellAbout(hWnd, szTitle, _T(""), LoadIcon(Globals.hInstance, (LPCTSTR)IDI_WINFILE));
-#else
-            ShowAboutBox(hWnd);
-#endif
-            break;
-               default:
-/*
-                       if ((cmd<IDW_FIRST_CHILD || cmd>=IDW_FIRST_CHILD+0x100) &&
-                               (cmd<SC_SIZE || cmd>SC_RESTORE)) {
-                               MessageBox(hWnd, _T("Not yet implemented"), _T("Winefile"), MB_OK);
-                       }
-                       return DefFrameProc(hWnd, Globals.hMDIClient, message, wParam, lParam);
- */
-/*
-            hChildWnd = (HWND)SendMessage(Globals.hMDIClient, WM_MDIGETACTIVE, 0, 0);
-            if (IsWindow(hChildWnd))
-                SendMessage(hChildWnd, WM_COMMAND, wParam, lParam);
-            else
-                           return DefFrameProc(hWnd, Globals.hMDIClient, message, wParam, lParam);
- */
-            return FALSE;
-               }
-       }
-       return TRUE;
-}
-
-
-static TBBUTTON tbButtonNew[] = {
-       {0, ID_WINDOW_CASCADE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-       {0, ID_WINDOW_CASCADE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-       {0, ID_WINDOW_CASCADE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-       {0, ID_WINDOW_CASCADE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-       {0, ID_WINDOW_CASCADE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-};
-
-static LRESULT MsgNotify(HWND hwnd, UINT uMessage, WPARAM wparam, LPARAM lparam)
-{
-    LPNMHDR     lpnmhdr;
-
-//LPNMHDR                lpnmhdr;
-static int             nResetCount;
-static LPTBBUTTON      lpSaveButtons;
-//LPARAM                 lParam;
-
-
-    lpnmhdr = (LPNMHDR)lparam;
-/*
-    // The following code allows the toolbar to be customized.
-    // If you return FALSE the Customize Toolbar dialog flashes
-    // and goes away.
-
-    if (lpnmhdr->code == TBN_QUERYINSERT || lpnmhdr->code == TBN_QUERYDELETE) {
-        return TRUE;
-    }
-
-    if (lpnmhdr->code == TBN_GETBUTTONINFO) {
-        LPTBNOTIFY lpTbNotify = (LPTBNOTIFY)lparam;
-        TCHAR szBuffer[20];
-
-//        int tbButtonNew[20] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 };
-               TBBUTTON tbButtonNew[] = {
-                       {0, ID_WINDOW_CASCADE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {0, ID_WINDOW_CASCADE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {0, ID_WINDOW_CASCADE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {0, ID_WINDOW_CASCADE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {0, ID_WINDOW_CASCADE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-               };
-
-               // 20 = total number of buttons.
-               // tbButton and tbButtonNew send information about
-               // the other 12 buttons in tbButtonNew.
-        if (lpTbNotify->iItem < 5) {
-            lpTbNotify->tbButton = tbButtonNew[lpTbNotify->iItem];
-//            LoadString(hInst, 4000+lpTbNotify->iItem, szBuffer, sizeof(szBuffer)/sizeof(TCHAR));
-            LoadString(hInst, lpTbNotify->iItem, szBuffer, sizeof(szBuffer)/sizeof(TCHAR));
-            lstrcpy (lpTbNotify->pszText, szBuffer);
-            lpTbNotify->cchText = sizeof(szBuffer)/sizeof(TCHAR);
-            return TRUE;
-        } else {
-            return 0;
-        }
-    }
- */
-    switch (lpnmhdr->code) {
-    case TBN_QUERYINSERT:
-    case TBN_QUERYDELETE:
-        return TRUE;
-
-    case TBN_GETBUTTONINFO:
-        {
-        LPTBNOTIFY lpTbNotify = (LPTBNOTIFY)lparam;
-        TCHAR szBuffer[20];
-/*
-typedef struct _TBBUTTON {
-    int iBitmap;
-    int idCommand;
-    BYTE fsState;
-    BYTE fsStyle;
-    DWORD dwData;
-    INT_PTR iString;
-} TBBUTTON, NEAR* PTBBUTTON, FAR* LPTBBUTTON;
- */
-               // 20 = total number of buttons.
-               // tbButton and tbButtonNew send information about
-               // the other 12 buttons in tbButtonNew.
-        if (lpTbNotify->iItem < 12) {
-            lpTbNotify->tbButton = tbButtonNew[lpTbNotify->iItem];
-            LoadString(hInst, lpTbNotify->iItem + 32769, szBuffer, sizeof(szBuffer)/sizeof(TCHAR));
-            lstrcpy(lpTbNotify->pszText, szBuffer);
-            lpTbNotify->cchText = sizeof(szBuffer)/sizeof(TCHAR);
-            return TRUE;
-        } else {
-            return 0;
-        }
-        }
-        break;
-
-    case TBN_BEGINADJUST: // Start customizing the toolbar.
-        {
-           LPTBNOTIFY  lpTB = (LPTBNOTIFY)lparam;
-        int i;
-
-        // Allocate memory to store the button information.
-        nResetCount = SendMessage(lpTB->hdr.hwndFrom, TB_BUTTONCOUNT, 0, 0);
-        lpSaveButtons = (LPTBBUTTON)GlobalAlloc(GPTR, sizeof(TBBUTTON) * nResetCount);
-
-        // Save the current configuration so if the user presses
-        // reset, the original toolbar can be restored.
-        for (i = 0; i < nResetCount; i++) {
-            SendMessage(lpTB->hdr.hwndFrom, TB_GETBUTTON, i, (LPARAM)(lpSaveButtons + i));
-        }
-        }
-        return TRUE;
-
-    case TBN_RESET:
-        {
-        LPTBNOTIFY  lpTB = (LPTBNOTIFY)lparam;
-        int         nCount, i;
-
-        // Remove all of the existing buttons starting with the last and working down.
-        nCount = SendMessage(lpTB->hdr.hwndFrom, TB_BUTTONCOUNT, 0, 0);
-        for (i = nCount - 1; i >= 0; i--) {
-            SendMessage(lpTB->hdr.hwndFrom, TB_DELETEBUTTON, i, 0);
-        }
-
-        // Restore the buttons that were saved.
-        SendMessage(lpTB->hdr.hwndFrom, TB_ADDBUTTONS, (WPARAM)nResetCount, (LPARAM)lpSaveButtons);
-        }
-        return TRUE;
-
-    case TBN_ENDADJUST:
-        // Free the memory allocated during TBN_BEGINADJUST
-        GlobalFree((HGLOBAL)lpSaveButtons);
-        return TRUE;
-    }
-    return 0;
-}
-
-static LRESULT OnDriveBoxNotify(HWND hWnd, WPARAM wParam, LPARAM lParam)
-{
-    LPNMHDR nmhdr = (LPNMHDR)lParam;
-
-//    if (nmhdr->code == NM_HOVER || nmhdr->code == NM_NCHITTEST) return 0;
-
-//    switch (((LPNMHDR)lParam)->code) {
-    switch (nmhdr->code) {
-    case NM_OUTOFMEMORY:
-    case NM_CLICK:
-    case NM_DBLCLK:
-    case NM_RETURN:
-    case NM_RCLICK:
-    case NM_RDBLCLK:
-    case NM_SETFOCUS:
-    case NM_KILLFOCUS:
-        break;
-
-#if (_WIN32_IE >= 0x0300)
-    case NM_CUSTOMDRAW:
-    case NM_HOVER:
-        break;
-#endif
-
-#if (_WIN32_IE >= 0x0400)
-    case NM_NCHITTEST:
-    case NM_KEYDOWN:
-    case NM_RELEASEDCAPTURE:
-    case NM_SETCURSOR:
-    case NM_CHAR:
-        break;
-#endif
-    default:
-        break;
-    }
-    return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//  FUNCTION: FrameWndProc(HWND, unsigned, WORD, LONG)
-//
-//  PURPOSE:  Processes messages for the main frame window.
-//
-//  WM_COMMAND  - process the application menu
-//  WM_DESTROY  - post a quit message and return
-//
-//
-
-LRESULT CALLBACK FrameWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
-       switch (message) {
-    case WM_CREATE:
-        {
-        HMENU hMenuWindow = GetSubMenu(Globals.hMenuFrame, GetMenuItemCount(Globals.hMenuFrame)-2);
-        CLIENTCREATESTRUCT ccs = { hMenuWindow, IDW_FIRST_CHILD };
-        Globals.hMDIClient = CreateWindowEx(0, _T("MDICLIENT"), NULL,
-                WS_EX_MDICHILD|WS_CHILD|WS_CLIPCHILDREN|WS_VISIBLE,
-                0, 0, 0, 0,
-                hWnd, (HMENU)0, hInst, &ccs);
-        }
-        CheckShellAvailable();
-        CreateNetworkMonitorThread(hWnd);
-        CreateMonitorThread(hWnd);
-        CreateChildWindow(-1);
-        SetTimer(hWnd, 1, 5000, NULL);
-               break;
-
-    case WM_NOTIFY:
-
-        if (((LPNMHDR)lParam)->idFrom == IDW_DRIVEBOX) {
-//            return OnDriveBoxNotify(hWnd, wParam, lParam);
-            return OnDriveBoxNotify(hWnd, wParam, lParam);
-            //return TRUE;
-        }
-
-        if (((LPNMHDR)lParam)->idFrom == IDW_TOOLBAR) {
-            if (MsgNotify(hWnd, message, wParam, lParam)) return TRUE;
-        }
-//        return MsgNotify(hWnd, message, wParam, lParam);
-        switch (((LPNMHDR)lParam)->code) {
-#ifdef _MSC_VER
-        case TTN_GETDISPINFO:
-            {
-            LPTOOLTIPTEXT lpttt;
-            lpttt = (LPTOOLTIPTEXT)lParam;
-            lpttt->hinst = hInst;
-            // load appropriate string
-            lpttt->lpszText = MAKEINTRESOURCE(lpttt->hdr.idFrom);
-            }
-            break;
-#endif
-        default:
-            break;
-        }
-        break;
-
-       case WM_COMMAND:
-        if (!_CmdWndProc(hWnd, message, wParam, lParam)) {
-//            if (LOWORD(wParam) > ID_CMD_FIRST && LOWORD(wParam) < ID_CMD_LAST) {
-                HWND hChildWnd = (HWND)SendMessage(Globals.hMDIClient, WM_MDIGETACTIVE, 0, 0);
-                if (IsWindow(hChildWnd))
-                    if (SendMessage(hChildWnd, WM_DISPATCH_COMMAND, wParam, lParam))
-                        break;
-//            }
-                   return DefFrameProc(hWnd, Globals.hMDIClient, message, wParam, lParam);
-        }
-               break;
-
-       case WM_TIMER:
-        SignalMonitorEvent();
-        SignalNetworkMonitorEvent();
-               break;
-
-       case WM_SIZE:
-        resize_frame_client(hWnd);
-               break;
-    case WM_ENTERMENULOOP:
-        OnEnterMenuLoop(hWnd);
-               break;
-    case WM_EXITMENULOOP:
-        OnExitMenuLoop(hWnd);
-               break;
-    case WM_MENUSELECT:
-        OnMenuSelect(hWnd, LOWORD(wParam), HIWORD(wParam), (HMENU)lParam);
-               break;
-       case WM_DESTROY:
-               WinHelp(hWnd, _T("winfile"), HELP_QUIT, 0);
-        KillTimer(hWnd, 1);
-        DestryMonitorThread();
-        DestryNetworkMonitorThread();
-               PostQuitMessage(0);
-               break;
-    case WM_QUERYENDSESSION:
-    case WM_CLOSE:
-        SendMessage(hWnd, WM_COMMAND, ID_WINDOW_CLOSEALL, 0);
-        if (GetWindow(Globals.hMDIClient, GW_CHILD) != NULL)
-            return 0;
-        // else fall thru...
-    default: //def:
-        return DefFrameProc(hWnd, Globals.hMDIClient, message, wParam, lParam);
-       }
-       return 0;
-}
-
-
diff --git a/rosapps/winfile/framewnd.h b/rosapps/winfile/framewnd.h
deleted file mode 100644 (file)
index 61dd037..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  framewnd.h
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __FRAMEWND_H__
-#define __FRAMEWND_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM);
-HWND CreateChildWindow(int drv_id);
-void resize_frame_client(HWND hWnd);
-
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __FRAMEWND_H__
diff --git a/rosapps/winfile/listview.c b/rosapps/winfile/listview.c
deleted file mode 100644 (file)
index 9e54b0a..0000000
+++ /dev/null
@@ -1,487 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  listview.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <commctrl.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <memory.h>
-#include <tchar.h>
-#include <process.h>
-#include <stdio.h>
-
-#include <windowsx.h>
-#include "main.h"
-#include "listview.h"
-#include "dialogs.h"
-#include "run.h"
-#include "trace.h"
-
-
-////////////////////////////////////////////////////////////////////////////////
-// Global and Local Variables:
-//
-
-static WNDPROC g_orgListWndProc;
-
-#define MAX_LIST_COLUMNS 5
-static int default_column_widths[MAX_LIST_COLUMNS] = { 175, 100, 100, 100, 70 };
-static int column_alignment[MAX_LIST_COLUMNS] = { LVCFMT_LEFT, LVCFMT_RIGHT, LVCFMT_RIGHT, LVCFMT_RIGHT, LVCFMT_LEFT };
-
-
-////////////////////////////////////////////////////////////////////////////////
-// Local module support methods
-//
-
-static void AddEntryToList(HWND hwndLV, int idx, Entry* entry)
-{
-    LVITEM item;
-
-    item.mask = LVIF_TEXT | LVIF_PARAM;
-    item.iItem = 0;//idx;
-    item.iSubItem = 0;
-    item.state = 0;
-    item.stateMask = 0;
-//    item.pszText = entry->data.cFileName;
-//    item.cchTextMax = strlen(entry->data.cFileName);
-    item.pszText = LPSTR_TEXTCALLBACK;
-    item.cchTextMax = 0;
-    item.iImage = 0;
-//    item.iImage = I_IMAGECALLBACK;
-    item.lParam = (LPARAM)entry;
-#if (_WIN32_IE >= 0x0300)
-    item.iIndent = 0;
-#endif
-    ListView_InsertItem(hwndLV, &item);
-}
-
-// insert listctrl entries after index idx
-static void InsertListEntries(HWND hWnd, Entry* entry, int idx)
-{
-       ShowWindow(hWnd, SW_HIDE);
-
-    if (idx == -1) {
-    }
-    idx = 0;
-
-       for (; entry; entry = entry->next) {
-#ifndef _LEFT_FILES
-       if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
-               continue;
-#endif
-        AddEntryToList(hWnd, idx, entry);
-        ++idx;
-    }
-    ShowWindow(hWnd, SW_SHOW);
-}
-
-static void CreateListColumns(HWND hWndListView)
-{
-    TCHAR szText[50];
-    int index;
-    LV_COLUMN lvC;
-
-    // Create columns.
-    lvC.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;
-    lvC.pszText = szText;
-
-    // Load the column labels from the resource file.
-    for (index = 0; index < MAX_LIST_COLUMNS; index++) {
-        lvC.iSubItem = index;
-        lvC.cx = default_column_widths[index];
-        lvC.fmt = column_alignment[index];
-        LoadString(hInst, IDS_LIST_COLUMN_FIRST + index, szText, sizeof(szText)/sizeof(TCHAR));
-        if (ListView_InsertColumn(hWndListView, index, &lvC) == -1) {
-            // TODO: handle failure condition...
-            break;
-        }
-    }
-}
-
-// OnGetDispInfo - processes the LVN_GETDISPINFO notification message.
-static void OnGetDispInfo(NMLVDISPINFO* plvdi)
-{
-    SYSTEMTIME SystemTime;
-    FILETIME LocalFileTime;
-    static TCHAR buffer[200];
-    Entry* entry = (Entry*)plvdi->item.lParam;
-    ASSERT(entry);
-
-    plvdi->item.pszText = NULL;
-    switch (plvdi->item.iSubItem) {
-    case 0:
-        plvdi->item.pszText = entry->data.cFileName;
-//    item.cchTextMax = strlen(entry->data.cFileName);
-//        plvdi->item.pszText = rgPetInfo[plvdi->item.iItem].szKind;
-        break;
-    case 1:
-        if (entry->bhfi_valid) {
-            NUMBERFMT numFmt;
-            memset(&numFmt, 0, sizeof(numFmt));
-            numFmt.NumDigits = 0;
-            numFmt.LeadingZero = 0;
-            numFmt.Grouping = 3;
-            numFmt.lpDecimalSep = _T(".");
-            numFmt.lpThousandSep = _T(",");
-            numFmt.NegativeOrder = 0;
-
-            //entry->bhfi.nFileSizeLow;
-            //entry->bhfi.nFileSizeHigh;
-            //entry->bhfi.ftCreationTime
-            wsprintf(buffer, _T("%u"), entry->bhfi.nFileSizeLow);
-            if (GetNumberFormat(LOCALE_USER_DEFAULT, 0, buffer, &numFmt,
-                    buffer + sizeof(buffer)/2, sizeof(buffer)/2)) {
-                plvdi->item.pszText = buffer + sizeof(buffer)/2;
-            } else {
-                plvdi->item.pszText = buffer;
-            }
-        } else {
-            plvdi->item.pszText = _T("unknown");
-        }
-        break;
-    case 2:
-        plvdi->item.pszText = _T("error");
-        if (FileTimeToLocalFileTime(&entry->bhfi.ftLastWriteTime, &LocalFileTime)) {
-            if (FileTimeToSystemTime(&LocalFileTime, &SystemTime)) {
-                if (GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &SystemTime, NULL, buffer, sizeof(buffer))) {
-                    plvdi->item.pszText = buffer;
-                }
-            }
-        }
-        break;
-    case 3:
-        plvdi->item.pszText = _T("error");
-        if (FileTimeToLocalFileTime(&entry->bhfi.ftLastWriteTime, &LocalFileTime)) {
-            if (FileTimeToSystemTime(&LocalFileTime, &SystemTime)) {
-//                if (GetTimeFormat(UserDefaultLCID, 0, &SystemTime, NULL, buffer, sizeof(buffer))) {
-                if (GetTimeFormat(LOCALE_USER_DEFAULT, 0, &SystemTime, NULL, buffer, sizeof(buffer))) {
-                    plvdi->item.pszText = buffer;
-                }
-            }
-        }
-        break;
-    case 4:
-        plvdi->item.pszText = _T("");
-        _tcscpy(buffer, _T(" "));
-
-        if (entry->bhfi.dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE) _tcscat(buffer, _T("a")); else _tcscat(buffer, _T(" "));
-        if (entry->bhfi.dwFileAttributes & FILE_ATTRIBUTE_COMPRESSED) _tcscat(buffer, _T("c")); else _tcscat(buffer, _T(" "));
-        if (entry->bhfi.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) _tcscat(buffer, _T("d")); else _tcscat(buffer, _T(" "));
-        if (entry->bhfi.dwFileAttributes & FILE_ATTRIBUTE_ENCRYPTED) _tcscat(buffer, _T("e")); else _tcscat(buffer, _T(" "));
-        if (entry->bhfi.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) _tcscat(buffer, _T("h")); else _tcscat(buffer, _T(" "));
-        if (entry->bhfi.dwFileAttributes & FILE_ATTRIBUTE_NORMAL) _tcscat(buffer, _T("n")); else _tcscat(buffer, _T(" "));
-        if (entry->bhfi.dwFileAttributes & FILE_ATTRIBUTE_OFFLINE) _tcscat(buffer, _T("o")); else _tcscat(buffer, _T(" "));
-        if (entry->bhfi.dwFileAttributes & FILE_ATTRIBUTE_READONLY) _tcscat(buffer, _T("r")); else _tcscat(buffer, _T(" "));
-        if (entry->bhfi.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) _tcscat(buffer, _T("p")); else _tcscat(buffer, _T(" "));
-        if (entry->bhfi.dwFileAttributes & FILE_ATTRIBUTE_SPARSE_FILE) _tcscat(buffer, _T("f")); else _tcscat(buffer, _T(" "));
-        if (entry->bhfi.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM) _tcscat(buffer, _T("s")); else _tcscat(buffer, _T(" "));
-        if (entry->bhfi.dwFileAttributes & FILE_ATTRIBUTE_TEMPORARY) _tcscat(buffer, _T("t")); else _tcscat(buffer, _T(" "));
-        plvdi->item.pszText = buffer;
-        break;
-    default:
-        _tcscpy(buffer, _T(" "));
-        plvdi->item.pszText = buffer;
-        break;
-    }
-}
-/*
-FILE_ATTRIBUTE_ARCHIVE The file or directory is an archive file. Applications use this attribute to mark files for backup or removal.
-FILE_ATTRIBUTE_COMPRESSED The file or directory is compressed. For a file, this means that all of the data in the file is compressed. For a directory, this means that compression is the default for newly created files and subdirectories.
-FILE_ATTRIBUTE_DIRECTORY The handle identifies a directory.
-FILE_ATTRIBUTE_ENCRYPTED The file or directory is encrypted. For a file, this means that all data in the file is encrypted. For a directory, this means that encryption is the default for newly created files and subdirectories.
-FILE_ATTRIBUTE_HIDDEN The file or directory is hidden. It is not included in an ordinary directory listing.
-FILE_ATTRIBUTE_NORMAL The file has no other attributes. This attribute is valid only if used alone.
-FILE_ATTRIBUTE_OFFLINE The file data is not immediately available. This attribute indicates that the file data has been physically moved to offline storage. This attribute is used by Remote Storage, the hierarchical storage management software in Windows 2000. Applications should not arbitrarily change this attribute.
-FILE_ATTRIBUTE_READONLY The file or directory is read-only. Applications can read the file but cannot write to it or delete it. In the case of a directory, applications cannot delete it.
-FILE_ATTRIBUTE_REPARSE_POINT The file has an associated reparse point.
-FILE_ATTRIBUTE_SPARSE_FILE The file is a sparse file.
-FILE_ATTRIBUTE_SYSTEM The file or directory is part of the operating system or is used exclusively by the operating system.
-FILE_ATTRIBUTE_TEMPORARY The file is being used for temporary storage. File systems attempt to keep all the data in memory for quicker access, rather than flushing the data back to mass storage. A temporary file should be deleted by the application as soon as it is no longer needed.
- */
-
-
- // OnEndLabelEdit - processes the LVN_ENDLABELEDIT
- // notification message.
- // Returns TRUE if the label is changed, or FALSE otherwise.
-
-static BOOL OnEndLabelEdit(NMLVDISPINFO* plvdi)
-{
-    if (plvdi->item.iItem == -1)
-        return FALSE;
-
-    // Copy the new label text to the application-defined structure.
-//    lstrcpyn(rgPetInfo[plvdi->item.iItem].szKind, plvdi->item.pszText, 10);
-
-    return TRUE;
-    // To make a more robust application you should send an EM_LIMITTEXT
-    // message to the edit control to prevent the user from entering too
-    // many characters in the field.
-}
-
-static int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
-{
-    Entry* pItem1 = (Entry*)lParam1;
-    Entry* pItem2 = (Entry*)lParam2;
-
-    if (pItem1 != NULL && pItem2 != NULL) {
-               switch (lParamSort) {
-        case ID_VIEW_SORT_BY_NAME:
-            return _tcscmp(pItem1->data.cFileName, pItem2->data.cFileName);
-            break;
-        case ID_VIEW_SORT_BY_TYPE:
-//            if (pItem1->bhfi.nFileSizeLow != pItem2->bhfi.nFileSizeLow) {
-//                return (pItem1->bhfi.nFileSizeLow < pItem2->bhfi.nFileSizeLow) ? -1 : 1;
-//            }
-            break;
-        case ID_VIEW_SORT_BY_SIZE:
-            if (pItem1->bhfi.nFileSizeLow != pItem2->bhfi.nFileSizeLow) {
-                return (pItem1->bhfi.nFileSizeLow < pItem2->bhfi.nFileSizeLow) ? -1 : 1;
-            }
-            break;
-        case ID_VIEW_SORT_BY_DATE:
-            return CompareFileTime(&pItem1->bhfi.ftLastWriteTime, &pItem2->bhfi.ftLastWriteTime);
-            break;
-               }
-    }
-    return 0;
-}
-
-static void CmdSortItems(HWND hWnd, UINT cmd)
-{
-       CheckMenuItem(Globals.hMenuView, ID_VIEW_SORT_BY_NAME, MF_BYCOMMAND);
-       CheckMenuItem(Globals.hMenuView, ID_VIEW_SORT_BY_TYPE, MF_BYCOMMAND);
-       CheckMenuItem(Globals.hMenuView, ID_VIEW_SORT_BY_SIZE, MF_BYCOMMAND);
-       CheckMenuItem(Globals.hMenuView, ID_VIEW_SORT_BY_DATE, MF_BYCOMMAND);
-    ListView_SortItems(hWnd, &CompareFunc, cmd);
-    CheckMenuItem(Globals.hMenuView, cmd, MF_BYCOMMAND | MF_CHECKED);
-}
-
-void RefreshList(HWND hWnd, Entry* entry)
-{
-    if (hWnd != NULL) {
-        ListView_DeleteAllItems(hWnd);
-        if (entry != NULL) {
-            //TRACE("RefreshList(...) entry name: %s\n", entry->data.cFileName);
-           InsertListEntries(hWnd, entry, -1);
-        }
-    }
-}
-
-static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
-       switch (LOWORD(wParam)) {
-    case ID_FILE_OPEN:
-        {
-            LVITEM item;
-            item.mask = LVIF_PARAM;
-//            UINT selected_count = ListView_GetSelectedCount(hWnd);
-            item.iItem = ListView_GetNextItem(hWnd, -1, LVNI_SELECTED);
-            if (item.iItem != -1) {
-                if (ListView_GetItem(hWnd, &item)) {
-                    Entry* entry = (Entry*)item.lParam;
-                    OpenTarget(hWnd, entry->data.cFileName);
-                }
-            }
-        }
-        break;
-    case ID_FILE_MOVE:
-        //OnFileMove(hWnd);
-        break;
-    case ID_FILE_COPY:
-    case ID_FILE_COPY_CLIPBOARD:
-    case ID_FILE_DELETE:
-    case ID_FILE_RENAME:
-        break;
-    case ID_FILE_PROPERTIES:
-        {
-            LVITEM item;
-            item.mask = LVIF_PARAM;
-            item.iItem = ListView_GetNextItem(hWnd, -1, LVNI_SELECTED);
-            if (item.iItem != -1) {
-                if (ListView_GetItem(hWnd, &item)) {
-                    Entry* entry = (Entry*)item.lParam;
-                    struct PropertiesDialog dlg = { _T("empty"), 0, entry };
-                    if (DialogBoxParam(Globals.hInstance, MAKEINTRESOURCE(IDD_DIALOG_PROPERTIES), hWnd, PropertiesDlgProc, (LPARAM)&dlg) == IDOK) {
-                    }
-                }
-            }
-        }
-        break;
-
-    case ID_FILE_COMPRESS:
-    case ID_FILE_UNCOMPRESS:
-        break;
-    case ID_FILE_RUN:
-        OnFileRun();
-        break;
-    case ID_FILE_PRINT:
-    case ID_FILE_ASSOCIATE:
-    case ID_FILE_CREATE_DIRECTORY:
-        break;
-    case ID_VIEW_SORT_BY_NAME:
-    case ID_VIEW_SORT_BY_TYPE:
-    case ID_VIEW_SORT_BY_SIZE:
-    case ID_VIEW_SORT_BY_DATE:
-        CmdSortItems(hWnd, LOWORD(wParam));
-        break;
-    case ID_WINDOW_REFRESH:
-        RefreshList(hWnd, NULL/*entry*/);
-        break;
-    default:
-        return FALSE;
-    }
-    return TRUE;
-}
-
-static LRESULT CALLBACK ListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
-       ChildWnd* child = (ChildWnd*)GetWindowLong(GetParent(hWnd), GWL_USERDATA);
-       Pane* pane = (Pane*)GetWindowLong(hWnd, GWL_USERDATA);
-       ASSERT(child);
-
-       switch (message) {
-       case WM_COMMAND:
-        if (_CmdWndProc(hWnd, message, wParam, lParam)) {
-            return 0;
-        }
-               break;
-       case WM_DISPATCH_COMMAND:
-               return _CmdWndProc(hWnd, message, wParam, lParam);
-    case WM_NOTIFY:
-        switch (((LPNMHDR)lParam)->code) {
-        case LVN_GETDISPINFO:
-            OnGetDispInfo((NMLVDISPINFO*)lParam);
-            return 0;
-        case NM_DBLCLK:
-            {
-            NMITEMACTIVATE* nmitem = (LPNMITEMACTIVATE)lParam;
-            LVHITTESTINFO info;
-
-            if (nmitem->hdr.hwndFrom != hWnd) break;
-//            if (nmitem->hdr.idFrom != IDW_LISTVIEW) break;
-//            if (nmitem->hdr.code != ???) break;
-#ifdef _MSC_VER
-            switch (nmitem->uKeyFlags) {
-            case LVKF_ALT:     //  The ALT key is pressed.
-                // properties dialog box ?
-                break;
-            case LVKF_CONTROL: //  The CTRL key is pressed.
-                // run dialog box for providing parameters...
-                break;
-            case LVKF_SHIFT:   //  The SHIFT key is pressed.
-                break;
-            }
-#endif
-            info.pt.x = nmitem->ptAction.x;
-            info.pt.y = nmitem->ptAction.y;
-            if (ListView_HitTest(hWnd, &info) != -1) {
-                LVITEM item;
-                item.mask = LVIF_PARAM;
-                item.iItem = info.iItem;
-                if (ListView_GetItem(hWnd, &item)) {
-                    Entry* entry = (Entry*)item.lParam;
-                    OpenTarget(hWnd, entry->data.cFileName);
-                }
-            }
-            }
-            return 0;
-        case LVN_ENDLABELEDIT:
-            return OnEndLabelEdit((NMLVDISPINFO*)lParam);
-        }
-               break;
-
-       case WM_SETFOCUS:
-               child->nFocusPanel = pane==&child->right? 1: 0;
-               //ListView_SetSelectionMark(hWnd, 0);
-               //TODO: check menu items
-               break;
-
-       case WM_KEYDOWN:
-               if (wParam == VK_TAB) {
-                       //TODO: SetFocus(Globals.hDriveBar)
-                       SetFocus(child->nFocusPanel ? child->hTreeWnd: child->hListWnd);
-               }
-        break;
-       }
-    return CallWindowProc(g_orgListWndProc, hWnd, message, wParam, lParam);
-}
-
-void CreateListWnd(HWND parent, Pane* pane, int id, LPTSTR lpszPathName)
-{
-    RECT rcClient;  // dimensions of client area
-       Entry* entry = pane->root;
-
-//     pane->treePane = 0;
-
-    GetClientRect(parent, &rcClient);
-    pane->hWnd = CreateWindowEx(0, WC_LISTVIEW, _T("List View"),
-        WS_VISIBLE | WS_CHILD | WS_BORDER | LVS_REPORT/* | LVS_NOCOLUMNHEADER*/,
-        0, 0, rcClient.right, rcClient.bottom,
-        parent, (HMENU)id, hInst, NULL);
-    // Initialize the image list, and add items to the control.
-/*
-    if (!InitListViewImageLists(pane->hWnd) ||
-            !InitListViewItems(pane->hWnd, lpszPathName)) {
-        DestroyWindow(pane->hWnd);
-        return FALSE;
-    }
- */
-    ListView_SetExtendedListViewStyle(pane->hWnd,  LVS_EX_FULLROWSELECT);
-    CreateListColumns(pane->hWnd);
-
-       SetWindowLong(pane->hWnd, GWL_USERDATA, (LPARAM)pane);
-       g_orgListWndProc = SubclassWindow(pane->hWnd, ListWndProc);
-       SendMessage(pane->hWnd, WM_SETFONT, (WPARAM)Globals.hFont, FALSE);
-
-    // insert entries into listbox
-    if (entry) {
-               InsertListEntries(pane->hWnd, entry, -1);
-    }
-}
-
-HWND CreateListView(HWND hwndParent, ChildWnd* pChildWnd, int id)
-{
-    RECT rcClient;
-    HWND hwndLV;
-
-    // Get the dimensions of the parent window's client area, and create the list view control.
-    GetClientRect(hwndParent, &rcClient);
-    hwndLV = CreateWindowEx(WS_EX_CLIENTEDGE, WC_LISTVIEW, _T("List View"),
-        WS_VISIBLE | WS_CHILD | LVS_REPORT,
-        0, 0, rcClient.right, rcClient.bottom,
-        hwndParent, (HMENU)id, hInst, NULL);
-    ListView_SetExtendedListViewStyle(hwndLV,  LVS_EX_FULLROWSELECT);
-
-    // Initialize the image list, and add items to the control.
-/*
-    if (!InitListViewImageLists(hwndLV) ||
-            !InitListViewItems(hwndLV, szName)) {
-        DestroyWindow(hwndLV);
-        return FALSE;
-    }
- */
-    CreateListColumns(hwndLV);
-       g_orgListWndProc = SubclassWindow(hwndLV, ListWndProc);
-    return hwndLV;
-}
-
diff --git a/rosapps/winfile/listview.h b/rosapps/winfile/listview.h
deleted file mode 100644 (file)
index f32ad50..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  listview.h
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __LISTVIEW_H__
-#define __LISTVIEW_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-void CreateListWnd(HWND parent, Pane* pane, int id, LPTSTR lpszPathName);
-void RefreshList(HWND hWnd, Entry* entry);
-
-HWND CreateListView(HWND hwndParent, ChildWnd* pChildWnd, int id);
-
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __LISTVIEW_H__
diff --git a/rosapps/winfile/main.c b/rosapps/winfile/main.c
deleted file mode 100644 (file)
index 727928d..0000000
+++ /dev/null
@@ -1,469 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  main.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <commctrl.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <memory.h>
-#include <tchar.h>
-#include <process.h>
-#include <stdio.h>
-
-#include "main.h"
-#include "settings.h"
-#include "framewnd.h"
-#include "childwnd.h"
-#include "drivebar.h"
-
-
-////////////////////////////////////////////////////////////////////////////////
-// Global Variables:
-//
-UINT OemCodePage;
-UINT AnsiCodePage;
-LCID UserDefaultLCID;
-
-HINSTANCE hInst;
-#ifdef USE_GLOBAL_STRUCT
-WINFILE_GLOBALS Globals;
-#else
-HINSTANCE   hInstance;
-HACCEL     hAccel;
-HWND           hMainWnd;
-HMENU          hMenuFrame;
-HMENU          hWindowsMenu;
-HMENU          hLanguageMenu;
-HMENU          hMenuView;
-HMENU          hMenuOptions;
-HWND           hMDIClient;
-HWND           hStatusBar;
-HWND           hToolBar;
-HWND           hDriveBar;
-HFONT          hFont;
-HWND        hDriveCombo;
-
-
-TCHAR          num_sep;
-SIZE           spaceSize;
-HIMAGELIST  himl;
-
-TCHAR          drives[BUFFER_LEN];
-BOOL           prescan_node;   //TODO
-
-LPCSTR     lpszLanguage;
-UINT           wStringTableOffset;
-#endif
-
-TCHAR szTitle[MAX_LOADSTRING];
-TCHAR szFrameClass[MAX_LOADSTRING];
-TCHAR szChildClass[MAX_LOADSTRING];
-
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//
-//   FUNCTION: InitInstance(HANDLE, int)
-//
-//   PURPOSE: Saves instance handle and creates main window
-//
-//   COMMENTS:
-//
-//        In this function, we save the instance handle in a global variable and
-//        create and display the main program window.
-//
-BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
-{
-       WNDCLASSEX wcFrame = {
-               sizeof(WNDCLASSEX),
-               CS_HREDRAW | CS_VREDRAW/*style*/,
-               FrameWndProc,
-               0/*cbClsExtra*/,
-               0/*cbWndExtra*/,
-               hInstance,
-               LoadIcon(hInstance, MAKEINTRESOURCE(IDI_WINFILE)),
-               LoadCursor(0, IDC_ARROW),
-               0/*hbrBackground*/,
-               0/*lpszMenuName*/,
-               szFrameClass,
-               (HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDI_WINFILE), IMAGE_ICON,
-                       GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED)
-       };
-       ATOM hFrameWndClass = RegisterClassEx(&wcFrame); // register frame window class
-
-       WNDCLASS wcChild = {
-               CS_CLASSDC|CS_DBLCLKS|CS_VREDRAW,
-               ChildWndProc,
-               0/*cbClsExtra*/,
-               0/*cbWndExtra*/,
-               hInstance,
-               0/*hIcon*/,
-               LoadCursor(0, IDC_ARROW),
-               0/*hbrBackground*/,
-               0/*lpszMenuName*/,
-               szChildClass
-       };
-
-       ATOM hChildClass = RegisterClass(&wcChild); // register child windows class
-
-       HMENU hMenuFrame = LoadMenu(hInstance, MAKEINTRESOURCE(IDC_WINFILE));
-       HMENU hMenuWindow = GetSubMenu(hMenuFrame, GetMenuItemCount(hMenuFrame)-2);
-
-       CLIENTCREATESTRUCT ccs = {
-               hMenuWindow, IDW_FIRST_CHILD
-       };
-
-       INITCOMMONCONTROLSEX icc = {
-               sizeof(INITCOMMONCONTROLSEX),
-               ICC_BAR_CLASSES | ICC_USEREX_CLASSES
-       };
-
-//    icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
-//    icex.dwICC = ICC_USEREX_CLASSES;
-
-
-//     TCHAR path[MAX_PATH];
-
-       HDC hdc = GetDC(0);
-
-//     hMenuFrame = hMenuFrame;
-       Globals.hMenuView = GetSubMenu(hMenuFrame, 3);
-       Globals.hMenuOptions = GetSubMenu(hMenuFrame, 4);
-       Globals.hAccel = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_WINFILE));
-       Globals.hFont = CreateFont(-MulDiv(8,GetDeviceCaps(hdc,LOGPIXELSY),72), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _T("MS Sans Serif"));
-       ReleaseDC(0, hdc);
-
-       Globals.hMainWnd = CreateWindowEx(0, (LPCTSTR)(int)hFrameWndClass, szTitle,
-                           WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN,
-                                       CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
-                                       0/*hWndParent*/, hMenuFrame, hInstance, NULL/*lpParam*/);
-    if (!Globals.hMainWnd) {
-        return FALSE;
-    }
-
-    if (InitCommonControlsEx(&icc))    {
-//             TBBUTTON drivebarBtn = {0, 0, TBSTATE_ENABLED, TBSTYLE_SEP};
-               TBBUTTON drivebarBtn = {0, 0, TBSTATE_ENABLED, TBSTYLE_SEP};
-//             int btn = 1;
-//             PTSTR p;
-
-        {
-#define DRIVEBOX_WIDTH  200
-#define DRIVEBOX_HEIGHT 8
-/*
-typedef struct _TBBUTTON {
-    int iBitmap;
-    int idCommand;
-    BYTE fsState;
-    BYTE fsStyle;
-    DWORD dwData;
-    INT_PTR iString;
-} TBBUTTON, NEAR* PTBBUTTON, FAR* LPTBBUTTON;
- */
-               TBBUTTON toolbarBtns[] = {
-                       {DRIVEBOX_WIDTH+10, 0, 0, TBSTYLE_SEP},
-                       {0, 0, 0, TBSTYLE_SEP},
-
-//                     {1, ID_FILE_OPEN, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, ID_FILE_OPEN },
-//                     {2, ID_FILE_MOVE, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, ID_FILE_MOVE},
-//                     {3, ID_FILE_COPY, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, ID_FILE_COPY},
-//                     {4, ID_FILE_COPY_CLIPBOARD, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, ID_FILE_COPY_CLIPBOARD},
-                       {5, ID_FILE_DELETE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {6, ID_FILE_RENAME, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {7, ID_FILE_PROPERTIES, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {8, ID_FILE_COMPRESS, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {9, ID_FILE_UNCOMPRESS, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {10, ID_FILE_RUN, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {10, ID_FILE_PRINT, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {11, ID_FILE_ASSOCIATE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {12, ID_FILE_CREATE_DIRECTORY, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {13, ID_FILE_SEARCH, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {14, ID_FILE_SELECT_FILES, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {16, ID_FILE_EXIT, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {15, ID_DISK_COPY_DISK, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {16, ID_DISK_LABEL_DISK, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {17, ID_DISK_FORMAT_DISK, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {18, ID_DISK_CONNECT_NETWORK_DRIVE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {19, ID_DISK_DISCONNECT_NETWORK_DRIVE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {20, ID_DISK_SHARE_AS, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {21, ID_DISK_STOP_SHARING, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {24, ID_DISK_SELECT_DRIVE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {25, ID_TREE_EXPAND_ONE_LEVEL, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {26, ID_TREE_EXPAND_BRANCH, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {27, ID_TREE_EXPAND_ALL, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {28, ID_TREE_COLLAPSE_BRANCH, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {22, ID_TREE_INDICATE_EXPANDABLE_BRANCHES, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {30, ID_VIEW_TREE_DIRECTORY, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {31, ID_VIEW_TREE_ONLY, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {32, ID_VIEW_DIRECTORY_ONLY, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {33, ID_VIEW_SPLIT, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {23, ID_VIEW_NAME, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {24, ID_VIEW_ALL_FILE_DETAILS, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {25, ID_VIEW_PARTIAL_DETAILS, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {37, ID_VIEW_SORT_BY_NAME, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {38, ID_VIEW_SORT_BY_TYPE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {39, ID_VIEW_SORT_BY_SIZE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {40, ID_VIEW_SORT_BY_DATE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {26, ID_VIEW_BY_FILE_TYPE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {27, ID_OPTIONS_CONFIRMATION, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {28, ID_OPTIONS_FONT, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {29, ID_OPTIONS_CUSTOMISE_TOOLBAR, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {45, ID_OPTIONS_TOOLBAR, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {46, ID_OPTIONS_DRIVEBAR, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {47, ID_OPTIONS_STATUSBAR, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {30, ID_OPTIONS_OPEN_NEW_WINDOW_ON_CONNECT, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {31, ID_OPTIONS_MINIMISE_ON_USE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {32, ID_OPTIONS_SAVE_ON_EXIT, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {33, ID_SECURITY_PERMISSIONS, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {34, ID_SECURITY_AUDITING, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {35, ID_SECURITY_OWNER, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {36, ID_WINDOW_NEW_WINDOW, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {37, ID_WINDOW_CASCADE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {38, ID_WINDOW_TILE_HORZ, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {39, ID_WINDOW_TILE_VERT, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {40, ID_WINDOW_ARRANGE_ICONS, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {41, ID_WINDOW_REFRESH, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-                       {42, ID_HELP_CONTENTS, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {61, ID_HELP_SEARCH_HELP, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {62, ID_HELP_HOW_TO_USE_HELP, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {63, ID_HELP_ABOUT, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-
-
-//                     {0, ID_WINDOW_NEW_WINDOW, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {1, ID_WINDOW_CASCADE, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {2, ID_WINDOW_TILE_HORZ, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {3, ID_WINDOW_TILE_VERT, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {4, 2/*TODO: ID_...*/, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-//                     {5, 2/*TODO: ID_...*/, TBSTATE_ENABLED, TBSTYLE_BUTTON},
-               };
-
-//             Globals.hToolBar = CreateToolbarEx(Globals.hMainWnd, WS_CHILD|WS_VISIBLE|TBSTYLE_TOOLTIPS|TBSTYLE_FLAT,
-               Globals.hToolBar = CreateToolbarEx(Globals.hMainWnd, WS_CHILD|WS_VISIBLE|TBSTYLE_TOOLTIPS|CCS_ADJUSTABLE,
-                       IDW_TOOLBAR, 2, hInstance, IDB_TOOLBAR, toolbarBtns,
-                       sizeof(toolbarBtns)/sizeof(TBBUTTON), 16, 15, 16, 15, sizeof(TBBUTTON));
-               CheckMenuItem(Globals.hMenuOptions, ID_OPTIONS_TOOLBAR, MF_BYCOMMAND|MF_CHECKED);
-
-        {
-            // Create the edit control. Notice that the parent of
-            // the toolbar, is used as the parent of the edit control.
-            //hWndEdit = CreateWindowEx(0L, WC_COMBOBOXEX, NULL, WS_CHILD | WS_BORDER | WS_VISIBLE
-#if 0
-            Globals.hDriveCombo = CreateWindowEx(0L, _T("ComboBox"), NULL,
-                WS_CHILD | WS_BORDER | WS_VISIBLE | CBS_DROPDOWNLIST | ES_LEFT | ES_AUTOVSCROLL | ES_MULTILINE,
-                10, 0, DRIVEBOX_WIDTH, DRIVEBOX_HEIGHT, Globals.hMainWnd, (HMENU)IDW_DRIVEBOX, hInstance, 0);
-#else
-#ifndef __GNUC__
-    Globals.hDriveCombo = CreateWindowEx(0, WC_COMBOBOXEX, NULL,
-                                       WS_CHILD | WS_BORDER | WS_VISIBLE | CBS_DROPDOWN,
-                                       // No size yet--resize after setting image list.
-                                       10,     // Vertical position of Combobox
-                                       0,      // Horizontal position of Combobox
-                                       200,    // Sets the width of Combobox
-                                       100,    // Sets the height of Combobox
-                                       Globals.hMainWnd,
-                                       (HMENU)IDW_DRIVEBOX,
-                                       hInstance,
-                                       NULL);
-#endif
-#endif
-            // Set the toolbar window as the parent of the edit control
-            // window. You must set the toolbar as the parent of the edit
-            // control for it to appear embedded in the toolbar.
-            SetParent(Globals.hDriveCombo, Globals.hToolBar);
-        }
-               }
-
-    // Create the drive bar
-        Globals.hDriveBar = CreateToolbarEx(Globals.hMainWnd,
-                               WS_CHILD|WS_VISIBLE|CCS_NOMOVEY|TBSTYLE_FLAT|TBSTYLE_LIST|TBSTYLE_WRAPABLE,
-//                    WS_CHILD|WS_VISIBLE|CCS_NOMOVEY|TBSTYLE_LIST|TBSTYLE_TRANSPARENT|TBSTYLE_WRAPABLE,
-                                       IDW_DRIVEBAR, 2, hInstance, IDB_DRIVEBAR,
-                                       &drivebarBtn, 1/*iNumButtons*/,
-                                       25/*dxButton*/, 16/*dyButton*/,
-                                       0/*dxBitmap*/, 0/*dyBitmap*/, sizeof(TBBUTTON));
-//                                     16/*dxButton*/, 13/*dyButton*/,
-//                                     16/*dxBitmap*/, 13/*dyBitmap*/, sizeof(TBBUTTON));
-               CheckMenuItem(Globals.hMenuOptions, ID_OPTIONS_DRIVEBAR, MF_BYCOMMAND|MF_CHECKED);
-        ConfigureDriveBar(Globals.hDriveBar);
-
-        // Create the status bar
-        Globals.hStatusBar = CreateStatusWindow(WS_VISIBLE|WS_CHILD|WS_CLIPSIBLINGS|SBT_NOBORDERS,
-                                    _T(""), Globals.hMainWnd, IDW_STATUS_WINDOW);
-        if (!Globals.hStatusBar)
-            return FALSE;
-       CheckMenuItem(Globals.hMenuOptions, ID_OPTIONS_STATUSBAR, MF_BYCOMMAND|MF_CHECKED);
-
-        // Create the status bar panes
-       SetupStatusBar(FALSE);
-       }
-
-#if 0
-       //Globals.hstatusbar = CreateStatusWindow(WS_CHILD|WS_VISIBLE, 0, Globals.Globals.hMainWnd, IDW_STATUSBAR);
-       //CheckMenuItem(Globals.Globals.hMenuOptions, ID_OPTIONS_STATUSBAR, MF_BYCOMMAND|MF_CHECKED);
-/* CreateStatusWindow does not accept WS_BORDER */
-/* Globals.hstatusbar = CreateWindowEx(WS_EX_NOPARENTNOTIFY, STATUSCLASSNAME, 0,
-                                       WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_BORDER|CCS_NODIVIDER, 0,0,0,0,
-                                       Globals.Globals.hMainWnd, (HMENU)IDW_STATUSBAR, hinstance, 0);*/
-    //TODO: read paths and window placements from registry
-       GetCurrentDirectory(MAX_PATH, path);
-       child = alloc_child_window(path);
-       child->pos.showCmd = SW_SHOWMAXIMIZED;
-       child->pos.rcNormalPosition.left = 0;
-       child->pos.rcNormalPosition.top = 0;
-       child->pos.rcNormalPosition.right = 320;
-       child->pos.rcNormalPosition.bottom = 280;
-       if (!create_child_window(child))
-               free(child);
-       SetWindowPlacement(child->hWnd, &child->pos);
-       Globals.himl = ImageList_LoadBitmap(Globals.hInstance, MAKEINTRESOURCE(IDB_IMAGES), 16, 0, RGB(0,255,0));
-       Globals.prescan_node = FALSE;
-#endif
-
-    ShowWindow(Globals.hMainWnd, nCmdShow);
-    UpdateWindow(Globals.hMainWnd);
-       UpdateStatusBar();
-    return TRUE;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-void SetupStatusBar(BOOL bResize)
-{
-    int nParts[4];
-//             int parts[] = {300, 500};
-//             SendMessage(Globals.hStatusBar, WM_SIZE, 0, 0);
-//             SendMessage(Globals.hStatusBar, SB_SETPARTS, 2, (LPARAM)&parts);
-
-    // Create the status bar panes
-    nParts[0] = 350;
-    nParts[1] = 700;
-    nParts[2] = 800;
-    nParts[3] = 900;
-
-       if (bResize)
-               SendMessage(Globals.hStatusBar, WM_SIZE, 0, 0);
-    SendMessage(Globals.hStatusBar, SB_SETPARTS, 4, (long)nParts);
-}
-
-void UpdateStatusBar(void)
-{
-//  TCHAR text[260];
-//     DWORD size;
-
-//     size = sizeof(text)/sizeof(TCHAR);
-//     GetUserName(text, &size);
-//  SendMessage(Globals.hStatusBar, SB_SETTEXT, 0, (LPARAM)text);
-//     size = sizeof(text)/sizeof(TCHAR);
-//     GetComputerName(text, &size);
-//  SendMessage(Globals.hStatusBar, SB_SETTEXT, 1, (LPARAM)text);
-}
-
-
-static int g_foundPrevInstance = 0;
-
-// search for already running instances
-static BOOL CALLBACK EnumWndProc(HWND hWnd, LPARAM lparam)
-{
-       TCHAR cls[128];
-
-       GetClassName(hWnd, cls, 128);
-       if (!lstrcmp(cls, (LPCTSTR)lparam)) {
-               g_foundPrevInstance++;
-        SetForegroundWindow(hWnd);
-               return FALSE;
-       }
-       return TRUE;
-}
-
-
-void ExitInstance(void)
-{
-    if (Globals.himl)
-           ImageList_Destroy(Globals.himl);
-}
-
-/*
-struct _cpinfo {
-  UINT MaxCharSize;
-  BYTE DefaultChar[MAX_DEFAULTCHAR];
-  BYTE LeadByte[MAX_LEADBYTES];
-} CPINFO, *LPCPINFO;
- */
-
-int APIENTRY WinMain(HINSTANCE hInstance,
-                     HINSTANCE hPrevInstance,
-                     LPSTR     lpCmdLine,
-                     int       nCmdShow)
-{
-    MSG msg;
-    HACCEL hAccel;
-    HWND hMDIClient;
-
-    CPINFO CPinfo;
-
-    OemCodePage = GetOEMCP();
-    AnsiCodePage = GetACP();
-    UserDefaultLCID = GetUserDefaultLCID();
-    if (GetCPInfo(UserDefaultLCID, &CPinfo)) {
-
-    }
-
-    // Initialize global strings
-    LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
-    LoadString(hInstance, IDC_WINFILE, szFrameClass, MAX_LOADSTRING);
-    LoadString(hInstance, IDC_WINFILE_CHILD, szChildClass, MAX_LOADSTRING);
-
-       // Allow only one running instance
-    EnumWindows(EnumWndProc, (LPARAM)szFrameClass);
-    if (g_foundPrevInstance) {
-               return 1;
-    }
-
-    // Store instance handle in our global variable
-    hInst = hInstance;
-
-    LoadSettings();
-
-    // Perform application initialization:
-    if (!InitInstance(hInstance, nCmdShow)) {
-        return FALSE;
-    }
-
-//    hAccel = LoadAccelerators(hInstance, (LPCTSTR)IDC_WINFILE);
-    hAccel = LoadAccelerators(hInstance, (LPCTSTR)IDR_ACCELERATOR1);
-
-    hMDIClient = GetWindow(Globals.hMainWnd, GW_CHILD);
-
-    // Main message loop:
-       while (GetMessage(&msg, (HWND)NULL, 0, 0)) {
-        if (!TranslateMDISysAccel(hMDIClient, &msg) &&
-            !TranslateAccelerator(Globals.hMainWnd/*hwndFrame*/, hAccel, &msg)) {
-            TranslateMessage(&msg);
-            DispatchMessage(&msg);
-               }
-       }
-
-    SaveSettings();
-       ExitInstance();
-    return msg.wParam;
-}
diff --git a/rosapps/winfile/main.h b/rosapps/winfile/main.h
deleted file mode 100644 (file)
index cfafa03..0000000
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  main.h
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-/*
- * Based on Winefile, Copyright 2000 martin Fuchs <martin-fuchs@gmx.net>
- */
-
-#ifndef __MAIN_H__
-#define __MAIN_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#include "resource.h"
-#include "entries.h"
-
-
-////////////////////////////////////////////////////////////////////////////////
-
-#define MAX_LOADSTRING 100
-#define        BUFFER_LEN      1024
-
-#define        WM_DISPATCH_COMMAND     0xBF80
-
-////////////////////////////////////////////////////////////////////////////////
- // range for drive bar command ids: 0x9000..0x90FF
-#define        ID_DRIVE_FIRST                                  0x9001
-
-
-#define _NO_EXTENSIONS
-
-enum IMAGE {
-       IMG_NONE=-1,    IMG_FILE=0,                     IMG_DOCUMENT,   IMG_EXECUTABLE,
-       IMG_FOLDER,             IMG_OPEN_FOLDER,        IMG_FOLDER_PLUS,IMG_OPEN_PLUS,  IMG_OPEN_MINUS,
-       IMG_FOLDER_UP,  IMG_FOLDER_CUR
-};
-
-#define        IMAGE_WIDTH                     16
-#define        IMAGE_HEIGHT            13
-#define        SPLIT_WIDTH                     3
-
-#define IDW_STATUSBAR          0x100
-#define IDW_TOOLBAR                    0x101
-#define IDW_DRIVEBAR           0x102
-#define IDW_DRIVEBOX        0x103
-
-#define        IDW_FIRST_CHILD         0xC000  //0x200
-
-//#define IDW_TREE_LEFT                3
-//#define IDW_TREE_RIGHT               6
-//#define IDW_HEADER_LEFT              2
-//#define IDW_HEADER_RIGHT     5
-
-#define IDW_STATUS_WINDOW   7
-
-#define TREE_WINDOW         8
-#define LIST_WINDOW         9
-
-////////////////////////////////////////////////////////////////////////////////
-void _wsplitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR* ext);
-void _splitpath(const CHAR* path, CHAR* drv, CHAR* dir, CHAR* name, CHAR* ext);
-
-#ifdef _UNICODE
-#define _tsplitpath _wsplitpath
-#else
-#define _tsplitpath _splitpath
-#endif
-
-////////////////////////////////////////////////////////////////////////////////
-
-enum OPTION_FLAGS {
-    OPTIONS_OPEN_NEW_WINDOW_ON_CONNECT = 0x01,
-    OPTIONS_MINIMISE_ON_USE            = 0x02,
-    OPTIONS_SAVE_ON_EXIT                  = 0x04,
-};
-
-////////////////////////////////////////////////////////////////////////////////
-
-enum COLUMN_FLAGS {
-       COL_SIZE                = 0x01,
-       COL_DATE                = 0x02,
-       COL_TIME                = 0x04,
-       COL_ATTRIBUTES  = 0x08,
-       COL_DOSNAMES    = 0x10,
-#ifdef _NO_EXTENSIONS
-       COL_ALL = COL_SIZE|COL_DATE|COL_TIME|COL_ATTRIBUTES|COL_DOSNAMES
-#else
-       COL_INDEX               = 0x20,
-       COL_LINKS               = 0x40,
-       COL_ALL = COL_SIZE|COL_DATE|COL_TIME|COL_ATTRIBUTES|COL_DOSNAMES|COL_INDEX|COL_LINKS
-#endif
-};
-
-#define USE_GLOBAL_STRUCT
-#ifdef USE_GLOBAL_STRUCT
-typedef struct
-{
-  HINSTANCE hInstance;
-  HACCEL       hAccel;
-  HWND         hMainWnd;
-  HMENU                hMenuFrame;
-  HMENU                hWindowsMenu;
-  HMENU                hLanguageMenu;
-  HMENU                hMenuView;
-  HMENU                hMenuOptions;
-  HWND         hMDIClient;
-  HWND         hStatusBar;
-  HWND         hToolBar;
-  HWND         hDriveBar;
-  HFONT                hFont;
-  HWND      hDriveCombo;
-
-  TCHAR                num_sep;
-  SIZE         spaceSize;
-  HIMAGELIST himl;
-
-  TCHAR                drives[BUFFER_LEN];
-  BOOL         prescan_node;   //TODO
-
-  LPCSTR       lpszLanguage;
-  UINT         wStringTableOffset;
-  enum OPTION_FLAGS Options;
-
-} WINFILE_GLOBALS;
-
-extern WINFILE_GLOBALS Globals;
-
-#define STRINGID(id) (Globals.wStringTableOffset + 0x##id)
-
-#else
-
-extern HINSTANCE hInstance;
-extern HACCEL  hAccel;
-extern HWND            hMainWnd;
-extern HMENU   hMenuFrame;
-extern HMENU   hWindowsMenu;
-extern HMENU   hLanguageMenu;
-extern HMENU   hMenuView;
-extern HMENU   hMenuOptions;
-extern HWND            hMDIClient;
-extern HWND            hStatusBar;
-extern HWND            hToolBar;
-extern HWND            hDriveBar;
-extern HFONT   hFont;
-
-extern TCHAR   num_sep;
-extern SIZE            spaceSize;
-extern HIMAGELIST himl;
-
-extern TCHAR   drives[BUFFER_LEN];
-extern BOOL            prescan_node;   //TODO
-
-extern LPCSTR  lpszLanguage;
-extern UINT            wStringTableOffset;
-
-#define Globals.
-
-#endif
-
-extern UINT OemCodePage;
-extern UINT AnsiCodePage;
-extern LCID UserDefaultLCID;
-
-extern HINSTANCE hInst;
-extern TCHAR szTitle[];
-extern TCHAR szFrameClass[];
-extern TCHAR szChildClass[];
-
-
-void SetupStatusBar(BOOL bResize);
-void UpdateStatusBar(void);
-
-#if __MINGW32_MAJOR_VERSION == 1
-typedef struct tagNMITEMACTIVATE{
-    NMHDR   hdr;
-    int     iItem;
-    int     iSubItem;
-    UINT    uNewState;
-    UINT    uOldState;
-    UINT    uChanged;
-    POINT   ptAction;
-    LPARAM  lParam;
-    UINT    uKeyFlags;
-} NMITEMACTIVATE, FAR *LPNMITEMACTIVATE;
-#endif
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __MAIN_H__
diff --git a/rosapps/winfile/network.c b/rosapps/winfile/network.c
deleted file mode 100644 (file)
index b859825..0000000
+++ /dev/null
@@ -1,375 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  network.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <commctrl.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <memory.h>
-#include <tchar.h>
-#include <process.h>
-#include <stdio.h>
-
-#include "main.h"
-#include "network.h"
-
-#include "trace.h"
-
-
-////////////////////////////////////////////////////////////////////////////////
-// Global Variables:
-//
-
-static HANDLE hNetworkMonitorThreadEvent = NULL;       // When this event becomes signaled then we run the monitor thread
-
-static HMODULE hMPR;
-static BOOL bNetAvailable = FALSE;
-
-typedef DWORD (WINAPI *WNetCloseEnum_Ptr)(HANDLE);
-typedef DWORD (WINAPI *WNetConnectionDialog_Ptr)(HWND, DWORD);
-typedef DWORD (WINAPI *WNetDisconnectDialog_Ptr)(HWND, DWORD);
-typedef DWORD (WINAPI *WNetConnectionDialog1_Ptr)(LPCONNECTDLGSTRUCT);
-typedef DWORD (WINAPI *WNetDisconnectDialog1_Ptr)(LPDISCDLGSTRUCT);
-typedef DWORD (WINAPI *WNetEnumResourceA_Ptr)(HANDLE, LPDWORD, LPVOID, LPDWORD);
-typedef DWORD (WINAPI *WNetOpenEnumA_Ptr)(DWORD, DWORD, DWORD, LPNETRESOURCE, LPHANDLE);
-
-static WNetCloseEnum_Ptr pWNetCloseEnum;
-static WNetConnectionDialog_Ptr pWNetConnectionDialog;
-static WNetDisconnectDialog_Ptr pWNetDisconnectDialog;
-static WNetConnectionDialog1_Ptr pWNetConnectionDialog1;
-static WNetDisconnectDialog1_Ptr pWNetDisconnectDialog1;
-static WNetEnumResourceA_Ptr pWNetEnumResource;
-static WNetOpenEnumA_Ptr pWNetOpenEnum;
-
-
-////////////////////////////////////////////////////////////////////////////////
-// Local module support methods
-//
-
-static BOOL CheckNetworkAvailable(void)
-{
-
-       hMPR = LoadLibrary(_T("MPR.DLL"));
-    if (hMPR) {
-        pWNetCloseEnum = (WNetCloseEnum_Ptr)(FARPROC)GetProcAddress(hMPR, "WNetCloseEnum");
-        pWNetConnectionDialog = (WNetConnectionDialog_Ptr)(FARPROC)GetProcAddress(hMPR, "WNetConnectionDialog");
-        pWNetDisconnectDialog = (WNetDisconnectDialog_Ptr)(FARPROC)GetProcAddress(hMPR, "WNetDisconnectDialog");
-        pWNetConnectionDialog1 = (WNetConnectionDialog1_Ptr)(FARPROC)GetProcAddress(hMPR, "WNetConnectionDialog1");
-        pWNetDisconnectDialog1 = (WNetDisconnectDialog1_Ptr)(FARPROC)GetProcAddress(hMPR, "WNetDisconnectDialog1");
-        pWNetEnumResource = (WNetEnumResourceA_Ptr)(FARPROC)GetProcAddress(hMPR, "WNetEnumResourceA");
-        pWNetOpenEnum = (WNetOpenEnumA_Ptr)(FARPROC)GetProcAddress(hMPR, "WNetOpenEnumA");
-//     FreeLibrary(hMPR);
-        bNetAvailable = TRUE;
-    }
-    return (hMPR != NULL);
-}
-
-
-static LRESULT CALLBACK EnumNetConnectionsProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
-    return 0;
-}
-
-/*
-DWORD WNetOpenEnum(
-  DWORD dwScope,                // scope of enumeration
-  DWORD dwType,                 // resource types to list
-  DWORD dwUsage,                // resource usage to list
-  LPNETRESOURCE lpNetResource,  // resource structure
-  LPHANDLE lphEnum              // enumeration handle buffer
-);
-
-    result = WNetOpenEnum(RESOURCE_CONNECTED, RESOURCETYPE_DISK, RESOURCEUSAGE_ALL, NULL, &EnumNetConnectionsProc);
-
- */
-DWORD MapNetworkDrives(HWND hWnd, BOOL connect)
-{
-    DWORD result = 0L;
-
-    if (!bNetAvailable) return result;
-#if 1
-    if (connect) {
-        pWNetConnectionDialog(hWnd, RESOURCETYPE_DISK);
-    } else {
-        pWNetDisconnectDialog(hWnd, RESOURCETYPE_DISK);
-    }
-#else
-    if (connect) {
-        NETRESOURCE netResouce;
-        CONNECTDLGSTRUCT connectDlg;
-
-        //netResouce.dwScope;
-        //netResouce.dwType;
-        netResouce.dwDisplayType = 0;
-        //netResouce.dwUsage;
-        //netResouce.lpLocalName;
-        //netResouce.lpRemoteName;
-        //netResouce.lpComment;
-        //netResouce.lpProvider;
-
-        //connectDlg.cbStructure;
-        connectDlg.hwndOwner = hWnd;
-        connectDlg.lpConnRes = &netResouce;
-        //connectDlg.dwFlags;
-        //connectDlg.dwDevNum;
-
-        result = WNetConnectionDialog1(&connectDlg);
-    } else {
-        DISCDLGSTRUCT disconnectDlg;
-        //disconnectDlg.cbStructure;
-        disconnectDlg.hwndOwner = hWnd;
-        //disconnectDlg.lpLocalName;
-        //disconnectDlg.lpRemoteName;
-        //disconnectDlg.dwFlags;
-        result = pWNetDisconnectDialog1(&disconnectDlg);
-    }
-#endif
-    return result;
-}
-
-////////////////////////////////////
-static void NetErrorHandler(HWND hwnd, DWORD dwResult, LPTSTR str)
-{
-    TRACE(_T("NetErrorHandler(0x%08X) %s\n"), dwResult, str);
-}
-
-static void DisplayStruct(HDC hdc, LPNETRESOURCE lpnrLocal)
-{
-    LPTSTR str = NULL;
-    //TRACE(_T("DisplayStruct(%p)\n"), lpnrLocal);
-
-    switch (lpnrLocal->dwScope) {
-    case RESOURCE_CONNECTED: str = _T("Enumerate currently connected resources. The dwUsage member cannot be specified."); break;
-    case RESOURCE_GLOBALNET: str = _T("Enumerate all resources on the network. The dwUsage member is specified."); break;
-    case RESOURCE_REMEMBERED: str = _T("Enumerate remembered (persistent) connections. The dwUsage member cannot be specified."); break;
-    default: str = _T("Unknown Scope."); break;
-    }
-    //TRACE(_T("    %s\n"), str);
-
-    switch (lpnrLocal->dwType) {
-    case RESOURCETYPE_ANY: str = _T("All resources."); break;
-    case RESOURCETYPE_DISK: str = _T("Disk resources."); break;
-    case RESOURCETYPE_PRINT: str = _T("Print resources."); break;
-    default: str = _T("Unknown Type."); break;
-    }
-    //TRACE(_T("    %s\n"), str);
-
-    switch (lpnrLocal->dwDisplayType) {
-    case RESOURCEDISPLAYTYPE_DOMAIN: str = _T("The object should be displayed as a domain."); break;
-    case RESOURCEDISPLAYTYPE_SERVER: str = _T("The object should be displayed as a server."); break;
-    case RESOURCEDISPLAYTYPE_SHARE: str = _T("The object should be displayed as a share."); break;
-    case RESOURCEDISPLAYTYPE_GENERIC: str = _T("The method used to display the object does not matter."); break;
-    default: str = _T("Unknown DisplayType."); break;
-    }
-    //TRACE(_T("    %s\n"), str);
-
-//    switch (lpnrLocal->dwUsage ) {
-//    case RESOURCEUSAGE_CONNECTABLE: str = _T("The resource is a connectable resource; the name pointed to by the lpRemoteName member can be passed to the WNetAddConnection function to make a network connection."); break;
-//    case RESOURCEUSAGE_CONTAINER: str = _T("The resource is a container resource; the name pointed to by the lpRemoteName member can be passed to the WNetOpenEnum function to enumerate the resources in the container."); break;
-//    default: str = _T("Unknown Usage."); break;
-//    }
-    //TRACE(_T("\tLocalName: %s\tRemoteName: %s"), lpnrLocal->lpLocalName, lpnrLocal->lpRemoteName);
-    //TRACE(_T("\tComment: %s\tProvider: %s\n"), lpnrLocal->lpComment, lpnrLocal->lpProvider);
-}
-
-////////////////////////////////////
-
-static BOOL WINAPI EnumerateFunc(HWND hwnd, HDC hdc, LPNETRESOURCE lpnr)
-{
-  DWORD dwResult;
-  DWORD dwResultEnum;
-  HANDLE hEnum;
-  DWORD cbBuffer = 16384;   // 16K is a good size
-  DWORD cEntries = -1;      // enumerate all possible entries
-  LPNETRESOURCE lpnrLocal;  // pointer to enumerated structures
-  DWORD i;
-
-  if (!bNetAvailable) return FALSE;
-
-  // Call the WNetOpenEnum function to begin the enumeration.
-  dwResult = pWNetOpenEnum(RESOURCE_GLOBALNET, // all network resources
-//                          RESOURCETYPE_ANY,   // all resources
-                          RESOURCETYPE_DISK, // disk resources only, exlude printers
-                          0,        // enumerate all resources
-                          lpnr,     // NULL first time the function is called
-                          &hEnum);  // handle to the resource
-
-  if (dwResult != NO_ERROR) {
-    // Process errors with an application-defined error handler.
-    NetErrorHandler(hwnd, dwResult, (LPTSTR)_T("WNetOpenEnum"));
-    return FALSE;
-  }
-
-  // Call the GlobalAlloc function to allocate resources.
-  lpnrLocal = (LPNETRESOURCE)GlobalAlloc(GPTR, cbBuffer);
-
-  do {
-    // Initialize the buffer.
-    ZeroMemory(lpnrLocal, cbBuffer);
-
-    // Call the WNetEnumResource function to continue the enumeration.
-    dwResultEnum = pWNetEnumResource(hEnum,      // resource handle
-                                    &cEntries,  // defined locally as -1
-                                    lpnrLocal,  // LPNETRESOURCE
-                                    &cbBuffer); // buffer size
-
-    // If the call succeeds, loop through the structures.
-    if (dwResultEnum == NO_ERROR) {
-      for (i = 0; i < cEntries; i++) {
-        // Call an application-defined function to display the contents of the NETRESOURCE structures.
-        DisplayStruct(hdc, &lpnrLocal[i]);
-
-        // If the NETRESOURCE structure represents a container resource, call the EnumerateFunc function recursively.
-        if (RESOURCEUSAGE_CONTAINER == (lpnrLocal[i].dwUsage & RESOURCEUSAGE_CONTAINER))
-            if (!EnumerateFunc(hwnd, hdc, &lpnrLocal[i])) {
-                //TextOut(hdc, 10, 10, _T("EnumerateFunc returned FALSE."), 29);
-                TRACE(_T("EnumerateFunc returned FALSE.\n"));
-            }
-      }
-    }
-    // Process errors.
-    else if (dwResultEnum != ERROR_NO_MORE_ITEMS) {
-      NetErrorHandler(hwnd, dwResultEnum, (LPTSTR)_T("WNetEnumResource"));
-      break;
-    }
-  }
-  // End do.
-
-  while (dwResultEnum != ERROR_NO_MORE_ITEMS);
-
-  // Call the GlobalFree function to free the memory.
-  GlobalFree((HGLOBAL)lpnrLocal);
-
-  // Call WNetCloseEnum to end the enumeration.
-  dwResult = pWNetCloseEnum(hEnum);
-
-  if (dwResult != NO_ERROR) {
-    // Process errors.
-    NetErrorHandler(hwnd, dwResult, (LPTSTR)_T("WNetCloseEnum"));
-    return FALSE;
-  }
-  return TRUE;
-}
-
-/*
-
-DWORD WNetConnectionDialog(
-  HWND hwnd,     // handle to window owning dialog box
-  DWORD dwType   // resource type
-);
-
-
-DWORD WNetAddConnection(
-  LPCTSTR lpRemoteName, // network device name
-  LPCTSTR lpPassword,   // password
-  LPCTSTR lpLocalName   // local device name
-);
-
-
-DWORD WNetOpenEnum(
-  DWORD dwScope,                // scope of enumeration
-  DWORD dwType,                 // resource types to list
-  DWORD dwUsage,                // resource usage to list
-  LPNETRESOURCE lpNetResource,  // resource structure
-  LPHANDLE lphEnum              // enumeration handle buffer
-);
- */
-
-////////////////////////////////////////////////////////////////////////////////
-
-void NetworkMonitorThreadProc(void *lpParameter)
-{
-//     ULONG   OldProcessorUsage = 0;
-//     ULONG   OldProcessCount = 0;
-    HWND hWnd = (HWND)lpParameter;
-
-       // Create the event
-       hNetworkMonitorThreadEvent = CreateEvent(NULL, TRUE, TRUE, _T("Winfile Network Monitor Event"));
-
-       // If we couldn't create the event then exit the thread
-       if (!hNetworkMonitorThreadEvent)
-               return;
-
-       while (1) {
-               DWORD   dwWaitVal;
-
-               // Wait on the event
-               dwWaitVal = WaitForSingleObject(hNetworkMonitorThreadEvent, INFINITE);
-
-               // If the wait failed then the event object must have been
-               // closed and the task manager is exiting so exit this thread
-        if (dwWaitVal == WAIT_FAILED) {
-            // CloseHandle(hNetworkMonitorThreadEvent); // Should we close the event object handle or not ???
-            // hNetworkMonitorThreadEvent = NULL; // if we do then check what happens when main thread tries to delete it also....
-                       return;
-        }
-
-               if (dwWaitVal == WAIT_OBJECT_0) {
-                       // Reset our event
-                       ResetEvent(hNetworkMonitorThreadEvent);
-
-
-            if ( EnumerateFunc(hWnd, NULL, NULL) ) {
-
-            }
-
-#if 0
-                       TCHAR   text[260];
-                       if ((ULONG)SendMessage(hProcessPageListCtrl, LVM_GETITEMCOUNT, 0, 0) != PerfDataGetProcessCount())
-                               SendMessage(hProcessPageListCtrl, LVM_SETITEMCOUNT, PerfDataGetProcessCount(), /*LVSICF_NOINVALIDATEALL|*/LVSICF_NOSCROLL);
-                       if (IsWindowVisible(hProcessPage))
-                               InvalidateRect(hProcessPageListCtrl, NULL, FALSE);
-                       if (OldProcessorUsage != PerfDataGetProcessorUsage()) {
-                               OldProcessorUsage = PerfDataGetProcessorUsage();
-                               wsprintf(text, _T("CPU Usage: %3d%%"), OldProcessorUsage);
-                               SendMessage(hStatusWnd, SB_SETTEXT, 1, (LPARAM)text);
-                       }
-                       if (OldProcessCount != PerfDataGetProcessCount()) {
-                               OldProcessCount = PerfDataGetProcessCount();
-                               wsprintf(text, _T("Processes: %d"), OldProcessCount);
-                               SendMessage(hStatusWnd, SB_SETTEXT, 0, (LPARAM)text);
-                       }
-#endif
-               }
-       }
-}
-
-BOOL CreateNetworkMonitorThread(HWND hWnd)
-{
-    CheckNetworkAvailable();
-    _beginthread(NetworkMonitorThreadProc, 0, hWnd);
-    return TRUE;
-}
-
-void SignalNetworkMonitorEvent(void)
-{
-    SetEvent(hNetworkMonitorThreadEvent);
-}
-
-BOOL DestryNetworkMonitorThread(void)
-{
-       CloseHandle(hNetworkMonitorThreadEvent);
-    hNetworkMonitorThreadEvent = NULL;
-    return TRUE;
-}
-
diff --git a/rosapps/winfile/network.h b/rosapps/winfile/network.h
deleted file mode 100644 (file)
index 6fc540c..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *  ReactOS Application Network support routines
- *
- *  network.h
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __NETWORK_H__
-#define __NETWORK_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-BOOL CreateNetworkMonitorThread(HWND hWnd);
-void SignalNetworkMonitorEvent(void);
-BOOL DestryNetworkMonitorThread(void);
-
-DWORD MapNetworkDrives(HWND hWnd, BOOL connect);
-
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __NETWORK_H__
diff --git a/rosapps/winfile/res/drivebar.bmp b/rosapps/winfile/res/drivebar.bmp
deleted file mode 100644 (file)
index a49cb83..0000000
Binary files a/rosapps/winfile/res/drivebar.bmp and /dev/null differ
diff --git a/rosapps/winfile/res/folder.bmp b/rosapps/winfile/res/folder.bmp
deleted file mode 100644 (file)
index dada286..0000000
Binary files a/rosapps/winfile/res/folder.bmp and /dev/null differ
diff --git a/rosapps/winfile/res/folder1.bmp b/rosapps/winfile/res/folder1.bmp
deleted file mode 100644 (file)
index dada286..0000000
Binary files a/rosapps/winfile/res/folder1.bmp and /dev/null differ
diff --git a/rosapps/winfile/res/folder2.bmp b/rosapps/winfile/res/folder2.bmp
deleted file mode 100644 (file)
index 35fedba..0000000
Binary files a/rosapps/winfile/res/folder2.bmp and /dev/null differ
diff --git a/rosapps/winfile/res/folder3.bmp b/rosapps/winfile/res/folder3.bmp
deleted file mode 100644 (file)
index dfc3c4f..0000000
Binary files a/rosapps/winfile/res/folder3.bmp and /dev/null differ
diff --git a/rosapps/winfile/res/folder_open.bmp b/rosapps/winfile/res/folder_open.bmp
deleted file mode 100644 (file)
index 7932eb3..0000000
Binary files a/rosapps/winfile/res/folder_open.bmp and /dev/null differ
diff --git a/rosapps/winfile/res/images.bmp b/rosapps/winfile/res/images.bmp
deleted file mode 100644 (file)
index 22e15f4..0000000
Binary files a/rosapps/winfile/res/images.bmp and /dev/null differ
diff --git a/rosapps/winfile/res/small.ico b/rosapps/winfile/res/small.ico
deleted file mode 100644 (file)
index 8f94d9a..0000000
Binary files a/rosapps/winfile/res/small.ico and /dev/null differ
diff --git a/rosapps/winfile/res/toolbar.bmp b/rosapps/winfile/res/toolbar.bmp
deleted file mode 100644 (file)
index d4fbc51..0000000
Binary files a/rosapps/winfile/res/toolbar.bmp and /dev/null differ
diff --git a/rosapps/winfile/res/winfile.ico b/rosapps/winfile/res/winfile.ico
deleted file mode 100644 (file)
index 930fe4f..0000000
Binary files a/rosapps/winfile/res/winfile.ico and /dev/null differ
diff --git a/rosapps/winfile/resource.h b/rosapps/winfile/resource.h
deleted file mode 100644 (file)
index faad6cb..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by winfile.rc
-//
-#define ID_FILE_MENU                    1
-#define ID_DISK_MENU                    2
-#define ID_TREE_MENU                    3
-#define ID_VIEW_MENU                    4
-#define ID_OPTIONS_MENU                 5
-#define ID_SECURITY_MENU                6
-#define ID_WINDOW_MENU                  7
-#define ID_HELP_MENU                    8
-#define IDS_LIST_COLUMN_FIRST           91
-#define IDS_LIST_COLUMN_NAME            91
-#define IDS_LIST_COLUMN_SIZE            92
-#define IDS_LIST_COLUMN_DATE            93
-#define IDS_LIST_COLUMN_TIME            94
-#define IDS_LIST_COLUMN_ATTRIB          95
-#define IDS_LIST_COLUMN_DOSNAME         96
-#define IDS_LIST_COLUMN_LAST            96
-#define ID_CMD_FIRST                    100
-#define IDD_ABOUTBOX                    104
-#define IDS_APP_TITLE                   105
-#define IDI_WINFILE                     107
-#define IDI_SMALL                       108
-#define IDC_WINFILE                     109
-#define IDC_WINFILE_CHILD               110
-#define IDD_DIALOG1                     131
-#define IDD_DIALOG_FILE_MOVE            131
-#define IDB_FOLDER                      132
-#define IDB_FOLDER_RED                  133
-#define IDB_FOLDER_OPEN                 134
-#define IDB_ROOT                        135
-#define IDB_TOOLBAR                     136
-#define IDB_DRIVEBAR                    137
-#define IDB_IMAGES                      138
-#define IDD_DIALOG_DIRECTORY            144
-#define IDD_DIALOG_VIEW_TYPE            145
-#define IDD_DIALOG_OPTIONS_CONFIRMATON  146
-#define IDR_ACCELERATOR1                147
-#define IDD_DIALOG_PROPERTIES           148
-#define ID_WINDOW_CLOSE                 798
-#define ID_WINDOW_CLOSEALL              799
-#define IDC_VIEW_TYPE_MASK              999
-#define IDC_FILE_MOVE_FROM              1000
-#define IDC_VIEW_TYPE_DIRECTORIES       1001
-#define IDC_FILE_MOVE_TO                1001
-#define IDC_VIEW_TYPE_PROGRAMS          1002
-#define IDC_VIEW_TYPE_DOCUMENTS         1003
-#define IDC_VIEW_TYPE_OTHERS            1004
-#define IDC_VIEW_TYPE_SYSFILES          1005
-#define IDC_CONFIRMATION_FILE_DELETE    1006
-#define IDC_CONFIRMATION_DIR_DELETE     1007
-#define IDC_CHECK_READONLY              1007
-#define IDC_CONFIRMATION_FILE_REPLACE   1008
-#define IDC_CHECK_ARCHIVE               1008
-#define IDC_CONFIRMATION_MOUSE_ACTIONS  1009
-#define IDC_CHECK_COMPRESSED            1009
-#define IDC_CONFIRMATION_DISK_COMMANDS  1010
-#define IDC_CHECK_HIDDEN                1010
-#define IDC_CONFIRMATION_MODIFY_SYSTEM  1011
-#define IDC_CHECK_SYSTEM                1011
-#define IDC_LIST_PROP_VERSION_TYPES     1012
-#define IDC_LIST_PROP_VERSION_VALUES    1013
-#define IDC_STATIC_PROP_FILENAME        1015
-#define IDC_STATIC_PROP_PATH            1016
-#define IDC_STATIC_PROP_LASTCHANGE      1017
-#define IDC_STATIC_PROP_VERSION         1018
-#define IDC_STATIC_PROP_COPYRIGHT       1019
-#define IDC_STATIC_PROP_SIZE            1020
-#define IDC_EDIT1                       1021
-#define ID_TREE_COLLAPSE_BRANCH         32768
-#define ID_FILE_OPEN                    32769
-#define ID_FILE_MOVE                    32770
-#define ID_FILE_COPY                    32771
-#define ID_FILE_COPY_CLIPBOARD          32772
-#define ID_FILE_DELETE                  32773
-#define ID_FILE_RENAME                  32774
-#define ID_FILE_PROPERTIES              32775
-#define ID_FILE_COMPRESS                32776
-#define ID_FILE_UNCOMPRESS              32777
-#define ID_FILE_RUN                     32778
-#define ID_FILE_PRINT                   32779
-#define ID_FILE_ASSOCIATE               32780
-#define ID_FILE_CREATE_DIRECTORY        32781
-#define ID_FILE_SEARCH                  32782
-#define ID_FILE_SELECT_FILES            32783
-#define ID_FILE_EXIT                    32784
-#define ID_DISK_COPY_DISK               32785
-#define ID_DISK_LABEL_DISK              32786
-#define ID_DISK_FORMAT_DISK             32787
-#define ID_DISK_CONNECT_NETWORK_DRIVE   32788
-#define ID_DISK_DISCONNECT_NETWORK_DRIVE 32789
-#define ID_DISK_SHARE_AS                32790
-#define ID_DISK_STOP_SHARING            32791
-#define ID_DISK_SELECT_DRIVE            32792
-#define ID_TREE_EXPAND_ONE_LEVEL        32793
-#define ID_TREE_EXPAND_BRANCH           32794
-#define ID_TREE_EXPAND_ALL              32795
-#define ID_TREE_INDICATE_EXPANDABLE_BRANCHES 32796
-#define ID_VIEW_TREE_DIRECTORY          32797
-#define ID_VIEW_TREE_ONLY               32798
-#define ID_VIEW_DIRECTORY_ONLY          32799
-#define ID_VIEW_SPLIT                   32800
-#define ID_VIEW_NAME                    32801
-#define ID_VIEW_ALL_FILE_DETAILS        32802
-#define ID_VIEW_PARTIAL_DETAILS         32803
-#define ID_VIEW_SORT_BY_NAME            32804
-#define ID_VIEW_SORT_BY_TYPE            32805
-#define ID_VIEW_SORT_BY_SIZE            32806
-#define ID_VIEW_SORT_BY_DATE            32807
-#define ID_VIEW_BY_FILE_TYPE            32808
-#define ID_OPTIONS_CONFIRMATION         32809
-#define ID_OPTIONS_FONT                 32810
-#define ID_OPTIONS_CUSTOMISE_TOOLBAR    32811
-#define ID_OPTIONS_TOOLBAR              32812
-#define ID_OPTIONS_DRIVEBAR             32813
-#define ID_OPTIONS_STATUSBAR            32814
-#define ID_OPTIONS_OPEN_NEW_WINDOW_ON_CONNECT 32815
-#define ID_OPTIONS_MINIMISE_ON_USE      32816
-#define ID_OPTIONS_SAVE_ON_EXIT         32817
-#define ID_SECURITY_PERMISSIONS         32818
-#define ID_SECURITY_AUDITING            32819
-#define ID_SECURITY_OWNER               32820
-#define ID_WINDOW_NEW_WINDOW            32821
-#define ID_WINDOW_CASCADE               32822
-#define ID_WINDOW_TILE_HORZ             32823
-#define ID_WINDOW_TILE_VERT             32824
-#define ID_WINDOW_ARRANGE_ICONS         32825
-#define ID_WINDOW_REFRESH               32826
-#define ID_HELP_CONTENTS                32827
-#define ID_HELP_SEARCH_HELP             32828
-#define ID_HELP_HOW_TO_USE_HELP         32829
-#define ID_CMD_LAST                     32830
-#define ID_HELP_ABOUT                   32830
-#define IDC_LICENSE_EDIT                32831
-#define IDS_LICENSE                     32832
-#define IDC_STATIC                      -1
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        149
-#define _APS_NEXT_COMMAND_VALUE         32832
-#define _APS_NEXT_CONTROL_VALUE         1022
-#define _APS_NEXT_SYMED_VALUE           110
-#endif
-#endif
diff --git a/rosapps/winfile/run.c b/rosapps/winfile/run.c
deleted file mode 100644 (file)
index 0dc1254..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- *  ReactOS Task Manager
- *
- *  run.c
- *
- *  Copyright (C) 1999 - 2001  Brian Palmer  <brianp@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define WIN32_LEAN_AND_MEAN            // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <commctrl.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <memory.h>
-#include <tchar.h>
-#include <process.h>
-#include <stdio.h>
-
-#include <shellapi.h>
-
-#include "main.h"
-#include "run.h"
-
-
-typedef        void (WINAPI *RUNFILEDLG)(
-                                               HWND    hwndOwner,
-                                               HICON   hIcon,
-                                               LPCSTR  lpstrDirectory,
-                                               LPCSTR  lpstrTitle,
-                                               LPCSTR  lpstrDescription,
-                                               UINT    uFlags);
-
-//
-// Flags for RunFileDlg
-//
-
-#define        RFF_NOBROWSE            0x01    // Removes the browse button.
-#define        RFF_NODEFAULT           0x02    // No default item selected.
-#define        RFF_CALCDIRECTORY       0x04    // Calculates the working directory from the file name.
-#define        RFF_NOLABEL                     0x08    // Removes the edit box label.
-#define        RFF_NOSEPARATEMEM       0x20    // Removes the Separate Memory Space check box (Windows NT only).
-
-
-// Show "Run..." dialog
-void OnFileRun(void)
-{
-       HMODULE                 hShell32;
-       RUNFILEDLG              RunFileDlg;
-       OSVERSIONINFO   versionInfo;
-       WCHAR                   wTitle[40];
-       WCHAR                   wText[256];
-       CHAR                    szTitle[40] = "Create New Task";
-       CHAR                    szText[256] = "Type the name of a program, folder, document, or Internet resource, and Task Manager will open it for you.";
-
-       hShell32 = LoadLibrary(_T("SHELL32.DLL"));
-       RunFileDlg = (RUNFILEDLG)(FARPROC)GetProcAddress(hShell32, (CHAR*)((long)0x3D));
-       if (RunFileDlg) {
-               versionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
-               GetVersionEx(&versionInfo);
-               if (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT) {
-                       MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, szTitle, -1, wTitle, 40);
-                       MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, szText, -1, wText, 256);
-                       RunFileDlg(Globals.hMainWnd, 0, NULL, (LPCSTR)wTitle, (LPCSTR)wText, RFF_CALCDIRECTORY);
-        } else {
-                       RunFileDlg(Globals.hMainWnd, 0, NULL, szTitle, szText, RFF_CALCDIRECTORY);
-        }
-       }
-       FreeLibrary(hShell32);
-}
-
-
-/*
-typedef struct _SHELLEXECUTEINFO{
-    DWORD cbSize;
-    ULONG fMask;
-    HWND hwnd;
-    LPCTSTR lpVerb;
-    LPCTSTR lpFile;
-    LPCTSTR lpParameters;
-    LPCTSTR lpDirectory;
-    int nShow;
-    HINSTANCE hInstApp;
-
-    // Optional members
-    LPVOID lpIDList;
-    LPCSTR lpClass;
-    HKEY hkeyClass;
-    DWORD dwHotKey;
-       union {
-               HANDLE hIcon;
-               HANDLE hMonitor;
-       };
-    HANDLE hProcess;
-} SHELLEXECUTEINFO, *LPSHELLEXECUTEINFO;
- */
-
-BOOL OpenTarget(HWND hWnd, TCHAR* target)
-{
-    BOOL result = FALSE;
-    SHELLEXECUTEINFO shExecInfo;
-
-    memset(&shExecInfo, 0, sizeof(shExecInfo));
-    shExecInfo.cbSize = sizeof(shExecInfo);
-    shExecInfo.fMask = 0;
-    shExecInfo.hwnd = hWnd;
-    shExecInfo.lpVerb = NULL;
-    shExecInfo.lpFile = target;
-    shExecInfo.lpParameters = NULL;
-    shExecInfo.lpDirectory = NULL;
-    shExecInfo.nShow = SW_SHOW;
-    shExecInfo.hInstApp = 0;
-
-    result = ShellExecuteEx(&shExecInfo);
-
-
-    return result;
-}
diff --git a/rosapps/winfile/run.h b/rosapps/winfile/run.h
deleted file mode 100644 (file)
index ccea1be..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *  ReactOS File Manager
- *
- *  run.h
- *
- *  Copyright (C) 1999 - 2001  Brian Palmer  <brianp@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-// run.h - definitions necessary to use Microsoft's "Run" dialog
-// Undocumented Windows call
-// use the type below to declare a function pointer
-
-// Information taken from http://www.geocities.com/SiliconValley/4942/
-// Copyright © 1998-1999 James Holderness. All Rights Reserved.
-// jholderness@geocities.com
-
-#ifndef __RUN_H__
-#define __RUN_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-void OnFileRun(void);
-BOOL OpenTarget(HWND hWnd, TCHAR* target);
-
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __RUN_H__
diff --git a/rosapps/winfile/settings.c b/rosapps/winfile/settings.c
deleted file mode 100644 (file)
index 0c27c98..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  settings.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <commctrl.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <memory.h>
-#include <tchar.h>
-#include <process.h>
-#include <stdio.h>
-
-#include "main.h"
-#include "settings.h"
-
-
-DWORD Confirmation;
-DWORD ViewType;
-TCHAR ViewTypeMaskStr[MAX_TYPE_MASK_LEN];
-//LPCTSTR lpViewTypeMaskStr;
-
-
-void LoadSettings(void)
-{
-    HKEY    hKey;
-    TCHAR   szSubKey[] = _T("Software\\ReactWare\\FileManager");
-/*
-    int     i;
-    DWORD   dwSize;
-
-    // Window size & position settings
-    TaskManagerSettings.Maximized = FALSE;
-    TaskManagerSettings.Left = 0;
-    TaskManagerSettings.Top = 0;
-    TaskManagerSettings.Right = 0;
-    TaskManagerSettings.Bottom = 0;
-
-    // Tab settings
-    TaskManagerSettings.ActiveTabPage = 0;
-
-    // Options menu settings
-    TaskManagerSettings.AlwaysOnTop = FALSE;
-    TaskManagerSettings.MinimizeOnUse = TRUE;
-    TaskManagerSettings.HideWhenMinimized = TRUE;
-    TaskManagerSettings.Show16BitTasks = TRUE;
-
-    // Update speed settings
-    TaskManagerSettings.UpdateSpeed = 2;
-
-    // Applications page settings
-    TaskManagerSettings.View_LargeIcons = FALSE;
-    TaskManagerSettings.View_SmallIcons = FALSE;
-    TaskManagerSettings.View_Details = TRUE;
-
-    // Processes page settings
-    TaskManagerSettings.ShowProcessesFromAllUsers = FALSE; // Server-only?
-    TaskManagerSettings.Column_ImageName = TRUE;
-    TaskManagerSettings.Column_PID = TRUE;
-    TaskManagerSettings.Column_CPUUsage = TRUE;
-    TaskManagerSettings.Column_CPUTime = TRUE;
-    TaskManagerSettings.Column_MemoryUsage = TRUE;
-    TaskManagerSettings.Column_MemoryUsageDelta = FALSE;
-    TaskManagerSettings.Column_PeakMemoryUsage = FALSE;
-    TaskManagerSettings.Column_PageFaults = FALSE;
-    TaskManagerSettings.Column_USERObjects = FALSE;
-    TaskManagerSettings.Column_IOReads = FALSE;
-    TaskManagerSettings.Column_IOReadBytes = FALSE;
-    TaskManagerSettings.Column_SessionID = FALSE; // Server-only?
-    TaskManagerSettings.Column_UserName = FALSE; // Server-only?
-    TaskManagerSettings.Column_PageFaultsDelta = FALSE;
-    TaskManagerSettings.Column_VirtualMemorySize = FALSE;
-    TaskManagerSettings.Column_PagedPool = FALSE;
-    TaskManagerSettings.Column_NonPagedPool = FALSE;
-    TaskManagerSettings.Column_BasePriority = FALSE;
-    TaskManagerSettings.Column_HandleCount = FALSE;
-    TaskManagerSettings.Column_ThreadCount = FALSE;
-    TaskManagerSettings.Column_GDIObjects = FALSE;
-    TaskManagerSettings.Column_IOWrites = FALSE;
-    TaskManagerSettings.Column_IOWriteBytes = FALSE;
-    TaskManagerSettings.Column_IOOther = FALSE;
-    TaskManagerSettings.Column_IOOtherBytes = FALSE;
-
-    for (i = 0; i < 25; i++) {
-        TaskManagerSettings.ColumnOrderArray[i] = i;
-    }
-    TaskManagerSettings.ColumnSizeArray[0] = 105;
-    TaskManagerSettings.ColumnSizeArray[1] = 50;
-    TaskManagerSettings.ColumnSizeArray[2] = 107;
-    TaskManagerSettings.ColumnSizeArray[3] = 70;
-    TaskManagerSettings.ColumnSizeArray[4] = 35;
-    TaskManagerSettings.ColumnSizeArray[5] = 70;
-    TaskManagerSettings.ColumnSizeArray[6] = 70;
-    TaskManagerSettings.ColumnSizeArray[7] = 100;
-    TaskManagerSettings.ColumnSizeArray[8] = 70;
-    TaskManagerSettings.ColumnSizeArray[9] = 70;
-    TaskManagerSettings.ColumnSizeArray[10] = 70;
-    TaskManagerSettings.ColumnSizeArray[11] = 70;
-    TaskManagerSettings.ColumnSizeArray[12] = 70;
-    TaskManagerSettings.ColumnSizeArray[13] = 70;
-    TaskManagerSettings.ColumnSizeArray[14] = 60;
-    TaskManagerSettings.ColumnSizeArray[15] = 60;
-    TaskManagerSettings.ColumnSizeArray[16] = 60;
-    TaskManagerSettings.ColumnSizeArray[17] = 60;
-    TaskManagerSettings.ColumnSizeArray[18] = 60;
-    TaskManagerSettings.ColumnSizeArray[19] = 70;
-    TaskManagerSettings.ColumnSizeArray[20] = 70;
-    TaskManagerSettings.ColumnSizeArray[21] = 70;
-    TaskManagerSettings.ColumnSizeArray[22] = 70;
-    TaskManagerSettings.ColumnSizeArray[23] = 70;
-    TaskManagerSettings.ColumnSizeArray[24] = 70;
-
-    TaskManagerSettings.SortColumn = 1;
-    TaskManagerSettings.SortAscending = TRUE;
-
-    // Performance page settings
-    TaskManagerSettings.CPUHistory_OneGraphPerCPU = TRUE;
-    TaskManagerSettings.ShowKernelTimes = FALSE;
- */
-    // Open the key
-    if (RegOpenKeyEx(HKEY_CURRENT_USER, szSubKey, 0, KEY_READ, &hKey) != ERROR_SUCCESS)
-        return;
-    // Read the settings
-//    dwSize = sizeof(TASKMANAGER_SETTINGS);
-//    RegQueryValueEx(hKey, "Preferences", NULL, NULL, (LPBYTE)&TaskManagerSettings, &dwSize);
-
-    // Close the key
-    RegCloseKey(hKey);
-}
-
-void SaveSettings(void)
-{
-    HKEY hKey;
-    TCHAR szSubKey1[] = _T("Software");
-    TCHAR szSubKey2[] = _T("Software\\ReactWare");
-    TCHAR szSubKey3[] = _T("Software\\ReactWare\\FileManager");
-
-    // Open (or create) the key
-    hKey = NULL;
-    RegCreateKeyEx(HKEY_CURRENT_USER, szSubKey1, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL);
-    RegCloseKey(hKey);
-    hKey = NULL;
-    RegCreateKeyEx(HKEY_CURRENT_USER, szSubKey2, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL);
-    RegCloseKey(hKey);
-    hKey = NULL;
-    if (RegCreateKeyEx(HKEY_CURRENT_USER, szSubKey3, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS)
-        return;
-    // Save the settings
-//    RegSetValueEx(hKey, "Preferences", 0, REG_BINARY, (LPBYTE)&TaskManagerSettings, sizeof(TASKMANAGER_SETTINGS));
-    // Close the key
-    RegCloseKey(hKey);
-}
-
diff --git a/rosapps/winfile/settings.h b/rosapps/winfile/settings.h
deleted file mode 100644 (file)
index cc1fc71..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  settings.h
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __SETTINGS_H__
-#define __SETTINGS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#include "resource.h"
-
-
-#define CONFIRM_FILE_DELETE    0x0001
-#define CONFIRM_DIR_DELETE     0x0002
-#define CONFIRM_FILE_REPLACE   0x0004
-#define CONFIRM_MOUSE_ACTIONS  0x0008
-#define CONFIRM_DISK_COMMANDS  0x0010
-#define CONFIRM_MODIFY_SYSTEM  0x0020
-
-#define VIEW_DIRECTORIES       0x0001
-#define VIEW_PROGRAMS          0x0002
-#define VIEW_DOCUMENTS         0x0004
-#define VIEW_OTHER             0x0008
-#define VIEW_SYSTEM            0x0010
-
-#define MAX_TYPE_MASK_LEN 50
-
-extern DWORD Confirmation;
-extern DWORD ViewType;
-extern TCHAR ViewTypeMaskStr[MAX_TYPE_MASK_LEN];
-//extern LPCTSTR lpViewTypeMaskStr;
-
-void LoadSettings(void);
-void SaveSettings(void);
-
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __SETTINGS_H__
diff --git a/rosapps/winfile/shell.c b/rosapps/winfile/shell.c
deleted file mode 100644 (file)
index 756275d..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  shell.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <commctrl.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <memory.h>
-#include <tchar.h>
-#include <process.h>
-#include <stdio.h>
-
-#include "main.h"
-#include "shell.h"
-#include "format.h"
-
-
-////////////////////////////////////////////////////////////////////////////////
-// Global Variables:
-//
-
-//DWORD WINAPI SHFormatDrive(HWND hWnd, UINT drive, UINT fmtID, UINT options);
-
-typedef DWORD (WINAPI *SHFormatDrive_Ptr)(HWND, UINT, UINT, UINT);
-
-
-BOOL CheckShellAvailable(void)
-{
-       HMODULE hShell32;
-
-       hShell32 = LoadLibrary(_T("SHELL32.DLL"));
-    if (hShell32) {
-        FreeLibrary(hShell32);
-       }
-    return (hShell32 != NULL);
-}
-
-
-void FormatDisk(HWND hWnd)
-{
-//     SHFormatDrive(hWnd, 0 /* A: */, SHFMT_ID_DEFAULT, 0);
-       HMODULE hShell32;
-    SHFormatDrive_Ptr pSHFormatDrive;
-
-       hShell32 = LoadLibrary(_T("SHELL32.DLL"));
-    if (hShell32) {
-        pSHFormatDrive = (SHFormatDrive_Ptr)(FARPROC)GetProcAddress(hShell32, "SHFormatDrive");
-        if (pSHFormatDrive)    {
-                   UINT OldMode = SetErrorMode(0); // Get the current Error Mode settings.
-                   SetErrorMode(OldMode & ~SEM_FAILCRITICALERRORS); // Force O/S to handle
-            pSHFormatDrive(0/*hWnd*/, 0 /* A: */, SHFMT_ID_DEFAULT, 0);
-                   SetErrorMode(OldMode); // Put it back the way it was.
-        }
-        FreeLibrary(hShell32);
-       }
-}
-
-void CopyDisk(HWND hWnd)
-{
-}
-
-void LabelDisk(HWND hWnd)
-{
-}
-
-void ModifySharing(HWND hWnd, BOOL create)
-{
-}
diff --git a/rosapps/winfile/shell.h b/rosapps/winfile/shell.h
deleted file mode 100644 (file)
index 08e371f..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *  ReactOS Application Shell support routines
- *
- *  shell.h
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __SHELL_H__
-#define __SHELL_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-BOOL CheckShellAvailable(void);
-void FormatDisk(HWND hWnd);
-void CopyDisk(HWND hWnd);
-void LabelDisk(HWND hWnd);
-void ModifySharing(HWND hWnd, BOOL create);
-
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __SHELL_H__
diff --git a/rosapps/winfile/sort.c b/rosapps/winfile/sort.c
deleted file mode 100644 (file)
index f731c1e..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  sort.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <commctrl.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <memory.h>
-#include <tchar.h>
-#include <process.h>
-#include <stdio.h>
-
-#include <windowsx.h>
-#include <shellapi.h>
-#include <ctype.h>
-#include <assert.h>
-#define ASSERT assert
-
-#include "main.h"
-#include "sort.h"
-
-
-
- // directories first...
-static int compareType(const WIN32_FIND_DATA* fd1, const WIN32_FIND_DATA* fd2)
-{
-       int dir1 = fd1->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY;
-       int dir2 = fd2->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY;
-
-       return dir2==dir1? 0: dir2<dir1? -1: 1;
-}
-
-
-static int compareName(const void* arg1, const void* arg2)
-{
-       const WIN32_FIND_DATA* fd1 = &(*(Entry**)arg1)->data;
-       const WIN32_FIND_DATA* fd2 = &(*(Entry**)arg2)->data;
-
-       int cmp = compareType(fd1, fd2);
-       if (cmp)
-               return cmp;
-
-       return lstrcmpi(fd1->cFileName, fd2->cFileName);
-}
-
-static int compareExt(const void* arg1, const void* arg2)
-{
-       const WIN32_FIND_DATA* fd1 = &(*(Entry**)arg1)->data;
-       const WIN32_FIND_DATA* fd2 = &(*(Entry**)arg2)->data;
-       const TCHAR *name1, *name2, *ext1, *ext2;
-
-       int cmp = compareType(fd1, fd2);
-       if (cmp)
-               return cmp;
-
-       name1 = fd1->cFileName;
-       name2 = fd2->cFileName;
-
-       ext1 = _tcsrchr(name1, _T('.'));
-       ext2 = _tcsrchr(name2, _T('.'));
-
-       if (ext1)
-               ext1++;
-       else
-               ext1 = _T("");
-
-       if (ext2)
-               ext2++;
-       else
-               ext2 = _T("");
-
-       cmp = lstrcmpi(ext1, ext2);
-       if (cmp)
-               return cmp;
-
-       return lstrcmpi(name1, name2);
-}
-
-static int compareSize(const void* arg1, const void* arg2)
-{
-       WIN32_FIND_DATA* fd1 = &(*(Entry**)arg1)->data;
-       WIN32_FIND_DATA* fd2 = &(*(Entry**)arg2)->data;
-
-       int cmp = compareType(fd1, fd2);
-       if (cmp)
-               return cmp;
-
-       cmp = fd2->nFileSizeHigh - fd1->nFileSizeHigh;
-
-       if (cmp < 0)
-               return -1;
-       else if (cmp > 0)
-               return 1;
-
-       cmp = fd2->nFileSizeLow - fd1->nFileSizeLow;
-
-       return cmp<0? -1: cmp>0? 1: 0;
-}
-
-static int compareDate(const void* arg1, const void* arg2)
-{
-       WIN32_FIND_DATA* fd1 = &(*(Entry**)arg1)->data;
-       WIN32_FIND_DATA* fd2 = &(*(Entry**)arg2)->data;
-
-       int cmp = compareType(fd1, fd2);
-       if (cmp)
-               return cmp;
-
-       return CompareFileTime(&fd2->ftLastWriteTime, &fd1->ftLastWriteTime);
-}
-
-
-static int (*sortFunctions[])(const void* arg1, const void* arg2) = {
-       compareName,    // SORT_NAME
-       compareExt,             // SORT_EXT
-       compareSize,    // SORT_SIZE
-       compareDate             // SORT_DATE
-};
-
-
-void SortDirectory(Entry* parent, SORT_ORDER sortOrder)
-{
-       Entry* entry = parent->down;
-       Entry** array, **p;
-       int len;
-
-       len = 0;
-       for(entry=parent->down; entry; entry=entry->next)
-               len++;
-
-       if (len) {
-#ifdef _MSC_VER
-               array = (Entry**) alloca(len*sizeof(Entry*));
-#else
-               array = (Entry**) malloc(len*sizeof(Entry*));
-#endif
-        memset(array, 0, len*sizeof(Entry*));
-               p = array;
-               for(entry=parent->down; entry; entry=entry->next)
-                       *p++ = entry;
-
-                // call qsort with the appropriate compare function
-               qsort(array, len, sizeof(array[0]), sortFunctions[sortOrder]);
-
-               parent->down = array[0];
-
-               for(p=array; --len; p++)
-                       p[0]->next = p[1];
-
-               (*p)->next = 0;
-       }
-}
-
-
diff --git a/rosapps/winfile/sort.h b/rosapps/winfile/sort.h
deleted file mode 100644 (file)
index 3799ff2..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  sort.h
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __SORT_H__
-#define __SORT_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#include "entries.h"
-
-void SortDirectory(Entry* parent, SORT_ORDER sortOrder);
-
-
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __SORT_H__
diff --git a/rosapps/winfile/splitpath.c b/rosapps/winfile/splitpath.c
deleted file mode 100644 (file)
index 200a1e8..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  splitpath.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <commctrl.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <memory.h>
-#include <tchar.h>
-#include <process.h>
-#include <stdio.h>
-
-#include "main.h"
-
-
-#ifdef UNICODE
-
-void _wsplitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR* ext)
-{
-       const WCHAR* end; // end of processed string
-       const WCHAR* p;   // search pointer
-       const WCHAR* s;   // copy pointer
-
-        // extract drive name
-       if (path[0] && path[1]==':') {
-               if (drv) {
-                       *drv++ = *path++;
-                       *drv++ = *path++;
-                       *drv = L'\0';
-               }
-       } else if (drv)
-               *drv = L'\0';
-
-        // search for end of string or stream separator
-       for(end=path; *end && *end!=L':'; )
-               end++;
-
-        // search for begin of file extension
-       for(p=end; p>path && *--p!=L'\\' && *p!=L'/'; )
-               if (*p == L'.') {
-                       end = p;
-                       break;
-               }
-
-       if (ext)
-               for(s=end; *ext=*s++; )
-                       ext++;
-
-        // search for end of directory name
-       for(p=end; p>path; )
-               if (*--p=='\\' || *p=='/') {
-                       p++;
-                       break;
-               }
-
-       if (name) {
-               for(s=p; s<end; )
-                       *name++ = *s++;
-
-               *name = L'\0';
-       }
-
-       if (dir) {
-               for(s=path; s<p; )
-                       *dir++ = *s++;
-
-               *dir = L'\0';
-       }
-}
-
-#else
-
-void _splitpath(const CHAR* path, CHAR* drv, CHAR* dir, CHAR* name, CHAR* ext)
-{
-       const CHAR* end; // end of processed string
-       const CHAR* p;   // search pointer
-       const CHAR* s;   // copy pointer
-
-        // extract drive name
-       if (path[0] && path[1]==':') {
-               if (drv) {
-                       *drv++ = *path++;
-                       *drv++ = *path++;
-                       *drv = '\0';
-               }
-       } else if (drv)
-               *drv = '\0';
-
-        // search for end of string or stream separator
-       for(end=path; *end && *end!=':'; )
-               end++;
-
-        // search for begin of file extension
-       for(p=end; p>path && *--p!='\\' && *p!='/'; )
-               if (*p == '.') {
-                       end = p;
-                       break;
-               }
-
-       if (ext)
-               for(s=end; (*ext=*s++); )
-                       ext++;
-
-        // search for end of directory name
-       for(p=end; p>path; )
-               if (*--p=='\\' || *p=='/') {
-                       p++;
-                       break;
-               }
-
-       if (name) {
-               for(s=p; s<end; )
-                       *name++ = *s++;
-
-               *name = '\0';
-       }
-
-       if (dir) {
-               for(s=path; s<p; )
-                       *dir++ = *s++;
-
-               *dir = '\0';
-       }
-}
-
-#endif
-
-/*
-void main()    // test splipath()
-{
-       TCHAR drv[_MAX_DRIVE+1], dir[_MAX_DIR], name[_MAX_FNAME], ext[_MAX_EXT];
-
-       _tsplitpath(L"x\\y", drv, dir, name, ext);
-       _tsplitpath(L"x\\", drv, dir, name, ext);
-       _tsplitpath(L"\\x", drv, dir, name, ext);
-       _tsplitpath(L"x", drv, dir, name, ext);
-       _tsplitpath(L"", drv, dir, name, ext);
-       _tsplitpath(L".x", drv, dir, name, ext);
-       _tsplitpath(L":x", drv, dir, name, ext);
-       _tsplitpath(L"a:x", drv, dir, name, ext);
-       _tsplitpath(L"a.b:x", drv, dir, name, ext);
-       _tsplitpath(L"W:\\/\\abc/Z:~", drv, dir, name, ext);
-       _tsplitpath(L"abc.EFGH:12345", drv, dir, name, ext);
-       _tsplitpath(L"C:/dos/command.com", drv, dir, name, ext);
-}
-*/
diff --git a/rosapps/winfile/trace.c b/rosapps/winfile/trace.c
deleted file mode 100644 (file)
index 3d6a42d..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Diagnostic Trace
-//
-#include <stdio.h>
-#include <stdarg.h>
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <tchar.h>
-#include "trace.h"
-
-
-#ifdef _DEBUG
-
-#undef THIS_FILE
-static char THIS_FILE[] = __FILE__;
-
-void _DebugBreak(void)
-{
-    DebugBreak();
-}
-
-void Trace(TCHAR* lpszFormat, ...)
-{
-    va_list args;
-    int nBuf;
-    TCHAR szBuffer[512];
-
-    va_start(args, lpszFormat);
-    nBuf = _vsntprintf(szBuffer, sizeof(szBuffer)/sizeof(TCHAR), lpszFormat, args);
-    OutputDebugString(szBuffer);
-    // was there an error? was the expanded string too long?
-    //ASSERT(nBuf >= 0);
-    va_end(args);
-}
-
-void Assert(void* assert, const char* file, int line, void* msg)
-{
-    if (msg == NULL) {
-        printf("ASSERT -- %s occured on line %u of file %s.\n",
-               assert, line, file);
-    } else {
-        printf("ASSERT -- %s occured on line %u of file %s: Message = %s.\n",
-               assert, line, file, msg);
-    }
-}
-
-#else
-
-void Trace(TCHAR* lpszFormat, ...) { };
-void Assert(void* assert, const char* file, int line, void* msg) { };
-
-#endif //_DEBUG
-/////////////////////////////////////////////////////////////////////////////
diff --git a/rosapps/winfile/trace.h b/rosapps/winfile/trace.h
deleted file mode 100644 (file)
index 8559da7..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Diagnostic Trace
-//
-#ifndef __TRACE_H__
-#define __TRACE_H__
-
-#ifdef _DEBUG
-
-#ifdef _X86_
-#define BreakPoint()        _asm { int 3h }
-#else
-#define BreakPoint()        _DebugBreak()
-#endif
-
-#ifndef ASSERT
-#define ASSERT(exp)                                 \
-{                                                   \
-    if (!(exp)) {                                   \
-        Assert(#exp, __FILE__, __LINE__, NULL);     \
-        BreakPoint();                               \
-    }                                               \
-}                                                   \
-
-#define ASSERTMSG(exp, msg)                         \
-{                                                   \
-    if (!(exp)) {                                   \
-        Assert(#exp, __FILE__, __LINE__, msg);      \
-        BreakPoint();                               \
-    }                                               \
-}
-#endif
-
-//=============================================================================
-//  MACRO: TRACE()
-//=============================================================================
-
-#define TRACE  Trace
-
-
-#else   // _DEBUG
-
-//=============================================================================
-//  Define away MACRO's ASSERT() and TRACE() in non debug builds
-//=============================================================================
-
-#ifndef ASSERT
-#define ASSERT(exp)
-#define ASSERTMSG(exp, msg)
-#endif
-
-#define TRACE 0 ? (void)0 : Trace
-
-#endif // !_DEBUG
-
-
-void Assert(void* assert, const char* file, int line, void* msg);
-void Trace(TCHAR* lpszFormat, ...);
-
-
-#endif // __TRACE_H__
-/////////////////////////////////////////////////////////////////////////////
diff --git a/rosapps/winfile/treeview.c b/rosapps/winfile/treeview.c
deleted file mode 100644 (file)
index 99e24b6..0000000
+++ /dev/null
@@ -1,659 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  treeview.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <commctrl.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <memory.h>
-#include <tchar.h>
-#include <process.h>
-#include <stdio.h>
-
-#include <windowsx.h>
-#include <shellapi.h>
-#include <ctype.h>
-//#include <assert.h>
-//#define ASSERT assert
-
-#include "main.h"
-#include "treeview.h"
-#include "entries.h"
-#include "utils.h"
-
-#include "trace.h"
-
-
-// Global variables and constants
-// Image_Open, Image_Closed, and Image_Root - integer variables for indexes of the images.
-// CX_BITMAP and CY_BITMAP - width and height of an icon.
-// NUM_BITMAPS - number of bitmaps to add to the image list.
-int Image_Open;
-int Image_Closed;
-int Image_Root;
-
-static int s_init = 0;
-
-#define CX_BITMAP    16
-#define CY_BITMAP    16
-#define NUM_BITMAPS  3
-
-
-Root* FindPathRoot(HWND hwndTV, HTREEITEM hItem, LPTSTR szPath, int* pPathLen, int max)
-{
-       Root* pRoot = NULL;
-    TVITEM item;
-    item.mask = TVIF_PARAM;
-    item.hItem = TreeView_GetParent(hwndTV, hItem);
-
-    if (TreeView_GetItem(hwndTV, &item)) {
-        if (item.lParam == 0) {
-            // recurse
-            pRoot = FindPathRoot(hwndTV, item.hItem, szPath, pPathLen, max);
-            szPath[*pPathLen] = _T('\\');
-            ++(*pPathLen);
-            item.mask = TVIF_TEXT;
-            item.hItem = hItem;
-            item.pszText = &szPath[*pPathLen];
-            item.cchTextMax = max - *pPathLen;
-            if (TreeView_GetItem(hwndTV, &item)) {
-                *pPathLen += _tcslen(item.pszText);
-            }
-        } else {
-            // found root key with valid key value
-            pRoot = (Root*)item.lParam;
-            item.mask = TVIF_TEXT;
-            item.hItem = hItem;
-            item.pszText = szPath;
-            item.cchTextMax = max;
-            if (TreeView_GetItem(hwndTV, &item)) {
-                *pPathLen += _tcslen(item.pszText);
-            }
-        }
-    }
-    return pRoot;
-}
-
-static void init_output(HWND hWnd)
-{
-       TCHAR b[16];
-       HFONT old_font;
-       HDC hdc = GetDC(hWnd);
-
-       if (GetNumberFormat(LOCALE_USER_DEFAULT, 0, _T("1000"), 0, b, 16) > 4)
-               Globals.num_sep = b[1];
-       else
-               Globals.num_sep = _T('.');
-
-       old_font = SelectFont(hdc, Globals.hFont);
-       GetTextExtentPoint32(hdc, _T(" "), 1, &Globals.spaceSize);
-       SelectFont(hdc, old_font);
-       ReleaseDC(hWnd, hdc);
-}
-
-#if 0
-
-HTREEITEM AddEntryToTree(HWND hwndTV, Entry* entry)
-{
-    HTREEITEM hItem = 0;
-    TVITEM tvi;
-    TVINSERTSTRUCT tvins;
-    static HTREEITEM hPrev = (HTREEITEM)TVI_FIRST;
-    static HTREEITEM hPrevRootItem = NULL;
-    static HTREEITEM hPrevLev2Item = NULL;
-
-    //TRACE("AddEntryToTree(level:%u - %s)\n", entry->level, entry->data.cFileName);
-    tvi.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN | TVIF_PARAM;
-    tvi.pszText = LPSTR_TEXTCALLBACK;
-    tvi.cchTextMax = 0;
-    tvi.iImage = I_IMAGECALLBACK;
-    tvi.iSelectedImage = I_IMAGECALLBACK;
-    tvi.cChildren = I_CHILDRENCALLBACK;
-    // Save the entry pointer in the item's application-defined data area.
-    tvi.lParam = (LPARAM)entry;
-    tvins.item = tvi;
-    tvins.hInsertAfter = hPrev;
-    // Set the parent item based on the specified level.
-    if (entry->level == 0) {
-        tvins.hParent = TVI_ROOT;
-    } else if (entry->level == 1) {
-        tvins.hParent = hPrevRootItem;
-    } else {
-        tvins.hParent = hPrevLev2Item;
-        if (hPrevLev2Item) {
-            tvins.hParent = entry->up->hTreeItem;
-        }
-    }
-    // Add the item to the tree view control.
-    hPrev = (HTREEITEM)SendMessage(hwndTV, TVM_INSERTITEM, 0, (LPARAM)(LPTVINSERTSTRUCT)&tvins);
-    // Save the handle to the item.
-    if (entry->level == 0)
-        hPrevRootItem = hPrev;
-    else if (entry->level == 1)
-        hPrevLev2Item = hPrev;
-    hItem = hPrev;
-    return hItem;
-}
-
-#else
-
-static HTREEITEM AddEntryToTree(HWND hwndTV, HTREEITEM hParent, LPTSTR label, Root* entry, DWORD dwChildren)
-{
-    HTREEITEM hItem = 0;
-    TVITEM tvi;
-    TVINSERTSTRUCT tvins;
-
-    tvi.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN | TVIF_PARAM;
-    tvi.pszText = label;
-    tvi.cchTextMax = lstrlen(tvi.pszText);
-    tvi.iImage = Image_Closed;
-    tvi.iSelectedImage = Image_Open;
-    tvi.cChildren = dwChildren;
-    tvi.lParam = (LPARAM)entry;
-    tvins.item = tvi;
-    if (entry) tvins.hInsertAfter = (HTREEITEM)TVI_LAST;
-    else       tvins.hInsertAfter = (HTREEITEM)TVI_SORT;
-    tvins.hParent = hParent;
-    hItem = (HTREEITEM)SendMessage(hwndTV, TVM_INSERTITEM, 0, (LPARAM)(LPTVINSERTSTRUCT)&tvins);
-    return hItem;
-}
-
-#endif
-
-// insert treectrl entries after index idx
-static void insert_tree_entries(HWND hWnd, Entry* entry/*Root* pRoot*/, int idx)
-{
-    static HTREEITEM hItemVisible;
-    static int hItemVisibleIdx;
-//     Entry* entry = &pRoot->entry;
-
-       if (!entry)     return;
-       if (entry->hTreeItem) return;
-       ShowWindow(hWnd, SW_HIDE);
-       for(; entry; entry=entry->next) {
-#ifndef _LEFT_FILES
-               if (!(entry->data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY))
-                       continue;
-#endif
-               // don't display entries "." and ".." in the left pane
-        if ((entry->data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) && entry->data.cFileName[0]==_T('.')) {
-                       if (entry->data.cFileName[1] == _T('\0') ||
-               (entry->data.cFileName[1] == _T('.')  &&
-                entry->data.cFileName[2] == _T('\0'))) {
-                               continue;
-            }
-        }
-        if (entry->hTreeItem) continue;
-//        entry->hTreeItem = AddEntryToTree(hWnd, entry);
-
-               if (entry->up && entry->up->hTreeItem) {
-//            entry->hTreeItem = AddEntryToTree(hWnd, entry->up->hTreeItem, entry->data.cFileName, entry, 0);
-            entry->hTreeItem = AddEntryToTree(hWnd, entry->up->hTreeItem, entry->data.cFileName, NULL, 1);
-               } else {
-            entry->hTreeItem = AddEntryToTree(hWnd, TVI_ROOT, entry->data.cFileName, NULL, 0);
-//                AddEntryToTree(hwndTV, pnmtv->itemNew.hItem, Name, NULL, dwCount);
-               }
-        if (entry->expanded) {
-//            insert_tree_entries(hWnd, entry->down, idx + 1);
-            insert_tree_entries(hWnd, entry->down, idx + 1);
-            TreeView_Expand(hWnd, entry->hTreeItem, TVE_EXPAND);
-        }
-        if (idx > hItemVisibleIdx) {
-            hItemVisibleIdx = idx;
-            hItemVisible = entry->hTreeItem;
-        }
-       }
-    if (hItemVisible && idx == 0) {
-        TreeView_SelectSetFirstVisible(hWnd, hItemVisible);
-    }
-       ShowWindow(hWnd, SW_SHOW);
-}
-
-static BOOL InitTreeViewItems(HWND hwndTV, ChildWnd* pChildWnd)
-{
-    TVITEM tvi;
-    TVINSERTSTRUCT tvins;
-    HTREEITEM hRoot;
-       TCHAR buffer[MAX_PATH];
-
-       wsprintf(buffer, _T("%s - [%s]"), pChildWnd->pRoot->path, pChildWnd->pRoot->fs);
-    tvi.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN | TVIF_PARAM;
-    tvi.pszText = buffer;
-    tvi.cchTextMax = lstrlen(tvi.pszText);
-    tvi.iImage = Image_Root;
-    tvi.iSelectedImage = Image_Root;
-    tvi.cChildren = 5;
-//    tvi.lParam = (LPARAM)&pChildWnd->pRoot->entry;
-    tvi.lParam = (LPARAM)pChildWnd->pRoot;
-//    tvi.lParam = (LPARAM)pChildWnd;
-    tvins.item = tvi;
-    tvins.hInsertAfter = (HTREEITEM)TVI_FIRST;
-    tvins.hParent = TVI_ROOT;
-    // Add the item to the tree view control.
-    hRoot = (HTREEITEM)SendMessage(hwndTV, TVM_INSERTITEM, 0, (LPARAM)(LPTVINSERTSTRUCT)&tvins);
-    pChildWnd->pRoot->entry.hTreeItem = hRoot;
-//    TreeView_Expand(hwndTV, hRoot, TVE_EXPAND);
-//    insert_tree_entries(hwndTV, &pChildWnd->pRoot->entry, 0);
-    // insert entries into treectrl
-//    if (pChildWnd->pRoot) {
-//             insert_tree_entries(hwndTV, &pChildWnd->pRoot->entry, 0);
-//    }
-//    TreeView_Expand(hwndTV, pChildWnd->pRoot->entry.hTreeItem, TVE_EXPAND);
-       // calculate column widths
-       if (!s_init) {
-               s_init = 1;
-               init_output(hwndTV);
-       }
-    return TRUE;
-}
-
-
-// InitTreeViewImageLists - creates an image list, adds three bitmaps
-// to it, and associates the image list with a tree view control.
-// Returns TRUE if successful, or FALSE otherwise.
-// hwndTV - handle to the tree view control.
-
-static BOOL InitTreeViewImageLists(HWND hwndTV)
-{
-    HIMAGELIST himl;  // handle to image list
-    HBITMAP hbmp;     // handle to bitmap
-
-    // Create the image list.
-    if ((himl = ImageList_Create(CX_BITMAP, CY_BITMAP,
-        FALSE, NUM_BITMAPS, 0)) == NULL)
-        return FALSE;
-
-    // Add the open file, closed file, and document bitmaps.
-    hbmp = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_FOLDER_RED));
-    Image_Open = ImageList_Add(himl, hbmp, (HBITMAP) NULL);
-    DeleteObject(hbmp);
-
-    hbmp = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_FOLDER_OPEN));
-    Image_Closed = ImageList_Add(himl, hbmp, (HBITMAP) NULL);
-    DeleteObject(hbmp);
-
-    hbmp = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_FOLDER));
-    Image_Root = ImageList_Add(himl, hbmp, (HBITMAP) NULL);
-    DeleteObject(hbmp);
-
-    // Fail if not all of the images were added.
-    if (ImageList_GetImageCount(himl) < 3)
-        return FALSE;
-
-    // Associate the image list with the tree view control.
-    TreeView_SetImageList(hwndTV, himl, TVSIL_NORMAL);
-
-    return TRUE;
-}
-
-BOOL OnTreeExpanding(HWND hwndTV, NMTREEVIEW* pnmtv)
-{
-       Root* pRoot = NULL;
-    TCHAR szPath[1000];
-    int keyPathLen = 0;
-
-    static int expanding;
-    if (expanding) return FALSE;
-    if (pnmtv->itemNew.state & TVIS_EXPANDEDONCE ) {
-        return TRUE;
-    }
-    expanding = TRUE;
-    // check if this is either the root or a subkey item...
-    if ((Root*)pnmtv->itemNew.lParam == NULL) {
-        szPath[0] = _T('\0');
-        pRoot = FindPathRoot(hwndTV, pnmtv->itemNew.hItem, szPath, &keyPathLen, sizeof(szPath)/sizeof(TCHAR));
-    } else {
-        pRoot = (Root*)pnmtv->itemNew.lParam;
-        szPath[0] = _T('\0');
-    }
-    if (pRoot != NULL) {
-//        Root* pNewRoot = NULL;
-//        insert_tree_entries(hwndTV, &pRoot->entry, 0);
-
-        insert_tree_entries(hwndTV, pRoot->entry.down, 0);
-
-//             entry->hTreeItem = AddEntryToTree(hWnd, entry->up->hTreeItem, entry->data.cFileName, NULL, 1);
-
-/*
-               HKEY hNewKey;
-        LONG errCode = RegOpenKeyEx(hKey, szPath, 0, KEY_READ, &hNewKey);
-        if (errCode == ERROR_SUCCESS) {
-            TCHAR Name[MAX_PATH];
-            DWORD cName = MAX_PATH;
-            FILETIME LastWriteTime;
-            DWORD dwIndex = 0L;
-            //ShowWindow(hwndTV, SW_HIDE);
-            while (RegEnumKeyEx(hNewKey, dwIndex, Name, &cName, NULL, NULL, NULL, &LastWriteTime) == ERROR_SUCCESS) {
-                DWORD dwCount = 0L;
-                errCode = RegOpenKeyEx(hNewKey, Name, 0, KEY_READ, &hKey);
-                if (errCode == ERROR_SUCCESS) {
-                    TCHAR SubName[MAX_PATH];
-                    DWORD cSubName = MAX_PATH;
-                    while (RegEnumKeyEx(hKey, dwCount, SubName, &cSubName, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) {
-                        ++dwCount;
-                    }
-                }
-                RegCloseKey(hKey);
-                AddEntryToTree(hwndTV, pnmtv->itemNew.hItem, Name, NULL, dwCount);
-                cName = MAX_PATH;
-                ++dwIndex;
-            }
-               //ShowWindow(hwndTV, SW_SHOWNOACTIVATE);
-            RegCloseKey(hNewKey);
-        }
- */
-    } else {
-    }
-    expanding = FALSE;
-    return TRUE;
-}
-/*
-static void read_directory_win(Entry* parent, LPCTSTR path)
-{
-       Entry* entry = (Entry*)malloc(sizeof(Entry));
-       int level = parent->level + 1;
-       Entry* last = 0;
-       HANDLE hFind;
-       HANDLE hFile;
-
-       TCHAR buffer[MAX_PATH], *p;
-       for(p=buffer; *path; )
-               *p++ = *path++;
-       lstrcpy(p, _T("\\*"));
-    memset(entry, 0, sizeof(Entry));
-       hFind = FindFirstFile(buffer, &entry->data);
-       if (hFind != INVALID_HANDLE_VALUE) {
-               parent->down = entry;
-               do {
-                       entry->down = 0;
-                       entry->up = parent;
-                       entry->expanded = FALSE;
-                       entry->scanned = FALSE;
-                       entry->level = level;
-                       entry->unix_dir = FALSE;
-                       entry->bhfi_valid = FALSE;
-                       lstrcpy(p+1, entry->data.cFileName);
-                       hFile = CreateFile(buffer, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
-                                                               0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0);
-                       if (hFile != INVALID_HANDLE_VALUE) {
-                               if (GetFileInformationByHandle(hFile, &entry->bhfi))
-                                       entry->bhfi_valid = TRUE;
-
-                               CloseHandle(hFile);
-                       }
-                       last = entry;
-                       entry = (Entry*) malloc(sizeof(Entry));
-            memset(entry, 0, sizeof(Entry));
-                       if (last)
-                               last->next = entry;
-               } while(FindNextFile(hFind, &entry->data));
-               last->next = 0;
-               FindClose(hFind);
-       } else {
-               parent->down = 0;
-       }
-       free(entry);
-       parent->scanned = TRUE;
-}
-
-
-void read_directory(Entry* parent, LPCTSTR path, int sortOrder)
-{
-       TCHAR buffer[MAX_PATH];
-       Entry* entry;
-       LPCTSTR s;
-       PTSTR d;
-
-               read_directory_win(parent, path);
-               if (Globals.prescan_node) {
-                       s = path;
-                       d = buffer;
-                       while(*s)
-                               *d++ = *s++;
-                       *d++ = _T('\\');
-                       for(entry=parent->down; entry; entry=entry->next)
-                               if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
-                                       lstrcpy(d, entry->data.cFileName);
-                                       read_directory_win(entry, buffer);
-                                       SortDirectory(entry, sortOrder);
-                               }
-               }
-               SortDirectory(parent, sortOrder);
-}
-
-Entry* read_tree_win(Root* root, LPCTSTR path, int sortOrder)
-{
-       TCHAR buffer[MAX_PATH];
-       Entry* entry = &root->entry;
-       LPCTSTR s = path;
-       PTSTR d = buffer;
-
-       entry->unix_dir = FALSE;
-       while(entry) {
-               while(*s && *s!=_T('\\') && *s!=_T('/'))
-                       *d++ = *s++;
-               while(*s==_T('\\') || *s==_T('/'))
-                       s++;
-               *d++ = _T('\\');
-               *d = _T('\0');
-               read_directory(entry, buffer, sortOrder);
-               if (entry->down)
-                       entry->expanded = TRUE;
-               if (!*s)
-                       break;
-               entry = find_entry_win(entry, s);
-       }
-       return entry;
-}
-
- */
-void OnGetDispInfo(NMTVDISPINFO* ptvdi)
-{
-//    static TCHAR buffer[200];
-//    LVITEM* pItem = &(ptvdi->item);
-//    Entry* entry = (Entry*)pItem->lParam;
-    Root* entry = (Root*)ptvdi->item.lParam;
-    ASSERT(entry);
-
-    if (ptvdi->item.mask & TVIF_CHILDREN ) {
-        ptvdi->item.cChildren = 5;
-    }
-    if (ptvdi->item.mask & TVIF_IMAGE) {
-        ptvdi->item.iImage = Image_Root;
-    }
-    if (ptvdi->item.mask & TVIF_SELECTEDIMAGE) {
-        ptvdi->item.iSelectedImage = Image_Closed;
-    }
-    if (ptvdi->item.mask & TVIF_TEXT) {
-//        ptvdi->item.pszText = entry->data.cFileName;
-//        ptvdi->item.cchTextMax = lstrlen(entry->data.cFileName);
-    }
-}
-
-void UpdateStatus(HWND hWnd, Entry* pEntry)
-{
-    int file_count = 0;
-    int files_size = 0;
-    TCHAR suffix[10];
-    TCHAR number[50];
-    TCHAR Text[260];
-
-    while (pEntry) {
-        if (pEntry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
-        } else {
-            ++file_count;
-            files_size += pEntry->data.nFileSizeLow;
-        }
-        pEntry = pEntry->next;
-    };
-    _tcscpy(suffix, _T(" bytes"));
-    {
-        NUMBERFMT numFmt;
-        memset(&numFmt, 0, sizeof(numFmt));
-        numFmt.NumDigits = 0;
-        numFmt.LeadingZero = 0;
-        numFmt.Grouping = 3;
-        numFmt.lpDecimalSep = _T(".");
-        numFmt.lpThousandSep = _T(",");
-        numFmt.NegativeOrder = 0;
-
-        wsprintf(Text, _T("%d"), files_size);
-        if (GetNumberFormat(LOCALE_USER_DEFAULT, 0, Text, &numFmt, number, sizeof(number))) {
-            wsprintf(Text, _T("Total %d file(s) (%s%s)"), file_count, number, suffix);
-        } else {
-            wsprintf(Text, _T("Total %d file(s) (%d%s)"), file_count, files_size, suffix);
-        }
-        SendMessage(Globals.hStatusBar, SB_SETTEXT, 1, (LPARAM)Text);
-    }
-}
-
-// CreateTreeView - creates a tree view control.
-// Returns the handle to the new control if successful, or NULL otherwise.
-// hwndParent - handle to the control's parent window.
-
-HWND CreateTreeView(HWND hwndParent, ChildWnd* pChildWnd, int id)
-{
-    RECT rcClient;
-    HWND hwndTV;
-
-    // Get the dimensions of the parent window's client area, and create the tree view control.
-    GetClientRect(hwndParent, &rcClient);
-    hwndTV = CreateWindowEx(0, WC_TREEVIEW, _T("Tree View"),
-        WS_VISIBLE | WS_CHILD | WS_BORDER | WS_EX_CLIENTEDGE | TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT,
-        0, 0, rcClient.right, rcClient.bottom,
-        hwndParent, (HMENU)id, hInst, NULL);
-    // Initialize the image list, and add items to the control.
-    if (!InitTreeViewImageLists(hwndTV) || !InitTreeViewItems(hwndTV, pChildWnd)) {
-        DestroyWindow(hwndTV);
-        return NULL;
-    }
-       SendMessage(hwndTV, WM_SETFONT, (WPARAM)Globals.hFont, FALSE);
-    return hwndTV;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-#ifdef _SUBWND_TREEVIEW
-
-static WNDPROC g_orgTreeWndProc;
-
-// OnEndLabelEdit - processes the LVN_ENDLABELEDIT notification message.
-// Returns TRUE if the label is changed, or FALSE otherwise.
-
-static BOOL OnEndLabelEdit(NMTVDISPINFO* ptvdi)
-{
-//    if (ptvdi->item.iItem == -1)
-//        return FALSE;
-
-    // Copy the new label text to the application-defined structure.
-//    lstrcpyn(rgPetInfo[ptvdi->item.iItem].szKind, ptvdi->item.pszText, 10);
-
-    return TRUE;
-    // To make a more robust application you should send an EM_LIMITTEXT
-    // message to the edit control to prevent the user from entering too
-    // many characters in the field.
-}
-
-static LRESULT CALLBACK TreeWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
-       ChildWnd* child = (ChildWnd*)GetWindowLong(GetParent(hWnd), GWL_USERDATA);
-       Pane* pane = (Pane*)GetWindowLong(hWnd, GWL_USERDATA);
-       ASSERT(child);
-
-       switch (message) {
-#ifndef _NO_EXTENSIONS
-       case WM_HSCROLL:
-               set_header(pane);
-               break;
-#endif
-    case WM_NOTIFY:
-        switch (((LPNMHDR)lParam)->code) {
-//        case TVM_EXPAND:
-//            OnTreeExpand((int)wParam, (HTREEITEM*)lParam);
-//            break;
-        case TVN_GETDISPINFO:
-            OnGetDispInfo((NMTVDISPINFO*)lParam);
-            break;
-        case TVN_ITEMEXPANDING:
-            return OnTreeExpanding(hWnd, (NMTREEVIEW*)lParam);
-            break;
-        case TVN_SELCHANGED:
-
-            UpdateStatus(hWnd, child->left.cur->down);
-            break;
-//            return OnSelChanged((NMTREEVIEW*)lParam);
-//           break;
-#if 0
-        case TVN_SINGLEEXPAND:
-            TRACE("TreeWndProc(...) TVN_SINGLEEXPAND\n");
-            //lpnmtv = (LPNMTREEVIEW)lParam;
-            //return TVNRET_DEFAULT;
-//            return TVNRET_SKIPOLD; // Skip default processing of the item being unselected.
-//            return TVNRET_SKIPNEW; // Skip default processing of the item being selected.
-            break;
-#endif
-        case TVN_ENDLABELEDIT:
-            return OnEndLabelEdit((NMTVDISPINFO*)lParam);
-            break;
-        }
-        return 0;
-               break;
-       case WM_SETFOCUS:
-               child->nFocusPanel = pane == &child->right? 1: 0;
-               //ListBox_SetSel(hWnd, TRUE, 1);
-               //TODO: check menu items
-        if (!child->nFocusPanel) {
-            UpdateStatus(hWnd, pane->cur);
-        }
-               break;
-       case WM_KEYDOWN:
-               if (wParam == VK_TAB) {
-                       //TODO: SetFocus(Globals.hDriveBar)
-                       SetFocus(child->nFocusPanel ? child->hTreeWnd: child->hListWnd);
-               }
-        break;
-       }
-       return CallWindowProc(g_orgTreeWndProc, hWnd, message, wParam, lParam);
-}
-
-void CreateTreeWnd(HWND parent, Pane* pane, int id)
-{
-       Entry* entry = pane->root;
-    pane->hWnd = CreateTreeView(parent, NULL, id);
-    SetWindowLong(pane->hWnd, GWL_USERDATA, (LPARAM)pane);
-       g_orgTreeWndProc = SubclassWindow(pane->hWnd, TreeWndProc);
-       SendMessage(pane->hWnd, WM_SETFONT, (WPARAM)Globals.hFont, FALSE);
-
-    // insert entries into treectrl
-    if (entry) {
-               insert_tree_entries(pane->hWnd, entry, 0);
-    }
-
-       // calculate column widths
-       if (!s_init) {
-               s_init = 1;
-               init_output(pane->hWnd);
-       }
-}
-
-#endif
diff --git a/rosapps/winfile/treeview.h b/rosapps/winfile/treeview.h
deleted file mode 100644 (file)
index b89e8ab..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  treeview.h
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __TREEVIEW_H__
-#define __TREEVIEW_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-//void CreateTreeWnd(HWND parent, Pane* pane, int id);
-//HTREEITEM AddItemToTree(HWND hwndTV, LPTSTR lpszItem, int nLevel);
-
-HWND CreateTreeView(HWND hwndParent, ChildWnd* pChildWnd, int id);
-void UpdateStatus(HWND hWnd, Entry* pEntry);
-
-BOOL OnTreeExpanding(HWND hwndTV, NMTREEVIEW* pnmtv);
-
-void OnGetDispInfo(NMTVDISPINFO* ptvdi);
-
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __TREEVIEW_H__
diff --git a/rosapps/winfile/utils.c b/rosapps/winfile/utils.c
deleted file mode 100644 (file)
index f794cbf..0000000
+++ /dev/null
@@ -1,500 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  utils.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <commctrl.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <memory.h>
-#include <tchar.h>
-#include <process.h>
-#include <stdio.h>
-
-#include <windowsx.h>
-#include <ctype.h>
-
-#include "main.h"
-#include "listview.h"
-#include "utils.h"
-#include "sort.h"
-
-
-#define        FRM_CALC_CLIENT         0xBF83
-#define        Frame_CalcFrameClient(hWnd, prt) ((BOOL)SNDMSG(hWnd, FRM_CALC_CLIENT, 0, (LPARAM)(PRECT)prt))
-
-
-void display_error(HWND hWnd, DWORD error)
-{
-       PTSTR msg;
-
-       if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
-               0, error, MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT), (PTSTR)&msg, 0, NULL))
-               MessageBox(hWnd, msg, _T("Winefile"), MB_OK);
-       else
-               MessageBox(hWnd, _T("Error"), _T("Winefile"), MB_OK);
-       LocalFree(msg);
-}
-
-
-static void read_directory_win(Entry* parent, LPCTSTR path)
-{
-       Entry* entry = (Entry*) malloc(sizeof(Entry));
-       int level = parent->level + 1;
-       Entry* last = 0;
-       HANDLE hFind;
-//#ifndef _NO_EXTENSIONS
-       HANDLE hFile;
-//#endif
-
-       TCHAR buffer[MAX_PATH], *p;
-       for(p=buffer; *path; )
-               *p++ = *path++;
-
-       lstrcpy(p, _T("\\*"));
-
-    memset(entry, 0, sizeof(Entry));
-       hFind = FindFirstFile(buffer, &entry->data);
-
-       if (hFind != INVALID_HANDLE_VALUE) {
-               parent->down = entry;
-
-               do {
-                       entry->down = 0;
-                       entry->up = parent;
-                       entry->expanded = FALSE;
-                       entry->scanned = FALSE;
-                       entry->level = level;
-
-//#ifdef _NO_EXTENSIONS
-#if 0
-                        // hide directory entry "."
-                       if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
-                               LPCTSTR name = entry->data.cFileName;
-
-                               if (name[0]=='.' && name[1]=='\0')
-                                       continue;
-                       }
-#else
-                       entry->unix_dir = FALSE;
-                       entry->bhfi_valid = FALSE;
-
-                       lstrcpy(p+1, entry->data.cFileName);
-
-                       hFile = CreateFile(buffer, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
-                                                               0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0);
-
-                       if (hFile != INVALID_HANDLE_VALUE) {
-                               if (GetFileInformationByHandle(hFile, &entry->bhfi))
-                                       entry->bhfi_valid = TRUE;
-
-                               CloseHandle(hFile);
-                       }
-#endif
-
-                       last = entry;
-
-                       entry = (Entry*) malloc(sizeof(Entry));
-            memset(entry, 0, sizeof(Entry));
-
-                       if (last)
-                               last->next = entry;
-               } while(FindNextFile(hFind, &entry->data));
-
-               last->next = 0;
-
-               FindClose(hFind);
-       } else
-               parent->down = 0;
-
-       free(entry);
-
-       parent->scanned = TRUE;
-}
-
-
-void read_directory(Entry* parent, LPCTSTR path, int sortOrder)
-{
-       TCHAR buffer[MAX_PATH];
-       Entry* entry;
-       LPCTSTR s;
-       PTSTR d;
-
-#if !defined(_NO_EXTENSIONS) && defined(__linux__)
-       if (parent->unix_dir)
-       {
-               read_directory_unix(parent, path);
-
-               if (Globals.prescan_node) {
-                       s = path;
-                       d = buffer;
-
-                       while(*s)
-                               *d++ = *s++;
-
-                       *d++ = _T('/');
-
-                       for(entry=parent->down; entry; entry=entry->next)
-                               if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
-                                       lstrcpy(d, entry->data.cFileName);
-                                       read_directory_unix(entry, buffer);
-                                       SortDirectory(entry, sortOrder);
-                               }
-               }
-       }
-       else
-#endif
-       {
-               read_directory_win(parent, path);
-
-               if (Globals.prescan_node) {
-                       s = path;
-                       d = buffer;
-
-                       while(*s)
-                               *d++ = *s++;
-
-                       *d++ = _T('\\');
-
-                       for(entry=parent->down; entry; entry=entry->next)
-                               if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
-                                       lstrcpy(d, entry->data.cFileName);
-                                       read_directory_win(entry, buffer);
-                                       SortDirectory(entry, sortOrder);
-                               }
-               }
-       }
-
-       SortDirectory(parent, sortOrder);
-}
-
- // get full path of specified directory entry
-void get_path(Entry* dir, PTSTR path)
-{
-       Entry* entry;
-       int len = 0;
-       int level = 0;
-
-       for(entry=dir; entry; level++) {
-               LPCTSTR name = entry->data.cFileName;
-               LPCTSTR s = name;
-               int l;
-
-               for(l=0; *s && *s!=_T('/') && *s!=_T('\\'); s++)
-                       l++;
-
-               if (entry->up) {
-                       memmove(path+l+1, path, len*sizeof(TCHAR));
-                       memcpy(path+1, name, l*sizeof(TCHAR));
-                       len += l+1;
-
-#ifndef _NO_EXTENSIONS
-                       if (entry->unix_dir)
-                               path[0] = _T('/');
-                       else
-#endif
-                               path[0] = _T('\\');
-
-                       entry = entry->up;
-               } else {
-                       memmove(path+l, path, len*sizeof(TCHAR));
-                       memcpy(path, name, l*sizeof(TCHAR));
-                       len += l;
-                       break;
-               }
-       }
-
-       if (!level) {
-#ifndef _NO_EXTENSIONS
-               if (entry->unix_dir)
-                       path[len++] = _T('/');
-               else
-#endif
-                       path[len++] = _T('\\');
-       }
-
-       path[len] = _T('\0');
-}
-
-
-#ifndef _NO_EXTENSIONS
-
-void frame_get_clientspace(HWND hWnd, PRECT prect)
-{
-       RECT rt;
-
-       if (!IsIconic(hWnd))
-               GetClientRect(hWnd, prect);
-       else {
-               WINDOWPLACEMENT wp;
-               GetWindowPlacement(hWnd, &wp);
-               prect->left = prect->top = 0;
-               prect->right = wp.rcNormalPosition.right-wp.rcNormalPosition.left-
-                                               2*(GetSystemMetrics(SM_CXSIZEFRAME)+GetSystemMetrics(SM_CXEDGE));
-               prect->bottom = wp.rcNormalPosition.bottom-wp.rcNormalPosition.top-
-                                               2*(GetSystemMetrics(SM_CYSIZEFRAME)+GetSystemMetrics(SM_CYEDGE))-
-                                               GetSystemMetrics(SM_CYCAPTION)-GetSystemMetrics(SM_CYMENUSIZE);
-       }
-       if (IsWindowVisible(Globals.hToolBar)) {
-               GetClientRect(Globals.hToolBar, &rt);
-               prect->top += rt.bottom+2;
-       }
-       if (IsWindowVisible(Globals.hDriveBar)) {
-               GetClientRect(Globals.hDriveBar, &rt);
-               prect->top += rt.bottom+2;
-       }
-       if (IsWindowVisible(Globals.hStatusBar)) {
-               GetClientRect(Globals.hStatusBar, &rt);
-               prect->bottom -= rt.bottom;
-       }
-}
-
-
-#endif
-
-
-int is_exe_file(LPCTSTR ext)
-{
-       const static LPCTSTR executable_extensions[] = {
-               _T("COM"),
-               _T("EXE"),
-               _T("BAT"),
-               _T("CMD"),
-#ifndef _NO_EXTENSIONS
-               _T("CMM"),
-               _T("BTM"),
-               _T("AWK"),
-#endif
-               0
-       };
-       TCHAR ext_buffer[_MAX_EXT];
-       const LPCTSTR* p;
-       LPCTSTR s;
-       LPTSTR d;
-
-       for (s = ext + 1, d = ext_buffer; (*d = tolower(*s)); s++)
-               d++;
-       for (p = executable_extensions; *p; p++)
-               if (!_tcscmp(ext_buffer, *p))
-                       return 1;
-       return 0;
-}
-
-int is_registered_type(LPCTSTR ext)
-{
-       //TODO
-
-       return 1;
-}
-
-void set_curdir(ChildWnd* child, Entry* entry)
-{
-       TCHAR path[MAX_PATH];
-
-//     child->left.cur = entry;
-//     child->right.root = entry;
-//     child->right.cur = entry;
-
-       if (!entry->scanned)
-               scan_entry(child, entry);
-       else {
-//             ListBox_ResetContent(child->hListWnd);
-//             insert_entries(&child->right, entry->down, -1);
-
-//        RefreshList(child->hListWnd, entry);
-
-//             calc_widths(&child->right, FALSE);
-//#ifndef _NO_EXTENSIONS
-//             set_header(&child->right);
-//#endif
-       }
-        RefreshList(child->hListWnd, entry->down);
-
-       get_path(entry, path);
-       lstrcpy(child->szPath, path);
-       SetWindowText(child->hWnd, path);
-       SetCurrentDirectory(path);
-}
-
-
-// calculate prefered width for all visible columns
-BOOL calc_widths(Pane* pane, BOOL anyway)
-{
-       int col, x, cx, spc=3*Globals.spaceSize.cx;
-       int entries = ListBox_GetCount(pane->hWnd);
-       int orgWidths[COLUMNS];
-       int orgPositions[COLUMNS+1];
-       HFONT hfontOld;
-       HDC hdc;
-       int cnt;
-
-       if (!anyway) {
-               memcpy(orgWidths, pane->widths, sizeof(orgWidths));
-               memcpy(orgPositions, pane->positions, sizeof(orgPositions));
-       }
-
-       for (col = 0; col < COLUMNS; col++)
-               pane->widths[col] = 0;
-
-       hdc = GetDC(pane->hWnd);
-       hfontOld = SelectFont(hdc, Globals.hFont);
-
-       for (cnt = 0; cnt < entries; cnt++) {
-#if 0
-               Entry* entry = (Entry*) ListBox_GetItemData(pane->hWnd, cnt);
-               DRAWITEMSTRUCT dis = {0/*CtlType*/, 0/*CtlID*/,
-                       0/*itemID*/, 0/*itemAction*/, 0/*itemState*/,
-                       pane->hWnd/*hwndItem*/, hdc};
-               draw_item(pane, &dis, entry, COLUMNS);
-#endif
-       }
-       SelectObject(hdc, hfontOld);
-       ReleaseDC(pane->hWnd, hdc);
-
-       x = 0;
-       for ( col = 0; col < COLUMNS; col++) {
-               pane->positions[col] = x;
-               cx = pane->widths[col];
-               if (cx) {
-                       cx += spc;
-                       if (cx < IMAGE_WIDTH)
-                               cx = IMAGE_WIDTH;
-                       pane->widths[col] = cx;
-               }
-               x += cx;
-       }
-       pane->positions[COLUMNS] = x;
-       ListBox_SetHorizontalExtent(pane->hWnd, x);
-
-        // no change?
-       if (!memcmp(orgWidths, pane->widths, sizeof(orgWidths)))
-               return FALSE;
-
-        // don't move, if only collapsing an entry
-       if (!anyway && pane->widths[0]<orgWidths[0] &&
-               !memcmp(orgWidths+1, pane->widths+1, sizeof(orgWidths)-sizeof(int))) {
-               pane->widths[0] = orgWidths[0];
-               memcpy(pane->positions, orgPositions, sizeof(orgPositions));
-
-               return FALSE;
-       }
-       InvalidateRect(pane->hWnd, 0, TRUE);
-       return TRUE;
-}
-
-
- // calculate one prefered column width
-
-void calc_single_width(Pane* pane, int col)
-{
-       HFONT hfontOld;
-       int x, cx;
-       int entries = ListBox_GetCount(pane->hWnd);
-       int cnt;
-       HDC hdc;
-
-       pane->widths[col] = 0;
-       hdc = GetDC(pane->hWnd);
-       hfontOld = SelectFont(hdc, Globals.hFont);
-       for (cnt = 0; cnt < entries; cnt++) {
-#if 0
-               Entry* entry = (Entry*) ListBox_GetItemData(pane->hWnd, cnt);
-               DRAWITEMSTRUCT dis = {0, 0, 0, 0, 0, pane->hWnd, hdc};
-               draw_item(pane, &dis, entry, col);
-#endif
-       }
-       SelectObject(hdc, hfontOld);
-       ReleaseDC(pane->hWnd, hdc);
-       cx = pane->widths[col];
-       if (cx) {
-               cx += 3*Globals.spaceSize.cx;
-               if (cx < IMAGE_WIDTH)
-                       cx = IMAGE_WIDTH;
-       }
-       pane->widths[col] = cx;
-       x = pane->positions[col] + cx;
-       for(; col<COLUMNS; ) {
-               pane->positions[++col] = x;
-               x += pane->widths[col];
-       }
-       ListBox_SetHorizontalExtent(pane->hWnd, x);
-}
-
-
-#ifndef _NO_EXTENSIONS
-
-static struct FullScreenParameters {
-       BOOL    mode;
-       RECT    orgPos;
-       BOOL    wasZoomed;
-} g_fullscreen = {
-       FALSE   // mode
-};
-
-BOOL toggle_fullscreen(HWND hWnd)
-{
-       RECT rt;
-
-       if ((g_fullscreen.mode=!g_fullscreen.mode)) {
-               GetWindowRect(hWnd, &g_fullscreen.orgPos);
-               g_fullscreen.wasZoomed = IsZoomed(hWnd);
-
-               Frame_CalcFrameClient(hWnd, &rt);
-               ClientToScreen(hWnd, (LPPOINT)&rt.left);
-               ClientToScreen(hWnd, (LPPOINT)&rt.right);
-
-               rt.left = g_fullscreen.orgPos.left-rt.left;
-               rt.top = g_fullscreen.orgPos.top-rt.top;
-               rt.right = GetSystemMetrics(SM_CXSCREEN)+g_fullscreen.orgPos.right-rt.right;
-               rt.bottom = GetSystemMetrics(SM_CYSCREEN)+g_fullscreen.orgPos.bottom-rt.bottom;
-
-               MoveWindow(hWnd, rt.left, rt.top, rt.right-rt.left, rt.bottom-rt.top, TRUE);
-       } else {
-               MoveWindow(hWnd, g_fullscreen.orgPos.left, g_fullscreen.orgPos.top,
-                                                       g_fullscreen.orgPos.right-g_fullscreen.orgPos.left,
-                                                       g_fullscreen.orgPos.bottom-g_fullscreen.orgPos.top, TRUE);
-
-               if (g_fullscreen.wasZoomed)
-                       ShowWindow(hWnd, WS_MAXIMIZE);
-       }
-
-       return g_fullscreen.mode;
-}
-
-void fullscreen_move(HWND hWnd)
-{
-       RECT rt, pos;
-       GetWindowRect(hWnd, &pos);
-
-       Frame_CalcFrameClient(hWnd, &rt);
-       ClientToScreen(hWnd, (LPPOINT)&rt.left);
-       ClientToScreen(hWnd, (LPPOINT)&rt.right);
-
-       rt.left = pos.left-rt.left;
-       rt.top = pos.top-rt.top;
-       rt.right = GetSystemMetrics(SM_CXSCREEN)+pos.right-rt.right;
-       rt.bottom = GetSystemMetrics(SM_CYSCREEN)+pos.bottom-rt.bottom;
-
-       MoveWindow(hWnd, rt.left, rt.top, rt.right-rt.left, rt.bottom-rt.top, TRUE);
-}
-
-#endif
diff --git a/rosapps/winfile/utils.h b/rosapps/winfile/utils.h
deleted file mode 100644 (file)
index 35fef0c..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  utils.h
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __UTILS_H__
-#define __UTILS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-void display_error(HWND hWnd, DWORD error);
-void frame_get_clientspace(HWND hWnd, PRECT prect);
-BOOL toggle_fullscreen(HWND hWnd);
-void fullscreen_move(HWND hWnd);
-
-BOOL calc_widths(Pane* pane, BOOL anyway);
-void calc_single_width(Pane* pane, int col);
-void read_directory(Entry* parent, LPCTSTR path, int sortOrder);
-int is_registered_type(LPCTSTR ext);
-int is_exe_file(LPCTSTR ext);
-void set_curdir(ChildWnd* child, Entry* entry);
-void get_path(Entry* dir, PTSTR path);
-
-
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __UTILS_H__
diff --git a/rosapps/winfile/winfile.rc b/rosapps/winfile/winfile.rc
deleted file mode 100644 (file)
index 961f8b3..0000000
+++ /dev/null
@@ -1,584 +0,0 @@
-/* $Id: winfile.rc,v 1.11 2004/10/16 22:30:19 gvg Exp $ */
-
-#include <windows.h>
-
-#define REACTOS_STR_FILE_DESCRIPTION   "ReactOS File Manager by Robert Dickenson\0"
-#define REACTOS_STR_INTERNAL_NAME      "winfile\0"
-#define REACTOS_STR_ORIGINAL_FILENAME  "winfile.exe\0"
-#define REACTOS_STR_ORIGINAL_COPYRIGHT "Copyright © 2002 Robert Dickenson\0"
-#include <reactos/version.rc>
-
-//Microsoft Developer Studio generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#define APSTUDIO_HIDDEN_SYMBOLS
-#include "windows.h"
-#undef APSTUDIO_HIDDEN_SYMBOLS
-#include "resource.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_WINFILE             ICON    DISCARDABLE     "res/winfile.ico"
-IDI_SMALL               ICON    DISCARDABLE     "res/small.ico"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Bitmap
-//
-
-IDB_FOLDER              BITMAP  DISCARDABLE     "res/folder1.bmp"
-IDB_FOLDER_RED          BITMAP  DISCARDABLE     "res/folder3.bmp"
-IDB_FOLDER_OPEN         BITMAP  DISCARDABLE     "res/folder_open.bmp"
-IDB_ROOT                BITMAP  DISCARDABLE     "res/folder2.bmp"
-IDB_TOOLBAR             BITMAP  DISCARDABLE     "res/toolbar.bmp"
-IDB_DRIVEBAR            BITMAP  DISCARDABLE     "res/drivebar.bmp"
-IDB_IMAGES              BITMAP  DISCARDABLE     "res/images.bmp"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Menu
-//
-
-IDC_WINFILE MENU DISCARDABLE 
-BEGIN
-    POPUP "&File"
-    BEGIN
-        MENUITEM "&Open\tEnter",                ID_FILE_OPEN
-        MENUITEM "&Move...\tF7",                ID_FILE_MOVE
-        MENUITEM "&Copy...\tF8",                ID_FILE_COPY, GRAYED
-        MENUITEM "Copy to Clip&board...\tF9",   ID_FILE_COPY_CLIPBOARD
-        , GRAYED
-        MENUITEM "&Delete...\tDel",             ID_FILE_DELETE, GRAYED
-        MENUITEM "Re&name...\t",                ID_FILE_RENAME, GRAYED
-        MENUITEM "Proper&ties...\tAlt+Enter",   ID_FILE_PROPERTIES
-        MENUITEM SEPARATOR
-        MENUITEM "Compre&ss...\t",              ID_FILE_COMPRESS, GRAYED
-        MENUITEM "&Uncompress...\t",            ID_FILE_UNCOMPRESS, GRAYED
-        MENUITEM SEPARATOR
-        MENUITEM "&Run...\t",                   ID_FILE_RUN
-        MENUITEM "&Print...\t",                 ID_FILE_PRINT, GRAYED
-        MENUITEM "&Associate...\t",             ID_FILE_ASSOCIATE, GRAYED
-        MENUITEM SEPARATOR
-        MENUITEM "Cr&eate directory...\t",      ID_FILE_CREATE_DIRECTORY
-        , GRAYED
-        MENUITEM "Searc&h...\t",                ID_FILE_SEARCH, GRAYED
-        MENUITEM "Select &Files...\t",          ID_FILE_SELECT_FILES, GRAYED
-        MENUITEM SEPARATOR
-        MENUITEM "E&xit",                       ID_FILE_EXIT
-    END
-    POPUP "&Disk"
-    BEGIN
-        MENUITEM "&Copy Disk...\t",             ID_DISK_COPY_DISK, GRAYED
-        MENUITEM "&Label Disk...\t",            ID_DISK_LABEL_DISK, GRAYED
-        MENUITEM SEPARATOR
-        MENUITEM "&Format Disk..\t",            ID_DISK_FORMAT_DISK
-        MENUITEM SEPARATOR
-        MENUITEM "Connect &Network Drive...",   ID_DISK_CONNECT_NETWORK_DRIVE
-
-        MENUITEM "&Disconnect Network Drive...", 
-                                                ID_DISK_DISCONNECT_NETWORK_DRIVE
-
-        MENUITEM SEPARATOR
-        MENUITEM "Share &As...",                ID_DISK_SHARE_AS, GRAYED
-        MENUITEM "S&top Sharing...",            ID_DISK_STOP_SHARING, GRAYED
-        MENUITEM SEPARATOR
-        MENUITEM "&Select Drive...\t",          ID_DISK_SELECT_DRIVE, GRAYED
-    END
-    POPUP "&Tree"
-    BEGIN
-        MENUITEM "E&xpand One Level\t+",        ID_TREE_EXPAND_ONE_LEVEL
-        MENUITEM "Expand &Branch\t*",           ID_TREE_EXPAND_BRANCH
-        MENUITEM "Expand &All\tCtrl+*",         ID_TREE_EXPAND_ALL
-        MENUITEM "Collapse Branch\t-",          ID_TREE_COLLAPSE_BRANCH
-        MENUITEM SEPARATOR
-        MENUITEM "&Indicate Expandable Branches", 
-                                                ID_TREE_INDICATE_EXPANDABLE_BRANCHES
-        , CHECKED, GRAYED
-    END
-    POPUP "&View"
-    BEGIN
-        MENUITEM "T&ree and Directory",         ID_VIEW_TREE_DIRECTORY
-        , GRAYED
-        MENUITEM "Tr&ee Only",                  ID_VIEW_TREE_ONLY, GRAYED
-        MENUITEM "Directory &Only",             ID_VIEW_DIRECTORY_ONLY
-        , GRAYED
-        MENUITEM SEPARATOR
-        MENUITEM "Sp&lit",                      ID_VIEW_SPLIT, GRAYED
-        MENUITEM SEPARATOR
-        MENUITEM "&Name",                       ID_VIEW_NAME, GRAYED
-        MENUITEM "&All File Details",           ID_VIEW_ALL_FILE_DETAILS
-        , CHECKED, GRAYED
-        MENUITEM "&Partial Details...",         ID_VIEW_PARTIAL_DETAILS
-        , GRAYED
-        MENUITEM SEPARATOR
-        MENUITEM "&Sort by Name",               ID_VIEW_SORT_BY_NAME
-        MENUITEM "Sort &by Type",               ID_VIEW_SORT_BY_TYPE
-        MENUITEM "Sort by Si&ze",               ID_VIEW_SORT_BY_SIZE
-        MENUITEM "Sort by &Date",               ID_VIEW_SORT_BY_DATE
-        MENUITEM SEPARATOR
-        MENUITEM "By File &Type...",            ID_VIEW_BY_FILE_TYPE
-    END
-    POPUP "&Options"
-    BEGIN
-        MENUITEM "&Confirmation...",            ID_OPTIONS_CONFIRMATION
-        MENUITEM "&Font...",                    ID_OPTIONS_FONT, GRAYED
-        MENUITEM "Customise Tool&bar...",       ID_OPTIONS_CUSTOMISE_TOOLBAR
-        MENUITEM SEPARATOR
-        MENUITEM "&Toolbar",                    ID_OPTIONS_TOOLBAR
-        MENUITEM "&Drivebar",                   ID_OPTIONS_DRIVEBAR
-        MENUITEM "&Statusbar",                  ID_OPTIONS_STATUSBAR
-        MENUITEM SEPARATOR
-        MENUITEM "&Open New Window on Connect", ID_OPTIONS_OPEN_NEW_WINDOW_ON_CONNECT
-
-        MENUITEM "&Minimise on Use",            ID_OPTIONS_MINIMISE_ON_USE
-        MENUITEM "&Save Settings on Exit",      ID_OPTIONS_SAVE_ON_EXIT
-    END
-    POPUP "&Security"
-    BEGIN
-        MENUITEM "&Permissions...",             ID_SECURITY_PERMISSIONS
-        , GRAYED
-        MENUITEM "&Auditing...",                ID_SECURITY_AUDITING, GRAYED
-        MENUITEM "&Owner...",                   ID_SECURITY_OWNER, GRAYED
-    END
-    POPUP "&Window"
-    BEGIN
-        MENUITEM "&New Window",                 ID_WINDOW_NEW_WINDOW
-        MENUITEM "&Cascade\tShift+F5",          ID_WINDOW_CASCADE
-        MENUITEM "Tile &Horizontally",          ID_WINDOW_TILE_HORZ
-        MENUITEM "&Tile Vertically\tShift+F4",  ID_WINDOW_TILE_VERT
-        MENUITEM "&Arrange Icons",              ID_WINDOW_ARRANGE_ICONS
-        MENUITEM "&Refresh\tF5",                ID_WINDOW_REFRESH
-    END
-    POPUP "&Help"
-    BEGIN
-        MENUITEM "&Contents",                   ID_HELP_CONTENTS
-        MENUITEM "&Search for Help on...",      ID_HELP_SEARCH_HELP
-        MENUITEM "&How to Use Help",            ID_HELP_HOW_TO_USE_HELP
-        MENUITEM SEPARATOR
-        MENUITEM "&About File Manager",         ID_HELP_ABOUT
-    END
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_ABOUTBOX DIALOG DISCARDABLE  22, 17, 230, 75
-STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
-CAPTION "About"
-FONT 8, "System"
-BEGIN
-    ICON            IDI_WINFILE,IDI_WINFILE,14,9,16,16
-    LTEXT           "ReactOS winfile Version 1.0",IDC_STATIC,49,10,119,8,
-                    SS_NOPREFIX
-    LTEXT           "Copyright (C) 2002 ReactOS Team",IDC_STATIC,49,20,119,8
-    DEFPUSHBUTTON   "OK",IDOK,195,6,30,11,WS_GROUP
-END
-
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-2 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
-    "#include ""windows.h""\r\n"
-    "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
-    "#include ""resource.h""\r\n"
-    "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "\r\n"
-    "\0"
-END
-
-#endif    // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// String Table
-//
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    IDS_LIST_COLUMN_DOSNAME "DOS-Name"
-    IDS_APP_TITLE           "ReactOS File Manager"
-    IDC_WINFILE             "ROSFILE"
-    IDC_WINFILE_CHILD       "ROSFILE_CHILD"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    ID_FILE_MENU            "Commands for working with files"
-    ID_DISK_MENU            "Commands for working with disk"
-    ID_TREE_MENU            "Commands for working in the tree window"
-    ID_VIEW_MENU            "Commands for determining how information is displayed"
-    ID_OPTIONS_MENU         "Commands for setting options"
-    ID_SECURITY_MENU        "Commands for manipulating file and directory security"
-    ID_WINDOW_MENU          "Commands for manipulating windows"
-    ID_HELP_MENU            "Commands for displaying help and information about file manager"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    ID_TREE_COLLAPSE_BRANCH "Collapses all directories of the selected directory"
-    ID_FILE_OPEN            "Opens selected item"
-    ID_FILE_MOVE            "Moves selected item"
-    ID_FILE_COPY            "Copies files and directories"
-    ID_FILE_COPY_CLIPBOARD  "Copies selected item to the clipboard"
-    ID_FILE_DELETE          "Deletes files and directories"
-    ID_FILE_RENAME          "Renames a file or directory"
-    ID_FILE_PROPERTIES      "Set file attributes and display file properties"
-    ID_FILE_COMPRESS        "Compresses files or directories"
-    ID_FILE_UNCOMPRESS      "Uncompresses files or directories"
-    ID_FILE_RUN             "Starts or opens and application or file"
-    ID_FILE_PRINT           "Prints a file"
-    ID_FILE_ASSOCIATE       "associates a file type with an application"
-    ID_FILE_CREATE_DIRECTORY "Creates a directory"
-    ID_FILE_SEARCH          "Searches for files and directories"
-    ID_FILE_SELECT_FILES    "Selects files and directories"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    ID_FILE_EXIT            "Quits the file manager"
-    ID_DISK_COPY_DISK       "Copies a floppy disk"
-    ID_DISK_LABEL_DISK      "Assigns or changes the volume lable of the disk"
-    ID_DISK_FORMAT_DISK     "Formats a floppy disk"
-    ID_DISK_CONNECT_NETWORK_DRIVE "Connects to a network drive"
-    ID_DISK_DISCONNECT_NETWORK_DRIVE "Disconnects from a network drive"
-    ID_DISK_SHARE_AS        "Shares a directory"
-    ID_DISK_STOP_SHARING    "Stops sharing a directory"
-    ID_DISK_SELECT_DRIVE    "Selects a different drive or volume"
-    ID_TREE_EXPAND_ONE_LEVEL "Displays another level of a directory"
-    ID_TREE_EXPAND_BRANCH   "Displays all levels of a directory"
-    ID_TREE_EXPAND_ALL      "Displays all levels of all directories"
-    ID_TREE_INDICATE_EXPANDABLE_BRANCHES 
-                            "Indicates directories that have sub-directories"
-    ID_VIEW_TREE_DIRECTORY  "Displays the directory tree and the contents of the current directory"
-    ID_VIEW_TREE_ONLY       "Displays the directory tree"
-    ID_VIEW_DIRECTORY_ONLY  "Displays the contents of the current directory"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    ID_VIEW_SPLIT           "Splits a directory window or moves the split bar"
-    ID_VIEW_NAME            "Show filenames only"
-    ID_VIEW_ALL_FILE_DETAILS "Show all file details"
-    ID_VIEW_PARTIAL_DETAILS "Show partial file details"
-    ID_VIEW_SORT_BY_NAME    "Sorts files by name"
-    ID_VIEW_SORT_BY_TYPE    "Sorts files by type"
-    ID_VIEW_SORT_BY_SIZE    "Sorts files by size"
-    ID_VIEW_SORT_BY_DATE    "Sorts files by date"
-    ID_VIEW_BY_FILE_TYPE    "Shows files of a specified type and filters filenames"
-    ID_OPTIONS_CONFIRMATION "Controls confirmation messages..."
-    ID_OPTIONS_FONT         "Changes the File Manager Font..."
-    ID_OPTIONS_CUSTOMISE_TOOLBAR "Customises the toolbar..."
-    ID_OPTIONS_TOOLBAR      "Shows or hides the tool bar"
-    ID_OPTIONS_DRIVEBAR     "Shows or hides the drive bar"
-    ID_OPTIONS_STATUSBAR    "Shows or hides the status bar"
-    ID_OPTIONS_OPEN_NEW_WINDOW_ON_CONNECT 
-                            "Opens a new window when connnecting"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    ID_OPTIONS_MINIMISE_ON_USE "Reduces File Manager to an icon at startup"
-    ID_OPTIONS_SAVE_ON_EXIT "Saves settings when exiting File Manager"
-    ID_SECURITY_PERMISSIONS "View or set permission information on the selected items"
-    ID_SECURITY_AUDITING    "View or set auditing information on the selected items"
-    ID_SECURITY_OWNER       "View or take ownership of the selected items"
-    ID_WINDOW_NEW_WINDOW    "Opens a new window"
-    ID_WINDOW_CASCADE       "Cascades windows"
-    ID_WINDOW_TILE_HORZ     "Tiles windows horizontally"
-    ID_WINDOW_TILE_VERT     "Tiles windows vertically"
-    ID_WINDOW_ARRANGE_ICONS "Arranges icons"
-    ID_WINDOW_REFRESH       "Updates the contents of a window"
-    ID_HELP_CONTENTS        "Displays contents for File Manager Help"
-    ID_HELP_SEARCH_HELP     "Searches for a topic in File Manager Help"
-    ID_HELP_HOW_TO_USE_HELP "Displays information about using help"
-    ID_HELP_ABOUT           "Displays program information, version number and copyright"
-END
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    IDS_LIST_COLUMN_NAME    "Name"
-    IDS_LIST_COLUMN_SIZE    "Size"
-    IDS_LIST_COLUMN_DATE    "Date"
-    IDS_LIST_COLUMN_TIME    "Time"
-    IDS_LIST_COLUMN_ATTRIB  "Attributes"
-END
-
-#endif    // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// English (Australia) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENA)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_DIALOG_FILE_MOVE DIALOG DISCARDABLE  0, 0, 268, 64
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Move"
-FONT 8, "MS Sans Serif"
-BEGIN
-    DEFPUSHBUTTON   "OK",IDOK,211,7,50,14
-    PUSHBUTTON      "Cancel",IDCANCEL,211,24,50,14
-    LTEXT           "Current Directory:",IDC_STATIC,7,7,54,10
-    EDITTEXT        IDC_FILE_MOVE_FROM,36,26,168,13,ES_AUTOHSCROLL
-    EDITTEXT        IDC_FILE_MOVE_TO,36,44,168,13,ES_AUTOHSCROLL
-    LTEXT           "From:",IDC_STATIC,7,28,27,9
-    LTEXT           "To:",IDC_STATIC,7,48,23,9
-    LTEXT           "",IDC_STATIC,65,7,139,12
-END
-
-IDD_DIALOG_DIRECTORY DIALOG DISCARDABLE  0, 0, 187, 95
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Dialog"
-FONT 8, "MS Sans Serif"
-BEGIN
-    DEFPUSHBUTTON   "OK",IDOK,130,7,50,14
-    PUSHBUTTON      "Cancel",IDCANCEL,130,24,50,14
-END
-
-IDD_DIALOG_VIEW_TYPE DIALOG DISCARDABLE  0, 0, 161, 97
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "By File Type"
-FONT 8, "MS Sans Serif"
-BEGIN
-    DEFPUSHBUTTON   "OK",IDOK,104,7,50,14
-    PUSHBUTTON      "Cancel",IDCANCEL,104,24,50,14
-    EDITTEXT        IDC_VIEW_TYPE_MASK,31,7,63,12,ES_AUTOHSCROLL
-    GROUPBOX        "File Type",IDC_STATIC,7,23,87,56
-    CONTROL         "&Directories",IDC_VIEW_TYPE_DIRECTORIES,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,13,32,70,10
-    CONTROL         "&Programs",IDC_VIEW_TYPE_PROGRAMS,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,13,43,70,10
-    CONTROL         "Docu&ments",IDC_VIEW_TYPE_DOCUMENTS,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,13,54,70,10
-    CONTROL         "&Other files",IDC_VIEW_TYPE_OTHERS,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,13,65,70,10
-    CONTROL         "Show Hidden/&System Files",IDC_VIEW_TYPE_SYSFILES,
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,81,106,9
-    LTEXT           "&Name:",IDC_STATIC,7,8,22,10
-END
-
-IDD_DIALOG_OPTIONS_CONFIRMATON DIALOG DISCARDABLE  0, 0, 221, 89
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Confirmation"
-FONT 8, "MS Sans Serif"
-BEGIN
-    DEFPUSHBUTTON   "OK",IDOK,164,7,50,14
-    PUSHBUTTON      "Cancel",IDCANCEL,164,24,50,14
-    GROUPBOX        "Confirm On",IDC_STATIC,7,7,152,75
-    CONTROL         "File &Delete",IDC_CONFIRMATION_FILE_DELETE,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,13,18,132,8
-    CONTROL         "D&irectory Delete",IDC_CONFIRMATION_DIR_DELETE,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,13,29,132,8
-    CONTROL         "File &Replace",IDC_CONFIRMATION_FILE_REPLACE,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,13,40,132,8
-    CONTROL         "&Mouse Actions",IDC_CONFIRMATION_MOUSE_ACTIONS,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,13,50,132,8
-    CONTROL         "Dis&k Commands",IDC_CONFIRMATION_DISK_COMMANDS,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,13,60,132,8
-    CONTROL         "Modify &System, Hidden, Read Only files",
-                    IDC_CONFIRMATION_MODIFY_SYSTEM,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,13,71,132,8
-END
-
-IDD_DIALOG_PROPERTIES DIALOG DISCARDABLE  0, 0, 248, 215
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Properties for %s"
-FONT 8, "MS Sans Serif"
-BEGIN
-    DEFPUSHBUTTON   "OK",IDOK,191,83,50,14
-    PUSHBUTTON      "Cancel",IDCANCEL,191,101,50,14
-    LTEXT           "&File Name:",IDC_STATIC,7,7,59,9
-    LTEXT           "Static",IDC_STATIC_PROP_PATH,71,18,162,9
-    LTEXT           "&Path",IDC_STATIC,7,18,59,9
-    LTEXT           "Last Change:",IDC_STATIC,7,29,59,9
-    LTEXT           "Version:",IDC_STATIC,7,40,59,9
-    LTEXT           "Static",IDC_STATIC_PROP_FILENAME,71,7,162,9,WS_TABSTOP
-    LTEXT           "Cop&yright:",IDC_STATIC,7,51,59,9
-    LTEXT           "Size:",IDC_STATIC,7,62,59,9
-    LTEXT           "Static",IDC_STATIC_PROP_LASTCHANGE,71,29,162,9
-    GROUPBOX        "Attributes",IDC_STATIC,7,79,158,46
-    GROUPBOX        "&Version Information",IDC_STATIC,7,129,234,79
-    CONTROL         "&Read Only",IDC_CHECK_READONLY,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,17,91,68,9
-    CONTROL         "&Archive",IDC_CHECK_ARCHIVE,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,17,101,68,9
-    CONTROL         "&Compressed",IDC_CHECK_COMPRESSED,"Button",
-                    BS_AUTOCHECKBOX | WS_TABSTOP,17,111,68,9
-    CONTROL         "H&idden",IDC_CHECK_HIDDEN,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,92,91,68,9
-    CONTROL         "&System",IDC_CHECK_SYSTEM,"Button",BS_AUTOCHECKBOX | 
-                    WS_TABSTOP,92,101,68,9
-    LTEXT           "Static",IDC_STATIC_PROP_VERSION,71,40,162,9
-    LTEXT           "Static",IDC_STATIC_PROP_COPYRIGHT,71,51,162,9
-    LTEXT           "Static",IDC_STATIC_PROP_SIZE,71,62,162,9
-    LISTBOX         IDC_LIST_PROP_VERSION_TYPES,13,139,107,63,LBS_SORT | 
-                    LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
-//    LISTBOX         IDC_LIST_PROP_VERSION_VALUES,123,139,111,63,LBS_SORT | 
-//                    LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
-    EDITTEXT        IDC_LIST_PROP_VERSION_VALUES,123,139,111,63,ES_MULTILINE | ES_READONLY | 
-                    WS_VSCROLL
-END
-
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "resource.h\0"
-END
-
-#endif    // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE 
-BEGIN
-    IDD_DIALOG_FILE_MOVE, DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 261
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 57
-    END
-
-    IDD_DIALOG_DIRECTORY, DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 180
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 88
-    END
-
-    IDD_DIALOG_VIEW_TYPE, DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 154
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 90
-    END
-
-    IDD_DIALOG_OPTIONS_CONFIRMATON, DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 214
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 82
-    END
-
-    IDD_DIALOG_PROPERTIES, DIALOG
-    BEGIN
-        LEFTMARGIN, 7
-        RIGHTMARGIN, 241
-        TOPMARGIN, 7
-        BOTTOMMARGIN, 208
-    END
-END
-#endif    // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Accelerator
-//
-#ifdef _MSC_VER
-IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE 
-BEGIN
-    "+",            ID_DISK_SELECT_DRIVE,   ASCII,  NOINVERT
-    "+",            ID_TREE_EXPAND_ONE_LEVEL, ASCII, NOINVERT
-    "-",            ID_TREE_EXPAND_ALL,     ASCII,  NOINVERT
-    "8",            ID_TREE_EXPAND_BRANCH,  VIRTKEY, SHIFT, NOINVERT
-    VK_DELETE,      ID_FILE_DELETE,         VIRTKEY, NOINVERT
-    VK_F4,          ID_WINDOW_TILE_VERT,    VIRTKEY, SHIFT, NOINVERT
-    VK_F5,          ID_WINDOW_REFRESH,      VIRTKEY, NOINVERT
-    VK_F5,          ID_WINDOW_CASCADE,      VIRTKEY, SHIFT, NOINVERT
-    VK_F7,          ID_FILE_MOVE,           VIRTKEY, NOINVERT
-    VK_F8,          ID_FILE_COPY,           VIRTKEY, NOINVERT
-    VK_F9,          ID_FILE_COPY_CLIPBOARD, VIRTKEY, NOINVERT
-    VK_MULTIPLY,    ID_TREE_EXPAND_BRANCH,  VIRTKEY, CONTROL, NOINVERT
-    VK_RETURN,      ID_FILE_OPEN,           VIRTKEY, NOINVERT
-    VK_RETURN,      ID_FILE_PROPERTIES,     VIRTKEY, ALT, NOINVERT
-    VK_SUBTRACT,    ID_TREE_EXPAND_ALL,     VIRTKEY, NOINVERT
-END
-#endif // _MSC_VER
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// String Table
-//
-
-STRINGTABLE DISCARDABLE 
-BEGIN
-    ID_HELP_ABOUT           "Displays program information, version number, and copyright."
-END
-
-#endif    // English (Australia) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif    // not APSTUDIO_INVOKED
-
diff --git a/rosapps/winfile/winfile.xml b/rosapps/winfile/winfile.xml
deleted file mode 100644 (file)
index c2a4502..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<module name="winfile" type="win32cui" installname="winfile.exe" warnings="true">\r
-       <include base="winfile">.</include>\r
-       <define name="__USE_W32API" />\r
-       <define name="_WIN32_IE">0x0501</define>\r
-       <define name="_WIN32_WINNT">0x0501</define>\r
-       <library>kernel32</library>\r
-       <library>user32</library>\r
-       <library>gdi32</library>\r
-       <library>advapi32</library>\r
-       <library>version</library>\r
-       <library>comdlg32</library>\r
-       <library>comctl32</library>\r
-       <file>about.c</file>\r
-       <file>childwnd.c</file>\r
-       <file>debug.c</file>\r
-       <file>dialogs.c</file>\r
-       <file>drivebar.c</file>\r
-       <file>entries.c</file>\r
-       <file>framewnd.c</file>\r
-       <file>listview.c</file>\r
-       <file>main.c</file>\r
-       <file>network.c</file>\r
-       <file>settings.c</file>\r
-       <file>shell.c</file>\r
-       <file>sort.c</file>\r
-       <file>splitpath.c</file>\r
-       <file>run.c</file>\r
-       <file>trace.c</file>\r
-       <file>treeview.c</file>\r
-       <file>utils.c</file>\r
-       <file>worker.c</file>\r
-</module>\r
diff --git a/rosapps/winfile/worker.c b/rosapps/winfile/worker.c
deleted file mode 100644 (file)
index cd32240..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  worker.c
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
-#include <windows.h>
-#include <commctrl.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <memory.h>
-#include <tchar.h>
-#include <process.h>
-#include <stdio.h>
-
-#include <windowsx.h>
-#include <process.h>
-#include <assert.h>
-#define ASSERT assert
-
-#include "main.h"
-#include "worker.h"
-#include "drivebar.h"
-
-
-////////////////////////////////////////////////////////////////////////////////
-// Global Variables:
-//
-
-static HANDLE hMonitorThreadEvent = NULL;      // When this event becomes signaled then we run the monitor thread
-
-void MonitorThreadProc(void *lpParameter);
-
-////////////////////////////////////////////////////////////////////////////////
-// Local module support methods
-//
-
-
-LRESULT CALLBACK MoveDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
-{
-    HWND    hLicenseEditWnd;
-    TCHAR   strLicense[0x1000];
-
-    switch (message) {
-    case WM_INITDIALOG:
-        hLicenseEditWnd = GetDlgItem(hDlg, IDC_LICENSE_EDIT);
-        LoadString(hInst, IDS_LICENSE, strLicense, 0x1000);
-        SetWindowText(hLicenseEditWnd, strLicense);
-        return TRUE;
-    case WM_COMMAND:
-        if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL)) {
-            EndDialog(hDlg, LOWORD(wParam));
-            return TRUE;
-        }
-        break;
-    }
-    return 0;
-}
-
-void StartWorkerThread(HWND hWnd)
-{
-    DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, (DLGPROC)MoveDialogWndProc);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-void MonitorThreadProc(void *lpParameter)
-{
-//     ULONG   OldProcessorUsage = 0;
-//     ULONG   OldProcessCount = 0;
-    HWND hWnd = (HWND)lpParameter;
-
-       // Create the event
-       hMonitorThreadEvent = CreateEvent(NULL, TRUE, TRUE, _T("Winfile Monitor Event"));
-
-       // If we couldn't create the event then exit the thread
-       if (!hMonitorThreadEvent)
-               return;
-
-       while (1) {
-               DWORD   dwWaitVal;
-
-               // Wait on the event
-               dwWaitVal = WaitForSingleObject(hMonitorThreadEvent, INFINITE);
-
-               // If the wait failed then the event object must have been
-               // closed and the task manager is exiting so exit this thread
-        if (dwWaitVal == WAIT_FAILED) {
-            // CloseHandle(hMonitorThreadEvent); // Should we close the event object handle or not ???
-            // hMonitorThreadEvent = NULL; // if we do then check what happens when main thread tries to delete it also....
-                       return;
-        }
-
-               if (dwWaitVal == WAIT_OBJECT_0) {
-                       // Reset our event
-                       ResetEvent(hMonitorThreadEvent);
-
-
-            ConfigureDriveBar(Globals.hDriveBar);
-
-#if 0
-                       TCHAR   text[260];
-                       if ((ULONG)SendMessage(hProcessPageListCtrl, LVM_GETITEMCOUNT, 0, 0) != PerfDataGetProcessCount())
-                               SendMessage(hProcessPageListCtrl, LVM_SETITEMCOUNT, PerfDataGetProcessCount(), /*LVSICF_NOINVALIDATEALL|*/LVSICF_NOSCROLL);
-                       if (IsWindowVisible(hProcessPage))
-                               InvalidateRect(hProcessPageListCtrl, NULL, FALSE);
-                       if (OldProcessorUsage != PerfDataGetProcessorUsage()) {
-                               OldProcessorUsage = PerfDataGetProcessorUsage();
-                               wsprintf(text, _T("CPU Usage: %3d%%"), OldProcessorUsage);
-                               SendMessage(hStatusWnd, SB_SETTEXT, 1, (LPARAM)text);
-                       }
-                       if (OldProcessCount != PerfDataGetProcessCount()) {
-                               OldProcessCount = PerfDataGetProcessCount();
-                               wsprintf(text, _T("Processes: %d"), OldProcessCount);
-                               SendMessage(hStatusWnd, SB_SETTEXT, 0, (LPARAM)text);
-                       }
-#endif
-               }
-       }
-}
-
-BOOL CreateMonitorThread(HWND hWnd)
-{
-    _beginthread(MonitorThreadProc, 0, hWnd);
-    return TRUE;
-}
-
-void SignalMonitorEvent(void)
-{
-    SetEvent(hMonitorThreadEvent);
-}
-
-BOOL DestryMonitorThread(void)
-{
-       CloseHandle(hMonitorThreadEvent);
-    hMonitorThreadEvent = NULL;
-    return TRUE;
-}
-
diff --git a/rosapps/winfile/worker.h b/rosapps/winfile/worker.h
deleted file mode 100644 (file)
index 98de0b3..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *  ReactOS winfile
- *
- *  worker.h
- *
- *  Copyright (C) 2002  Robert Dickenson <robd@reactos.org>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __WORKER_H__
-#define __WORKER_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-void StartWorkerThread(HWND hWnd);
-//void StopWorkerThread(HWND hWnd);
-
-BOOL CreateMonitorThread(HWND hWnd);
-void SignalMonitorEvent(void);
-BOOL DestryMonitorThread(void);
-
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif // __WORKER_H__