preparations for SDI code merge
authorMartin Fuchs <fuchs.martin@gmail.com>
Sat, 28 Feb 2004 23:33:15 +0000 (23:33 +0000)
committerMartin Fuchs <fuchs.martin@gmail.com>
Sat, 28 Feb 2004 23:33:15 +0000 (23:33 +0000)
svn path=/trunk/; revision=8462

reactos/subsys/system/explorer/desktop/desktop.cpp
reactos/subsys/system/explorer/shell/filechild.cpp
reactos/subsys/system/explorer/shell/filechild.h
reactos/subsys/system/explorer/shell/mainframe.cpp
reactos/subsys/system/explorer/shell/shellbrowser.cpp
reactos/subsys/system/explorer/shell/shellbrowser.h
reactos/subsys/system/explorer/shell/webchild.cpp
reactos/subsys/system/explorer/shell/webchild.h
reactos/subsys/system/explorer/utility/window.h

index b290109..b944718 100644 (file)
@@ -338,7 +338,7 @@ HWND DesktopWindow::Create()
        int height = GetSystemMetrics(SM_CYSCREEN);
 
        HWND hwndDesktop = Window::Create(WINDOW_CREATOR(DesktopWindow),
-                                       WS_EX_TOOLWINDOW, wcDesktop, TEXT("Program Manager"), WS_POPUP|WS_VISIBLE|WS_CLIPCHILDREN,
+                                       WS_EX_TOOLWINDOW, wcDesktop, TEXT("Program Manager"), WS_POPUP|WS_VISIBLE,      //|WS_CLIPCHILDREN for SDI frames
                                        0, 0, width, height, 0);
 
         // work around to display desktop bar in Wine
index b3e596f..e1ddb0d 100644 (file)
@@ -95,6 +95,35 @@ WebChildWndInfo::WebChildWndInfo(HWND hmdiclient, LPCTSTR url)
 }
 
 
+BOOL CALLBACK ExecuteDialog::WndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
+{
+       static struct ExecuteDialog* dlg;
+
+       switch(nmsg) {
+         case WM_INITDIALOG:
+               dlg = (struct ExecuteDialog*) lparam;
+               return 1;
+
+         case WM_COMMAND: {
+               int id = (int)wparam;
+
+               if (id == IDOK) {
+                       GetWindowText(GetDlgItem(hwnd, 201), dlg->cmd, MAX_PATH);
+                       dlg->cmdshow = Button_GetState(GetDlgItem(hwnd,214))&BST_CHECKED?
+                                                                                       SW_SHOWMINIMIZED: SW_SHOWNORMAL;
+                       EndDialog(hwnd, id);
+               } else if (id == IDCANCEL)
+                       EndDialog(hwnd, id);
+
+               return 1;}
+       }
+
+       return 0;
+}
+
+
+ // FileChildWindow
+
 FileChildWindow::FileChildWindow(HWND hwnd, const FileChildWndInfo& info)
  :     ChildWindow(hwnd, info)
 {
@@ -615,28 +644,9 @@ int FileChildWindow::Notify(int id, NMHDR* pnmh)
 }
 
 
-BOOL CALLBACK ExecuteDialog::WndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
+void FileChildWindow::jump_to(void* path)
 {
-       static struct ExecuteDialog* dlg;
-
-       switch(nmsg) {
-         case WM_INITDIALOG:
-               dlg = (struct ExecuteDialog*) lparam;
-               return 1;
-
-         case WM_COMMAND: {
-               int id = (int)wparam;
-
-               if (id == IDOK) {
-                       GetWindowText(GetDlgItem(hwnd, 201), dlg->cmd, MAX_PATH);
-                       dlg->cmdshow = Button_GetState(GetDlgItem(hwnd,214))&BST_CHECKED?
-                                                                                       SW_SHOWMINIMIZED: SW_SHOWNORMAL;
-                       EndDialog(hwnd, id);
-               } else if (id == IDCANCEL)
-                       EndDialog(hwnd, id);
 
-               return 1;}
-       }
+//@@
 
-       return 0;
 }
index d510606..f4d17f6 100644 (file)
@@ -100,6 +100,7 @@ protected:
        int             Notify(int id, NMHDR* pnmh);
 
        virtual void resize_children(int cx, int cy);
+       virtual void jump_to(void* path);
 
        void    scan_entry(Entry* entry, HWND hwnd);
 
index 3b7ae32..a532b62 100644 (file)
@@ -487,7 +487,7 @@ LRESULT MainFrame::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
                //      FileChildWindow::create(_hmdiclient, create_info);
                        return (LRESULT)ShellBrowserChild::create(create_info);
                }
-               break;}
+               return TRUE;}   // success
 
          case PM_GET_CONTROLWINDOW:
                if (wparam == FCW_STATUS)
index 3e4e23f..9052c50 100644 (file)
@@ -87,6 +87,26 @@ LRESULT ShellBrowserChild::Init(LPCREATESTRUCT pcs)
 //     _himlLarge = (HIMAGELIST)SHGetFileInfo(TEXT("C:\\"), 0, &sfi, sizeof(SHFILEINFO), SHGFI_SYSICONINDEX|SHGFI_LARGEICON);
 
 
+       const String& root_name = GetDesktopFolder().get_name(_create_info._root_shell_path, SHGDN_FORPARSING);
+
+       _root._drive_type = DRIVE_UNKNOWN;
+       lstrcpy(_root._volname, root_name);     // most of the time "Desktop"
+       _root._fs_flags = 0;
+       lstrcpy(_root._fs, TEXT("Desktop"));
+
+//@@   _root._entry->read_tree(shell_info._root_shell_path.get_folder(), info._shell_path, SORT_NAME/*_sortOrder*/);
+
+/*@todo
+       we should call read_tree() here to iterate through the hierarchy and open all folders from shell_info._root_shell_path to shell_info._shell_path
+       -> see FileChildWindow::FileChildWindow()
+*/
+       _root._entry = new ShellDirectory(GetDesktopFolder(), _create_info._root_shell_path, _hwnd);
+       _root._entry->read_directory();
+
+       /* already filled by ShellDirectory constructor
+       lstrcpy(_root._entry->_data.cFileName, TEXT("Desktop")); */
+
+
         // create explorer treeview
        if (_create_info._open_mode & OWM_EXPLORE)
                _left_hwnd = CreateWindowEx(0, WC_TREEVIEW, NULL,
@@ -112,26 +132,6 @@ void ShellBrowserChild::InitializeTree()
        TreeView_SetImageList(_left_hwnd, _himlSmall, TVSIL_NORMAL);
        TreeView_SetScrollTime(_left_hwnd, 100);
 
-       const String& root_name = GetDesktopFolder().get_name(_create_info._root_shell_path, SHGDN_FORPARSING);
-
-       _root._drive_type = DRIVE_UNKNOWN;
-       lstrcpy(_root._volname, root_name);     // most of the time "Desktop"
-       _root._fs_flags = 0;
-       lstrcpy(_root._fs, TEXT("Desktop"));
-
-//@@   _root._entry->read_tree(shell_info._root_shell_path.get_folder(), info._shell_path, SORT_NAME/*_sortOrder*/);
-
-/*@todo
-       we should call read_tree() here to iterate through the hierarchy and open all folders from shell_info._root_shell_path to shell_info._shell_path
-       -> see FileChildWindow::FileChildWindow()
-*/
-       _root._entry = new ShellDirectory(GetDesktopFolder(), _create_info._root_shell_path, _hwnd);
-       _root._entry->read_directory();
-
-       /* already filled by ShellDirectory constructor
-       lstrcpy(_root._entry->_data.cFileName, TEXT("Desktop")); */
-
-
        TV_ITEM tvItem;
 
        tvItem.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN;
@@ -460,7 +460,7 @@ HRESULT ShellBrowserChild::OnDefaultCommand(LPIDA pida)
 {
        CONTEXT("ShellBrowserChild::OnDefaultCommand()");
 
-       if (pida->cidl>=1) {
+       if (pida->cidl >= 1) {
                if (_left_hwnd) {       // explorer mode
                        if (_last_sel) {
                                ShellDirectory* parent = (ShellDirectory*)TreeView_GetItemData(_left_hwnd, _last_sel);
@@ -521,3 +521,11 @@ bool ShellBrowserChild::expand_folder(ShellDirectory* entry)
 
        return false;
 }
+
+
+void ShellBrowserChild::jump_to(void* path)
+{
+
+//@@
+
+}
index 4b8fec0..0df72a0 100644 (file)
@@ -125,6 +125,8 @@ protected:
        int             InsertSubitems(HTREEITEM hParentItem, Entry* entry, IShellFolder* pParentFolder);
        bool    InitDragDrop();
 
+       virtual void jump_to(void* path);
+
        HRESULT OnDefaultCommand(LPIDA pida);
 
        void    OnTreeGetDispInfo(int idCtrl, LPNMHDR pnmh);
index 959d033..e53acbe 100644 (file)
@@ -286,3 +286,11 @@ LRESULT WebChildWindow::WndProc(UINT message, WPARAM wparam, LPARAM lparam)
 
        return 0;
 }
+
+
+void WebChildWindow::jump_to(void* path)
+{
+
+//@@
+
+}
index 207b5b6..25e7dbb 100644 (file)
@@ -1075,4 +1075,6 @@ protected:
        auto_ptr<EventConnector> _connector;
 
        LRESULT WndProc(UINT message, WPARAM wparam, LPARAM lparam);
+
+       virtual void jump_to(void* path);
 };
index cad07b1..62edba0 100644 (file)
@@ -293,6 +293,7 @@ protected:
        LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam);
 
        virtual void resize_children(int cx, int cy);
+       virtual void jump_to(void* path) = 0;
 
 protected:
        MenuInfo*_menu_info;