ReactOS  0.4.14-dev-77-gd9e7c48
mainframe.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2003, 2004, 2005 Martin Fuchs
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 
20  //
21  // Explorer clone
22  //
23  // mainframe.cpp
24  //
25  // Martin Fuchs, 23.07.2003
26  //
27 
28 
29 #include <precomp.h>
30 
31 /* We can't include webchild.h here - otherwise MinGW produces errors like: "multiple definition of `QACONTAINERFLAGS'"
32 #include "webchild.h"
33 */
35 
36 #include "../dialogs/settings.h" // for MdiSdiDlg
37 
38 //#define _NO_REBAR
39 
41 {
42  HWND hFrame;
43 
44 #ifndef _NO_MDI
45  if (cmd._mdi)
46  hFrame = MDIMainFrame::Create();
47  else
48 #endif
49  hFrame = SDIMainFrame::Create();
50 
51  if (hFrame) {
52  HWND hwndOld = g_Globals._hMainWnd;
53 
54  g_Globals._hMainWnd = hFrame;
55 
56  if (hwndOld)
57  DestroyWindow(hwndOld);
58 
59  ShowWindow(hFrame, cmd._cmdShow);
60  UpdateWindow(hFrame);
61 
62  // Open the first child window after initializing the application
63  if (cmd.IsValidPath()) {
64  // We use the static s_path variable to store the path string in order
65  // to avoid accessing prematurely freed memory in the PostMessage handlers.
66  static String s_path = cmd._path;
67 
68  PostMessage(hFrame, PM_OPEN_WINDOW, cmd._flags, (LPARAM)(LPCTSTR)s_path);
69  } else
71  }
72 
73  return hFrame;
74 }
75 
76 
78 {
79  int cnt = 0;
80 
81  LPCITEMIDLIST parent_pidl = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[0]);
82  ShellFolder folder(parent_pidl);
83  LOG(FmtString(TEXT("MainFrameBase::OpenShellFolders(): parent_pidl=%s"), (LPCTSTR)FileSysShellPath(parent_pidl)));
84 
85  for(int i=pida->cidl; i>0; --i) {
86  LPCITEMIDLIST pidl = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[i]);
87 
88  SFGAOF attribs = SFGAO_FOLDER;
89  HRESULT hr = folder->GetAttributesOf(1, &pidl, &attribs);
90 
91  if (SUCCEEDED(hr))
92  if (attribs & SFGAO_FOLDER) {
93  try {
94  XMLPos explorer_options = g_Globals.get_cfg("general/explorer");
95 
96  bool mdi = XMLBool(explorer_options, "mdi", true);
97  bool separateFolders = XMLBool(explorer_options, "separate-folders", false);
98 
99  ShellPath pidl_abs = ShellPath(pidl).create_absolute_pidl(parent_pidl);
100  LOG(FmtString(TEXT("MainFrameBase::OpenShellFolders(): pidl_abs=%s"), (LPCTSTR)FileSysShellPath(pidl_abs)));
101 
102  if (hFrameWnd && (mdi || !separateFolders)) {
103  int flags = OWM_PIDL;
104 
105  if (separateFolders)
106  flags |= OWM_SEPARATE;
107 
109  ++cnt;
110  } else {
111  HWND hwnd;
112 #ifndef _NO_MDI
113  if (mdi)
114  hwnd = MDIMainFrame::Create(pidl_abs, 0);
115  else
116 #endif
117  hwnd = SDIMainFrame::Create(pidl_abs, 0);
118 
119  if (hwnd)
120  ++cnt;
121  }
122  } catch(COMException& e) {
124  }
125  }/*TEST
126  else { // !(attribs & SFGAO_FOLDER))
127  SHELLEXECUTEINFOA shexinfo;
128 
129  shexinfo.cbSize = sizeof(SHELLEXECUTEINFOA);
130  shexinfo.fMask = SEE_MASK_INVOKEIDLIST;
131  shexinfo.hwnd = NULL;
132  shexinfo.lpVerb = NULL;
133  shexinfo.lpFile = NULL;
134  shexinfo.lpParameters = NULL;
135  shexinfo.lpDirectory = NULL;
136  shexinfo.nShow = SW_NORMAL;
137  shexinfo.lpIDList = ILCombine(parent_pidl, pidl);
138 
139  if (ShellExecuteExA(&shexinfo))
140  ++cnt;
141 
142  ILFree((LPITEMIDLIST)shexinfo.lpIDList);
143  }*/
144  }
145 
146  return cnt;
147 }
148 
149 
151  : super(hwnd)
152 {
153  HDC hDC = GetDC(NULL);
154 #ifndef _NO_REBAR
155  //static TCHAR Title1[] = TEXT("Toolbar");
156  static TCHAR Title2[] = TEXT("Address :");
157 #endif
158 
159  if (hDC)
160  {
161  DWORD ilMask;
163  ReleaseDC(NULL, hDC);
164 
165  if (bpp <= 4)
166  ilMask = ILC_COLOR4;
167  else if (bpp <= 8)
168  ilMask = ILC_COLOR8;
169  else if (bpp <= 16)
170  ilMask = ILC_COLOR16;
171  else if (bpp <= 24)
172  ilMask = ILC_COLOR24;
173  else if (bpp <= 32)
174  ilMask = ILC_COLOR32;
175  else
176  ilMask = ILC_COLOR;
177 
178  ilMask |= ILC_MASK;
179 
181  }
182 
185 
187 
189 
190 
191  TBBUTTON toolbarBtns[] = {
192 #ifdef _NO_REBAR
193  {0, 0, 0, BTNS_SEP, {0, 0}, 0, 0},
194 #endif
195  {7, ID_GO_BACK, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0},
196  {8, ID_GO_FORWARD, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0},
197  {9, ID_GO_UP, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0},
198  {10, ID_GO_HOME, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0},
199  {11, ID_GO_SEARCH, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0},
200  {12, ID_REFRESH, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0},
201  {13, ID_STOP, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0}
202  };
203 
205 #ifndef _NO_REBAR
207 #endif
209  toolbarBtns, sizeof(toolbarBtns)/sizeof(TBBUTTON),
210  16, 16, 16, 16, sizeof(TBBUTTON));
211 
213 
214 
215  // address bar
217  WC_COMBOBOX,
218  TEXT("Address"),
221  0, 0, 0, 0,
222  hwnd,
225  0);
226 
229 
230 
233 
236  -1, -1, 200, 0, _hwnd, (HMENU)IDW_SIDEBAR, g_Globals._hInstance, 0);
237 
239 
241 
242 
243  // create rebar window to manage toolbar and drivebar
244 #ifndef _NO_REBAR
247  NULL,
250  0, 0, 0, 0,
251  _hwnd,
252  NULL,
254  0);
255 
256  int btn_hgt = HIWORD(SendMessage(_htoolbar, TB_GETBUTTONSIZE, 0, 0));
257 
258  REBARBANDINFO rbBand;
259 
260  rbBand.cbSize = sizeof(REBARBANDINFO);
263 
264  rbBand.cxMinChild = 0;
265  rbBand.cyMinChild = 0;
266  rbBand.cyChild = 0;
267  rbBand.cyMaxChild = 0;
268  rbBand.cyIntegral = btn_hgt;
269 
270  rbBand.lpText = NULL;//Title1
271  rbBand.hwndChild = _htoolbar;
272  rbBand.cxMinChild = 0;
273  rbBand.cyMinChild = btn_hgt;
274  rbBand.cx = 284;
276 
277  rbBand.fStyle &= ~RBBS_HIDETITLE;
278  rbBand.fStyle |= RBBS_BREAK;
279  rbBand.lpText = Title2;
280  rbBand.hwndChild = _haddrcombo;
281  rbBand.cxMinChild = 0;
282  rbBand.cyMinChild = btn_hgt;
283  rbBand.cx = 400;
285 #endif
286 }
287 
288 
290 {
293 
294  // don't exit desktop when closing file manager window
296  if (g_Globals._hMainWnd == _hwnd) // don't quit when switching between MDI and SDI mode
297  PostQuitMessage(0);
298 }
299 
300 
302 {
303  LRESULT res;
304 
305  if (ProcessMessage(nmsg, wparam, lparam, &res))
306  return res;
307  else
308  return super::WndProc(nmsg, wparam, lparam);
309 }
310 
312 {
313  switch(nmsg) {
314  case PM_TRANSLATE_MSG:
315  *pres = TranslateMsg((MSG*)lparam);
316  return true;
317 
318  case WM_SHOWWINDOW:
319  if (wparam) { // trigger child resizing after window creation - now we can succesfully call IsWindowVisible()
323  }
324  return false; // goto def;
325 
326  case WM_CLOSE:
327  DestroyWindow(_hwnd);
328  g_Globals._hMainWnd = 0;
329  break;
330 
331  case WM_DESTROY:
332  break;
333 
334  case WM_SIZE: {
337  break;} // do not pass message to DefFrameProc
338 
339  case WM_GETMINMAXINFO: {
341 
342  lpmmi->ptMaxTrackSize.x <<= 1;/*2*GetSystemMetrics(SM_CXSCREEN) / SM_CXVIRTUALSCREEN */
343  lpmmi->ptMaxTrackSize.y <<= 1;/*2*GetSystemMetrics(SM_CYSCREEN) / SM_CYVIRTUALSCREEN */
344  break;}
345 
346  case PM_FRM_CALC_CLIENT:
348  *pres = TRUE;
349  return true;
350 
351  case PM_FRM_GET_MENUINFO:
352  *pres = (LPARAM)&_menu_info;
353  return true;
354 
356  if (wparam == FCW_STATUS) {
357  *pres = (LRESULT)(HWND)_hstatusbar;
358  return true;
359  }
360  break;
361 
362  case PM_SETSTATUSTEXT:
364  break;
365 
366  case WM_SYSCOLORCHANGE:
369  break;
370 
371  default:
372  return false;
373  }
374 
375  *pres = 0;
376  return true;
377 }
378 
380 {
381  if (TranslateAccelerator(_hwnd, _hAccel, pmsg))
382  return TRUE;
383 
384  return FALSE;
385 }
386 
387 
388 int MainFrameBase::Command(int id, int code)
389 {
390  CONTEXT("MainFrameBase::Command()");
391 
392  switch(id) {
393  case ID_FILE_EXIT:
394  SendMessage(_hwnd, WM_CLOSE, 0, 0);
395  break;
396 
397  case ID_VIEW_TOOL_BAR:
398  toggle_child(_hwnd, id, _htoolbar, 0);
399  break;
400 
401  case ID_VIEW_STATUSBAR:
402  toggle_child(_hwnd, id, _hstatusbar);
403  break;
404 
405  case ID_VIEW_SIDE_BAR:
406  // lazy initialization
408  FillBookmarks();
409 
410  toggle_child(_hwnd, id, _hsidebar);
411  break;
412 
413  case ID_EXECUTE: {
414  ExecuteDialog dlg = {{0}, 0};
415 
417  CONTEXT("ID_EXECUTE - ShellExecute()");
418 
419  HINSTANCE hinst = ShellExecute(_hwnd, NULL/*operation*/, dlg.cmd/*file*/, NULL/*parameters*/, NULL/*dir*/, dlg.cmdshow);
420 
421  if ((INT_PTR)hinst <= 32)
422  display_error(_hwnd, GetLastError());
423  }
424  break;}
425 
426  case ID_HELP:
427  WinHelp(_hwnd, TEXT("explorer")/*file explorer.hlp*/, HELP_INDEX, 0);
428  break;
429 
430  case ID_VIEW_FULLSCREEN:
432  break;
433 
434  case ID_TOOLS_OPTIONS:
436  break;
437 
438  case ID_ABOUT_WINDOWS:
439  ShellAbout(_hwnd, ResString(IDS_TITLE), NULL, 0);
440  break;
441 
442  case ID_ABOUT_EXPLORER:
443  explorer_about(_hwnd);
444  break;
445 
446  case ID_EXPLORER_FAQ:
447  launch_file(_hwnd, TEXT("http://www.sky.franken.de/explorer/"), SW_SHOW);
448  break;
449 
450  default:
451  return 1; // no command handlers in Window::Command()
452  }
453 
454  return 0;
455 }
456 
457 int MainFrameBase::Notify(int id, NMHDR* pnmh)
458 {
459  switch(pnmh->code) {
460  // resize children windows when the rebar size changes
461 
462  case RBN_AUTOSIZE:
464  break;
465 
466  case TVN_GETINFOTIP: {
467  NMTVGETINFOTIP* pnmgit = (NMTVGETINFOTIP*)pnmh;
468 
469  if (pnmgit->lParam) {
470  const BookmarkNode& node = *(BookmarkNode*)pnmgit->lParam;
471 
472  if (node._type == BookmarkNode::BMNT_FOLDER) {
473  // display tooltips for bookmark folders
474  if (!node._pfolder->_description.empty())
475  lstrcpyn(pnmgit->pszText, node._pfolder->_description.c_str(), pnmgit->cchTextMax);
476  } else if (node._type == BookmarkNode::BMNT_BOOKMARK) {
477  // display tooltips for bookmark folders
478  String txt = node._pbookmark->_description;
479 
480  if (!node._pbookmark->_url.empty()) {
481  if (!txt.empty())
482  txt += TEXT(" - ");
483 
484  txt += node._pbookmark->_url;
485  }
486 
487  lstrcpyn(pnmgit->pszText, txt.c_str(), pnmgit->cchTextMax);
488  }
489  }
490  break;}
491 
492  case NM_DBLCLK: {
495 
496  if (lparam) {
497  const BookmarkNode& node = *(BookmarkNode*)lparam;
498 
499  if (node._type == BookmarkNode::BMNT_BOOKMARK) {
501 
502  go_to(node._pbookmark->_url, new_window);
503  }
504  }
505  break;}
506  }
507 
508  return 0;
509 }
510 
511 
513 {
514  if (cy <= 0)
515  return; // avoid resizing children when receiving RBN_AUTOSIZE while getting minimized
516 
517  RECT rect = {0, 0, cx, cy};
518 
519  if (_hwndrebar) {
521  rect.top += height;
522  rect.top += 5;
523 
525  } else {
526  if (IsWindowVisible(_htoolbar)) {
527  SendMessage(_htoolbar, WM_SIZE, 0, 0);
528  WindowRect rt(_htoolbar);
529  rect.top = rt.bottom;
530  // rect.bottom -= rt.bottom;
531  }
532  }
533 
535  int parts[] = {300, 500};
536 
539  ClientRect rt(_hstatusbar);
540  rect.bottom -= rt.bottom;
541  }
542 
543  if (IsWindowVisible(_hsidebar)) {
544  WindowRect rt(_hsidebar);
545  rect.left += rt.right-rt.left;
546 
547  SetWindowPos(_hsidebar, 0, -1, rect.top-1, rt.right-rt.left, rect.bottom-rect.top+1, SWP_NOACTIVATE|SWP_NOZORDER);
548  }
549 }
550 
552 {
553  ClientRect rect(_hwnd);
554 
555  resize_frame(rect.right, rect.bottom);
556 }
557 
559 {
560  if (!IsIconic(_hwnd))
561  GetClientRect(_hwnd, prect);
562  else {
563  WINDOWPLACEMENT wp;
564 
565  GetWindowPlacement(_hwnd, &wp);
566 
567  prect->left = prect->top = 0;
573  }
574 
575  if (IsWindowVisible(_htoolbar)) {
576  ClientRect rt(_htoolbar);
577  prect->top += rt.bottom+2;
578  }
579 
581  ClientRect rt(_hstatusbar);
582  prect->bottom -= rt.bottom;
583  }
584 }
585 
587 {
588  RECT rt;
589 
590  if ((_fullscreen._mode=!_fullscreen._mode)) {
591  GetWindowRect(_hwnd, &_fullscreen._orgPos);
592  _fullscreen._wasZoomed = IsZoomed(_hwnd);
593 
594  Frame_CalcFrameClient(_hwnd, &rt);
595  ClientToScreen(_hwnd, (LPPOINT)&rt.left);
596  ClientToScreen(_hwnd, (LPPOINT)&rt.right);
597 
598  rt.left = _fullscreen._orgPos.left-rt.left;
599  rt.top = _fullscreen._orgPos.top-rt.top;
600  rt.right = GetSystemMetrics(SM_CXSCREEN)+_fullscreen._orgPos.right-rt.right;
601  rt.bottom = GetSystemMetrics(SM_CYSCREEN)+_fullscreen._orgPos.bottom-rt.bottom;
602 
603  MoveWindow(_hwnd, rt.left, rt.top, rt.right-rt.left, rt.bottom-rt.top, TRUE);
604  } else {
605  MoveWindow(_hwnd, _fullscreen._orgPos.left, _fullscreen._orgPos.top,
606  _fullscreen._orgPos.right-_fullscreen._orgPos.left,
607  _fullscreen._orgPos.bottom-_fullscreen._orgPos.top, TRUE);
608 
609  if (_fullscreen._wasZoomed)
610  ShowWindow(_hwnd, WS_MAXIMIZE);
611  }
612 
613  return _fullscreen._mode;
614 }
615 
617 {
618  RECT rt, pos;
619  GetWindowRect(_hwnd, &pos);
620 
621  Frame_CalcFrameClient(_hwnd, &rt);
622  ClientToScreen(_hwnd, (LPPOINT)&rt.left);
623  ClientToScreen(_hwnd, (LPPOINT)&rt.right);
624 
625  rt.left = pos.left-rt.left;
626  rt.top = pos.top-rt.top;
627  rt.right = GetSystemMetrics(SM_CXSCREEN)+pos.right-rt.right;
628  rt.bottom = GetSystemMetrics(SM_CYSCREEN)+pos.bottom-rt.bottom;
629 
630  MoveWindow(_hwnd, rt.left, rt.top, rt.right-rt.left, rt.bottom-rt.top, TRUE);
631 }
632 
633 
634 void MainFrameBase::toggle_child(HWND hwnd, UINT cmd, HWND hchild, int band_idx)
635 {
636  BOOL vis = IsWindowVisible(hchild);
637 
639 
640  if (band_idx != -1)
641  SendMessage(_hwndrebar, RB_SHOWBAND, band_idx, !vis);
642  else
643  ShowWindow(hchild, vis? SW_HIDE: SW_SHOW);
644 
645  if (_fullscreen._mode)
646  fullscreen_move();
647 
649 }
650 
652 {
653  HiddenWindow hide(_hsidebar);
654  WindowCanvas canvas(_hwnd);
655 
657 
663 
664  TV_INSERTSTRUCT tvi;
665 
666  tvi.hParent = TVI_ROOT;
667  tvi.hInsertAfter = TVI_LAST;
668  tvi.item.mask = TVIF_TEXT|TVIF_IMAGE|TVIF_SELECTEDIMAGE;
669  ResString sFavorites(IDS_FAVORITES);
670  tvi.item.pszText = sFavorites.str();
671  tvi.item.iSelectedImage = tvi.item.iImage = 0;
672 
673  HTREEITEM hitem_bookmarks = TreeView_InsertItem(_hsidebar, &tvi);
674 
675  g_Globals._favorites.fill_tree(_hsidebar, hitem_bookmarks, _himl, canvas);
676 
677  TreeView_Expand(_hsidebar, hitem_bookmarks, TVE_EXPAND);
678 }
679 
680 
682 {
684 
685  return false;
686 }
687 
688 
689 #ifndef _NO_MDI
690 
692  : super(hwnd)
693 {
694  TBBUTTON mdiBtns[] = {
695  {0, 0, 0, BTNS_SEP, {0, 0}, 0, 0},
696  {0, ID_WINDOW_NEW, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0},
697  {1, ID_WINDOW_CASCADE, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0},
698  {2, ID_WINDOW_TILE_HORZ, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0},
699  {3, ID_WINDOW_TILE_VERT, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0}
700  };
701 
702  SendMessage(_htoolbar, TB_ADDBUTTONS, sizeof(mdiBtns)/sizeof(TBBUTTON), (LPARAM)&mdiBtns);
703 
704  CLIENTCREATESTRUCT ccs;
705 
708 
711  0, 0, 0, 0,
712  hwnd, 0, g_Globals._hInstance, &ccs);
713 
714  TBBUTTON extraBtns = {0, 0, TBSTATE_ENABLED, BTNS_SEP, {0, 0}, 0, 0};
715 
716 #ifndef _NO_REBAR
721  16, 16, 16, 16, sizeof(TBBUTTON));
722 #else
725  IDW_EXTRABAR, 2, g_Globals._hInstance, IDB_DRIVEBAR, &extraBtns, 1,
726  16, 13, 16, 13, sizeof(TBBUTTON));
727 #endif
728 
730 
731 
732  extraBtns.fsStyle = BTNS_BUTTON;
733 
734 #ifdef __WINE__
735  // insert unix file system button
736  extraBtns.iString = SendMessage(_hextrabar, TB_ADDSTRING, 0, (LPARAM)TEXT("/\0"));
737  extraBtns.idCommand = ID_DRIVE_UNIX_FS;
739 #endif
740 
741  // insert explorer window button
742  extraBtns.iString = SendMessage(_hextrabar, TB_ADDSTRING, 0, (LPARAM)TEXT("Explore\0"));
743  extraBtns.idCommand = ID_DRIVE_DESKTOP;
745 
746  // insert shell namespace button
747  extraBtns.iString = SendMessage(_hextrabar, TB_ADDSTRING, 0, (LPARAM)TEXT("Shell\0"));
748  extraBtns.idCommand = ID_DRIVE_SHELL_NS;
749  extraBtns.iBitmap = 6;
751 
752  // insert web control button
753  extraBtns.iString = SendMessage(_hextrabar, TB_ADDSTRING, 0, (LPARAM)TEXT("Web\0"));
754  extraBtns.idCommand = ID_WEB_WINDOW;
755  extraBtns.iBitmap = 7;
757 
758  if ((HIWORD(GetVersion())>>14) == W_VER_NT) {
759  // insert NT object namespace button
760  extraBtns.iString = SendMessage(_hextrabar, TB_ADDSTRING, 0, (LPARAM)TEXT("NT Obj\0"));
761  extraBtns.idCommand = ID_DRIVE_NTOBJ_NS;
762  extraBtns.iBitmap = 8;
764  }
765 
766  // insert Registry button
767  extraBtns.iString = SendMessage(_hextrabar, TB_ADDSTRING, 0, (LPARAM)TEXT("Reg.\0"));
768  extraBtns.idCommand = ID_DRIVE_REGISTRY;
769  extraBtns.iBitmap = 9;
771 
772 #ifdef _DEBUG
773  // insert FAT direct file system access button
774  extraBtns.iString = SendMessage(_hextrabar, TB_ADDSTRING, 0, (LPARAM)TEXT("FAT\0"));
775  extraBtns.idCommand = ID_DRIVE_FAT;
776  extraBtns.iBitmap = 10;
778 #endif
779 
780 
781  TBBUTTON drivebarBtn = {0, 0, TBSTATE_ENABLED, BTNS_SEP, {0, 0}, 0, 0};
782 #ifndef _NO_WIN_FS
783  PTSTR p;
784 
785 #ifndef _NO_REBAR
790  16, 16, 16, 16, sizeof(TBBUTTON));
791 #else
794  IDW_DRIVEBAR, 2, g_Globals._hInstance, IDB_DRIVEBAR, &drivebarBtn, 1,
795  16, 13, 16, 13, sizeof(TBBUTTON));
796 #endif
797 #endif
798 
800 
801 
802 #ifndef _NO_WIN_FS
804 
805  // register windows drive root strings
807 
808  drivebarBtn.fsStyle = BTNS_BUTTON;
809  drivebarBtn.idCommand = ID_DRIVE_FIRST;
810 
811  for(p=_drives; *p; ) {
812  switch(GetDriveType(p)) {
813  case DRIVE_REMOVABLE: drivebarBtn.iBitmap = 1; break;
814  case DRIVE_CDROM: drivebarBtn.iBitmap = 3; break;
815  case DRIVE_REMOTE: drivebarBtn.iBitmap = 4; break;
816  case DRIVE_RAMDISK: drivebarBtn.iBitmap = 5; break;
817  default:/*DRIVE_FIXED*/ drivebarBtn.iBitmap = 2;
818  }
819 
821  ++drivebarBtn.idCommand;
822  ++drivebarBtn.iString;
823 
824  while(*p++);
825  }
826 #endif
827 
828 
829 #ifndef _NO_REBAR
830  int btn_hgt = HIWORD(SendMessage(_htoolbar, TB_GETBUTTONSIZE, 0, 0));
831 
832  REBARBANDINFO rbBand;
833 
834  rbBand.cbSize = sizeof(REBARBANDINFO);
836 #ifndef RBBS_HIDETITLE // missing in MinGW headers as of 25.02.2004
837 #define RBBS_HIDETITLE 0x400
838 #endif
840 
841  TCHAR ExtrasBand[] = _T("Extras");
842  rbBand.lpText = ExtrasBand;
843  rbBand.hwndChild = _hextrabar;
844  rbBand.cxMinChild = 0;
845  rbBand.cyMinChild = btn_hgt;
846  rbBand.cx = 284;
848 
849 #ifndef _NO_WIN_FS
850  rbBand.fStyle |= RBBS_BREAK;
851  TCHAR DrivesBand[] = _T("Drives");
852  rbBand.lpText = DrivesBand;
853  rbBand.hwndChild = _hdrivebar;
854  rbBand.cxMinChild = 0;
855  rbBand.cyMinChild = btn_hgt;
856  rbBand.cx = 400;
858 
859  // hide the drivebar by default
861 #endif
862 #endif
863 }
864 
865 
867 {
869 
873  0/*hwndDesktop*/, hMenuFrame);
874 }
875 
877 {
878  HWND hFrame = Create();
879  if (!hFrame)
880  return 0;
881 
882  ShowWindow(hFrame, SW_SHOW);
883 
884  MDIMainFrame* pMainFrame = GET_WINDOW(MDIMainFrame, hFrame);
885 
886  if (pMainFrame)
887  pMainFrame->CreateChild(path, mode);
888 
889  return hFrame;
890 }
891 
893 {
894  HWND hFrame = Create();
895  if (!hFrame)
896  return 0;
897 
898  ShowWindow(hFrame, SW_SHOW);
899 
900  MDIMainFrame* pMainFrame = GET_WINDOW(MDIMainFrame, hFrame);
901 
902  if (pMainFrame)
903  pMainFrame->CreateChild(pidl, mode);
904 
905  return hFrame;
906 }
907 
908 
910 {
911  return reinterpret_cast<ChildWindow*>(SendMessage(_hwnd, PM_OPEN_WINDOW, mode, (LPARAM)path));
912 }
913 
915 {
916  return reinterpret_cast<ChildWindow*>(SendMessage(_hwnd, PM_OPEN_WINDOW, mode|OWM_PIDL, (LPARAM)pidl));
917 }
918 
919 
921 {
923  return TRUE;
924 
925  return super::TranslateMsg(pmsg);
926 }
927 
929 {
930  switch(nmsg) {
931  case PM_OPEN_WINDOW: {
932  CONTEXT("MDIMainFrame PM_OPEN_WINDOW");
933 
935  LPCTSTR path;
936  ShellPath shell_path = DesktopFolderPath();
937 
938  if (lparam) {
939  if (wparam & OWM_PIDL) {
940  // take over PIDL from lparam
941  shell_path.assign((LPCITEMIDLIST)lparam); // create as "rooted" window
942  FileSysShellPath fsp(shell_path);
943  path = fsp;
944 
945  if (path) {
946  LOG(FmtString(TEXT("MDIMainFrame PM_OPEN_WINDOW: path=%s"), path));
947  lstrcpy(buffer, path);
948  path = buffer;
949  }
950  } else {
951  // take over path from lparam
952  path = (LPCTSTR)lparam;
953  shell_path = path; // create as "rooted" window
954  }
955  } else {
958  *buffer = '\0';
959 
960  path = buffer;
961  }
962 
963  if (path && _tcsstr(path, TEXT("://"))) { // "http://...", "ftp://", ...
964  OBJ_CONTEXT("create WebChild window", path);
965 
967  } else {
968  OBJ_CONTEXT("create ShellChildWndInfo", path);
969 
970  // Shell Namespace as default view
971  ShellChildWndInfo create_info(_hmdiclient, path, shell_path);
972 
973  if (wparam & OWM_ROOTED)
974  create_info._root_shell_path = shell_path;
975  else
976  create_info._root_shell_path = DesktopFolderPath(); //SpecialFolderPath(CSIDL_DRIVES, _hwnd);
977 
979  create_info._pos.rcNormalPosition.left = CW_USEDEFAULT;
980  create_info._pos.rcNormalPosition.top = CW_USEDEFAULT;
983 
984  create_info._open_mode = wparam;
985 
986  // FileChildWindow::create(_hmdiclient, create_info);
987  return (LRESULT)MDIShellBrowserChild::create(create_info);
988  }
989  return TRUE;} // success
990 
991  case WM_SYSCOLORCHANGE: {
992  LRESULT res;
993  HWND hChild;
994 
995  /* Forward WM_SYSCOLORCHANGE to common controls */
998 
1001 
1003  break; }
1004 
1005  default: {
1006  LRESULT res;
1007 
1008  if (super::ProcessMessage(nmsg, wparam, lparam, &res))
1009  return res;
1010  else
1011  return DefFrameProc(_hwnd, _hmdiclient, nmsg, wparam, lparam);
1012  }
1013  }
1014 
1015  return 0;
1016 }
1017 
1018 int MDIMainFrame::Command(int id, int code)
1019 {
1020  CONTEXT("MDIMainFrame::Command()");
1021 
1022  HWND hwndClient = (HWND) SendMessage(_hmdiclient, WM_MDIGETACTIVE, 0, 0);
1023 
1024  if (hwndClient)
1025  if (SendMessage(hwndClient, PM_DISPATCH_COMMAND, MAKELONG(id,code), 0))
1026  return 0;
1027 
1028 #ifndef _NO_WIN_FS
1029  if (id>=ID_DRIVE_FIRST && id<=ID_DRIVE_FIRST+0xFF) {
1030  TCHAR drv[_MAX_DRIVE], path[MAX_PATH];
1031  LPCTSTR root = _drives;
1032 
1033  for(int i=id-ID_DRIVE_FIRST; i--; root++)
1034  while(*root)
1035  ++root;
1036 
1038  return 0;
1039 
1040  _tsplitpath_s(root, drv, COUNTOF(drv), NULL, 0, NULL, 0, NULL, 0);
1041 
1042  if (!SetCurrentDirectory(drv)) {
1043  display_error(_hwnd, GetLastError());
1044  return 0;
1045  }
1046 
1048 
1050 
1051  return 1;
1052  }
1053 #endif
1054 
1055  switch(id) {
1056  case ID_WINDOW_NEW: {
1057  TCHAR path[MAX_PATH];
1058 
1060 
1062  break;}
1063 
1064  case ID_WINDOW_CASCADE:
1066  break;
1067 
1068  case ID_WINDOW_TILE_HORZ:
1070  break;
1071 
1072  case ID_WINDOW_TILE_VERT:
1074  break;
1075 
1076  case ID_WINDOW_ARRANGE:
1078  break;
1079 
1080  case ID_VIEW_EXTRA_BAR:
1081  toggle_child(_hwnd, id, _hextrabar, 1);
1082  break;
1083 
1084 #ifndef _NO_WIN_FS
1085  case ID_VIEW_DRIVE_BAR:
1086  toggle_child(_hwnd, id, _hdrivebar, 2);
1087  break;
1088 #endif
1089 
1090 #ifdef __WINE__
1091  case ID_DRIVE_UNIX_FS: {
1092  TCHAR path[MAX_PATH];
1094 
1095  getcwd(path, COUNTOF(path));
1096 
1097  if (activate_child_window(TEXT("unixfs")))
1098  break;
1099 
1101  break;}
1102 #endif
1103 
1104  case ID_DRIVE_DESKTOP: {
1105  TCHAR path[MAX_PATH];
1106 
1107  if (activate_child_window(TEXT("Desktop")))
1108  break;
1109 
1111 
1113  break;}
1114 
1115  case ID_DRIVE_SHELL_NS: {
1116  TCHAR path[MAX_PATH];
1118 
1119  if (activate_child_window(TEXT("Shell")))
1120  break;
1121 
1123  break;}
1124 
1125  case ID_DRIVE_NTOBJ_NS: {
1126  if (activate_child_window(TEXT("NTOBJ")))
1127  break;
1128 
1130  break;}
1131 
1132  case ID_DRIVE_REGISTRY: {
1133  if (activate_child_window(TEXT("Registry")))
1134  break;
1135 
1137  break;}
1138 
1139  case ID_DRIVE_FAT: {
1140 
1142 
1143  if (activate_child_window(TEXT("FAT")))
1144  break;
1145 
1147  break;}
1148 
1149  case ID_WEB_WINDOW:
1150 #ifdef _DEBUG
1151  create_webchildwindow(WebChildWndInfo(_hmdiclient, TEXT("http://localhost")));
1152 #else
1153  create_webchildwindow(WebChildWndInfo(_hmdiclient, TEXT("http://www.reactos.org")));
1154 #endif
1155  break;
1156 
1157  case ID_EXPLORER_FAQ:
1158  create_webchildwindow(WebChildWndInfo(_hmdiclient, TEXT("http://www.sky.franken.de/explorer/")));
1159  break;
1160 
1161  case ID_VIEW_SDI:
1163  break;
1164 
1166 
1167  default:
1168  if (super::Command(id, code) == 0)
1169  return 0;
1170  else
1171  return DefFrameProc(_hwnd, _hmdiclient, WM_COMMAND, MAKELONG(id,code), 0);
1172  }
1173 
1174  return 0;
1175 }
1176 
1177 
1179 {
1181 
1182 #ifndef _NO_WIN_FS
1183  if (IsWindowVisible(_hdrivebar)) {
1184  ClientRect rt(_hdrivebar);
1185  prect->top += rt.bottom+2;
1186  }
1187 #endif
1188 }
1189 
1191 {
1192  if (cy <= 0)
1193  return; // avoid resizing children when receiving RBN_AUTOSIZE while getting minimized
1194 
1195  RECT rect = {0, 0, cx, cy};
1196 
1197  if (_hwndrebar) {
1199  rect.top += height;
1200  rect.top += 5;
1201  } else {
1202  if (IsWindowVisible(_htoolbar)) {
1203  SendMessage(_htoolbar, WM_SIZE, 0, 0);
1204  WindowRect rt(_htoolbar);
1205  rect.top = rt.bottom;
1206  // rect.bottom -= rt.bottom;
1207  }
1208 
1209  if (IsWindowVisible(_hextrabar)) {
1210  SendMessage(_hextrabar, WM_SIZE, 0, 0);
1211  WindowRect rt(_hextrabar);
1212  int new_top = --rect.top + rt.bottom;
1213  MoveWindow(_hextrabar, 0, rect.top, rt.right, new_top, TRUE);
1214  rect.top = new_top;
1215  // rect.bottom -= rt.bottom;
1216  }
1217 
1218 #ifndef _NO_WIN_FS
1219  if (IsWindowVisible(_hdrivebar)) {
1220  SendMessage(_hdrivebar, WM_SIZE, 0, 0);
1221  WindowRect rt(_hdrivebar);
1222  int new_top = --rect.top + rt.bottom;
1223  MoveWindow(_hdrivebar, 0, rect.top, rt.right, new_top, TRUE);
1224  rect.top = new_top;
1225  // rect.bottom -= rt.bottom;
1226  }
1227 #endif
1228  }
1229 
1231  int parts[] = {300, 500};
1232 
1234  SendMessage(_hstatusbar, SB_SETPARTS, 2, (LPARAM)&parts);
1235  ClientRect rt(_hstatusbar);
1236  rect.bottom -= rt.bottom;
1237  }
1238 
1239  if (IsWindowVisible(_hsidebar)) {
1240  WindowRect rt(_hsidebar);
1241  rect.left += rt.right-rt.left;
1242 
1243  SetWindowPos(_hsidebar, 0, -1, rect.top-1, rt.right-rt.left, rect.bottom-rect.top+1, SWP_NOACTIVATE|SWP_NOZORDER);
1244  }
1245 
1246  MoveWindow(_hmdiclient, rect.left-1, rect.top-1, rect.right-rect.left+1, rect.bottom-rect.top+1, TRUE);
1247 }
1248 
1250 {
1251  TCHAR drv1[_MAX_DRIVE], drv2[_MAX_DRIVE];
1252  HWND child_wnd;
1253 
1254  _tsplitpath_s(path, drv1, COUNTOF(drv1), NULL, 0, NULL, 0, NULL, 0);
1255 
1256  // search for a already open window for the same drive
1257  for(child_wnd=GetNextWindow(_hmdiclient,GW_CHILD); child_wnd; child_wnd=GetNextWindow(child_wnd, GW_HWNDNEXT)) {
1259 
1260  if (child) {
1261  _tsplitpath_s(child->get_root()._path, drv2, COUNTOF(drv2), NULL, 0, NULL, 0, NULL, 0);
1262 
1263  if (!lstrcmpi(drv2, drv1)) {
1264  SendMessage(_hmdiclient, WM_MDIACTIVATE, (WPARAM)child_wnd, 0);
1265 
1266  if (IsMinimized(child_wnd))
1267  ShowWindow(child_wnd, SW_SHOWNORMAL);
1268 
1269  return true;
1270  }
1271  }
1272  }
1273 
1274  return false;
1275 }
1276 
1278 {
1279  HWND child_wnd;
1280 
1281  // search for a already open window of the given file system name
1282  for(child_wnd=GetNextWindow(_hmdiclient,GW_CHILD); child_wnd; child_wnd=GetNextWindow(child_wnd, GW_HWNDNEXT)) {
1284 
1285  if (child) {
1286  if (!lstrcmpi(child->get_root()._fs, filesys)) {
1287  SendMessage(_hmdiclient, WM_MDIACTIVATE, (WPARAM)child_wnd, 0);
1288 
1289  if (IsMinimized(child_wnd))
1290  ShowWindow(child_wnd, SW_SHOWNORMAL);
1291 
1292  return true;
1293  }
1294  } else {
1295  ShellBrowser* shell_child = (ShellBrowser*) SendMessage(child_wnd, PM_GET_SHELLBROWSER_PTR, 0, 0);
1296 
1297  if (shell_child) {
1298  if (!lstrcmpi(shell_child->get_root()._fs, filesys)) {
1299  SendMessage(_hmdiclient, WM_MDIACTIVATE, (WPARAM)child_wnd, 0);
1300 
1301  if (IsMinimized(child_wnd))
1302  ShowWindow(child_wnd, SW_SHOWNORMAL);
1303 
1304  return true;
1305  }
1306  }
1307  }
1308  }
1309 
1310  return false;
1311 }
1312 
1314 {
1315  if (!new_window) {
1316  HWND hwndClient = (HWND) SendMessage(_hmdiclient, WM_MDIGETACTIVE, 0, 0);
1317 
1318  if (hwndClient)
1319  if (SendMessage(hwndClient, PM_JUMP_TO_URL, 0, (LPARAM)url))
1320  return true;
1321  }
1322 
1323  if (CreateChild(url))
1324  return true;
1325 
1326  return super::go_to(url, new_window);
1327 }
1328 
1329 #endif // _NO_MDI
1330 
1331 
1333  : super(hwnd)
1334 {
1337 
1338  /* wait for PM_OPEN_WINDOW message before creating a shell view
1339  update_shell_browser();*/
1340 }
1341 
1343 {
1345 
1349  0/*hwndDesktop*/, hMenuFrame);
1350 }
1351 
1353 {
1354  HWND hFrame = Create();
1355  if (!hFrame)
1356  return 0;
1357 
1358  ShowWindow(hFrame, SW_SHOW);
1359 
1360  SDIMainFrame* pFrame = GET_WINDOW(SDIMainFrame, hFrame);
1361 
1362  if (pFrame)
1363  pFrame->jump_to(pidl, mode);
1364 
1365  return hFrame;
1366 }
1367 
1369 {
1370  HWND hFrame = Create();
1371  if (!hFrame)
1372  return 0;
1373 
1374  ShowWindow(hFrame, SW_SHOW);
1375 
1376  MDIMainFrame* pMainFrame = GET_WINDOW(MDIMainFrame, hFrame);
1377 
1378  if (pMainFrame)
1379  pMainFrame->CreateChild(path, mode);
1380 
1381  return hFrame;
1382 }
1383 
1385 {
1386  switch(nmsg) {
1387  case WM_SIZE:
1389  break;
1390 
1391  case WM_PAINT: {
1392  PaintCanvas canvas(_hwnd);
1393 
1394  if (_left_hwnd) {
1395  ClientRect rt(_hwnd);
1396  rt.left = _split_pos-SPLIT_WIDTH/2;
1397  rt.right = _split_pos+SPLIT_WIDTH/2+1;
1398 
1399  if (_right_hwnd) {
1400  WindowRect right_rect(_right_hwnd);
1401  ScreenToClient(_hwnd, &right_rect);
1402  rt.top = right_rect.top;
1403  rt.bottom = right_rect.bottom;
1404  }
1405 
1406  HBRUSH lastBrush = SelectBrush(canvas, GetStockBrush(COLOR_SPLITBAR));
1407  Rectangle(canvas, rt.left, rt.top-1, rt.right, rt.bottom+1);
1408  SelectObject(canvas, lastBrush);
1409  }
1410  break;}
1411 
1412  case WM_SETCURSOR:
1413  if (_left_hwnd)
1414  if (LOWORD(lparam) == HTCLIENT) {
1415  POINT pt;
1416  GetCursorPos(&pt);
1417  ScreenToClient(_hwnd, &pt);
1418 
1419  if (pt.x>=_split_pos-SPLIT_WIDTH/2 && pt.x<_split_pos+SPLIT_WIDTH/2+1) {
1421  return TRUE;
1422  }
1423  }
1424  goto def;
1425 
1426  case WM_LBUTTONDOWN:
1427  if (_left_hwnd) {
1428  int x = GET_X_LPARAM(lparam);
1429 
1430  ClientRect rt(_hwnd);
1431 
1432  if (x>=_split_pos-SPLIT_WIDTH/2 && x<_split_pos+SPLIT_WIDTH/2+1) {
1434  SetCapture(_hwnd);
1435  }
1436  }
1437  break;
1438 
1439  case WM_LBUTTONUP:
1440  if (GetCapture() == _hwnd)
1441  ReleaseCapture();
1442  break;
1443 
1444  case WM_KEYDOWN:
1445  if (wparam == VK_ESCAPE)
1446  if (GetCapture() == _hwnd) {
1448  resize_children();
1449  _last_split = -1;
1450  ReleaseCapture();
1452  }
1453  break;
1454 
1455  case WM_MOUSEMOVE:
1456  if (GetCapture() == _hwnd) {
1457  int x = GET_X_LPARAM(lparam);
1458 
1459  ClientRect rt(_hwnd);
1460 
1461  if (x>=0 && x<rt.right) {
1462  _split_pos = x;
1463  resize_children();
1464  rt.left = x-SPLIT_WIDTH/2;
1465  rt.right = x+SPLIT_WIDTH/2+1;
1466  InvalidateRect(_hwnd, &rt, FALSE);
1468  UpdateWindow(_hwnd);
1470  }
1471  }
1472  break;
1473 
1474  case PM_OPEN_WINDOW: {
1475  CONTEXT("SDIMainFrame PM_OPEN_WINDOW");
1476 
1478  LPCTSTR path;
1479  ShellPath shell_path = DesktopFolderPath();
1480 
1481  if (lparam) {
1482  if (wparam & OWM_PIDL) {
1483  // take over PIDL from lparam
1484  shell_path.assign((LPCITEMIDLIST)lparam); // create as "rooted" window
1485  FileSysShellPath fsp(shell_path);
1486  path = fsp;
1487 
1488  if (path) {
1489  LOG(FmtString(TEXT("SDIMainFrame PM_OPEN_WINDOW: path=%s"), path));
1490  lstrcpy(buffer, path);
1491  path = buffer;
1492  }
1493  } else {
1494  // take over path from lparam
1495  path = (LPCTSTR)lparam;
1496  shell_path = path; // create as "rooted" window
1497  }
1498  } else {
1501  *buffer = '\0';
1502 
1503  path = buffer;
1504  shell_path = path;
1505  }
1506 
1507  if (wparam & OWM_ROOTED)
1508  _shellpath_info._root_shell_path = shell_path;
1509  else
1510  _shellpath_info._root_shell_path = DesktopFolderPath(); //SpecialFolderPath(CSIDL_DRIVES, _hwnd);
1511 
1512  jump_to(shell_path, wparam);
1513  return TRUE;} // success
1514 
1515  default: def:
1516  return super::WndProc(nmsg, wparam, lparam);
1517  }
1518 
1519  return 0;
1520 }
1521 
1522 int SDIMainFrame::Command(int id, int code)
1523 {
1524  switch(id) {
1525  case ID_VIEW_MDI:
1527  break;
1528 
1529  default:
1530  return super::Command(id, code);
1531  }
1532 
1533  return 0;
1534 }
1535 
1537 {
1538  if (cy <= 0)
1539  return; // avoid resizing children when receiving RBN_AUTOSIZE while getting minimized
1540 
1541  RECT rect = {0, 0, cx, cy};
1542 
1543  if (_hwndrebar) {
1544  int height = ClientRect(_hwndrebar).bottom;
1545  rect.top += height;
1546  rect.top += 5;
1547  } else {
1548  if (IsWindowVisible(_htoolbar)) {
1549  SendMessage(_htoolbar, WM_SIZE, 0, 0);
1550  WindowRect rt(_htoolbar);
1551  rect.top = rt.bottom;
1552  // rect.bottom -= rt.bottom;
1553  }
1554  }
1555 
1557  int parts[] = {300, 500};
1558 
1560  SendMessage(_hstatusbar, SB_SETPARTS, 2, (LPARAM)&parts);
1561  ClientRect rt(_hstatusbar);
1562  rect.bottom -= rt.bottom;
1563  }
1564 
1565  if (IsWindowVisible(_hsidebar)) {
1566  WindowRect rt(_hsidebar);
1567  rect.left += rt.right-rt.left;
1568 
1569  SetWindowPos(_hsidebar, 0, -1, rect.top-1, rt.right-rt.left, rect.bottom-rect.top+1, SWP_NOACTIVATE|SWP_NOZORDER);
1570  }
1571 
1572  _clnt_rect = rect;
1573 
1574  resize_children();
1575 }
1576 
1578 {
1579  HDWP hdwp = BeginDeferWindowPos(2);
1580 
1581  int cx = _clnt_rect.left;
1582 
1583  if (_left_hwnd) {
1584  cx = _split_pos + SPLIT_WIDTH/2;
1585 
1587  } else {
1588  //_split_pos = -1;
1589  cx = 0;
1590  }
1591 
1592  if (_right_hwnd)
1594 
1595  EndDeferWindowPos(hdwp);
1596 }
1597 
1599 {
1600  ClientRect rect(_hwnd);
1601 
1602  resize_frame(rect.right, rect.bottom);
1603 }
1604 
1606 {
1607  int split_pos = DEFAULT_SPLIT_POS;
1608 
1609  if (_shellBrowser.get()) {
1610  split_pos = _split_pos;
1611  delete _shellBrowser.release();
1612  }
1613 
1614  // create explorer treeview
1616  if (!_left_hwnd) {
1617  ClientRect rect(_hwnd);
1618 
1621  0, rect.top, split_pos-SPLIT_WIDTH/2, rect.bottom-rect.top,
1622  _hwnd, (HMENU)IDC_FILETREE, g_Globals._hInstance, 0);
1623 
1624  // display tree window as long as the shell view is not yet visible
1625  resize_frame(rect.right, rect.bottom);
1626  MoveWindow(_left_hwnd, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, TRUE);
1627  }
1628  } else {
1629  if (_left_hwnd) {
1631  _left_hwnd = 0;
1632  }
1633  }
1634 
1636  _shellpath_info, this, _cm_ifs));
1637 
1638  if (_left_hwnd)
1639  _shellBrowser->Init();
1640 
1641  // update _clnt_rect and set size of new created shell view windows
1642  update_clnt_rect();
1643 }
1644 
1646 {
1647  if (_left_hwnd)
1649 
1650  _shellBrowser->UpdateFolderView(entry->get_shell_folder());
1651 
1652  // set size of new created shell view windows
1653  resize_children();
1654 }
1655 
1657 {
1658  if (_url != url) {
1659  _url = url;
1661  }
1662 }
1663 
1664 
1666 {/*@@todo
1667  if (_shellBrowser.get() && (_shellpath_info._open_mode&~OWM_PIDL)==(mode&~OWM_PIDL)) {
1668  _shellBrowser->jump_to(path);
1669 
1670  _shellpath_info._shell_path = path;
1671  } else */{
1674 
1676  }
1677 }
1678 
1680 {
1682  ShellPath shell_path = path;
1683 
1684  _shellBrowser->jump_to(shell_path);
1685 
1686  _shellpath_info._shell_path = shell_path;
1687  } else {
1690 
1692  }
1693 }
information structure for creation of MDIShellBrowserChild
Definition: filechild.h:44
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define GW_HWNDNEXT
Definition: winuser.h:756
#define IDC_SIZEWE
Definition: winuser.h:689
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WINDOW_CREATOR(WND_CLASS)
Definition: window.h:202
#define ID_VIEW_TOOL_BAR
Definition: resource.h:138
#define TranslateAccelerator
Definition: winuser.h:5761
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: mainframe.cpp:928
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define ILC_COLOR16
Definition: commctrl.h:341
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define BITSPIXEL
Definition: wingdi.h:719
MDI child window displaying file lists.
Definition: filechild.h:88
ATOM _hframeClass
Definition: globals.h:274
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1608
bool activate_drive_window(LPCTSTR path)
Definition: mainframe.cpp:1249
void resize_frame(int cx, int cy)
Definition: mainframe.cpp:1536
struct _CONTEXT CONTEXT
HDWP WINAPI BeginDeferWindowPos(_In_ int)
#define TRUE
Definition: types.h:120
#define _tsplitpath_s
Definition: tchar.h:687
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
Explorer command line parser.
Definition: explorer.h:89
#define IDOK
Definition: winuser.h:824
#define ID_REFRESH
Definition: resource.h:18
#define PM_GET_FILEWND_PTR
Definition: explorer.h:61
information structure for creation of FileChildWindow for NT object namespace
Definition: filechild.h:55
BOOL launch_file(HWND hwnd, LPCTSTR cmd, UINT nCmdShow, LPCTSTR parameters)
Definition: utility.cpp:189
#define RBBIM_CHILD
Definition: commctrl.h:1478
Definition: fci.c:115
#define lstrcmpi
Definition: winbase.h:3690
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define RBS_VARHEIGHT
Definition: commctrl.h:1443
bool _desktop_mode
Definition: globals.h:276
int ImageList_AddAlphaIcon(HIMAGELIST himl, HICON hIcon, HBRUSH hbrush_bkgnd, HDC hdc_wnd)
add icon with alpha channel to imagelist using the specified background color
Definition: explorer.cpp:366
FullScreenParameters _fullscreen
Definition: mainframe.h:66
#define MF_BYCOMMAND
Definition: winuser.h:202
#define IDM_SDIFRAME
Definition: resource.h:69
#define GW_CHILD
Definition: winuser.h:758
WindowHandle _hwndrebar
Definition: mainframe.h:51
long y
Definition: polytest.cpp:48
static MDIShellBrowserChild * create(const ShellChildWndInfo &info)
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
#define WM_LBUTTONDOWN
Definition: winuser.h:1758
#define SM_CYMENUSIZE
Definition: winuser.h:1008
#define GetNextWindow(h, c)
Definition: winuser.h:4628
#define IDW_TOOLBAR
Definition: explorer.h:53
#define INT_MAX
Definition: limits.h:40
Retrieval of file system paths of ShellPath objects.
Definition: shellclasses.h:932
HRESULT hr
Definition: shlfolder.c:183
long x
Definition: polytest.cpp:48
#define IDW_DRIVEBAR
Definition: explorer.h:55
#define ID_DRIVE_REGISTRY
Definition: resource.h:199
int Command(int id, int code)
Definition: mainframe.cpp:1018
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
HDC WINAPI GetDC(_In_opt_ HWND)
#define TreeView_DeleteAllItems(hwnd)
Definition: commctrl.h:3389
#define RB_GETBARHEIGHT
Definition: commctrl.h:1580
Definition: ftp_var.h:139
static HTREEITEM hChild
Definition: treeview.c:381
#define RBN_AUTOSIZE
Definition: commctrl.h:1603
#define pt(x, y)
Definition: drawing.c:79
#define GetDriveType
Definition: winbase.h:3629
GLsizei const GLchar ** path
Definition: glext.h:7234
#define SW_HIDE
Definition: winuser.h:762
Implementation of IShellBrowserImpl interface in explorer child windows.
Definition: ieframe.h:84
WindowHandle _haddrcombo
Definition: mainframe.h:54
#define SW_SHOWMAXIMIZED
Definition: winuser.h:767
const GLint * attribs
Definition: glext.h:10538
#define ID_ABOUT_WINDOWS
Definition: resource.h:203
virtual BOOL TranslateMsg(MSG *pmsg)
Definition: mainframe.cpp:920
static INT_PTR CALLBACK WndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: filechild.cpp:95
struct _root root
#define TreeView_GetCount(hwnd)
Definition: commctrl.h:3404
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
#define TVS_LINESATROOT
Definition: commctrl.h:3221
#define GetLogicalDriveStrings
Definition: winbase.h:3639
BOOL toggle_fullscreen()
Definition: mainframe.cpp:586
#define WM_MDICASCADE
Definition: winuser.h:1801
#define IDC_FILETREE
Definition: resource.h:188
#define IDM_MDIFRAME
Definition: resource.h:67
WindowHandle _hdrivebar
Definition: mainframe.h:112
#define DRIVE_RAMDISK
Definition: winbase.h:252
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
static HDC
Definition: imagelist.c:92
#define RBBS_BREAK
Definition: commctrl.h:1461
BOOL WINAPI UpdateWindow(_In_ HWND)
TCHAR _drives[BUFFER_LEN]
Definition: mainframe.h:130
LONG top
Definition: windef.h:292
void resize_children()
Definition: mainframe.cpp:1577
#define IDS_FAVORITES
Definition: resource.h:31
HANDLE HWND
Definition: compat.h:13
#define GET_X_LPARAM(lp)
Definition: windowsx.h:274
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
#define WM_SHOWWINDOW
Definition: winuser.h:1610
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define ID_TOOLS_OPTIONS
Definition: resource.h:222
virtual void entry_selected(Entry *entry)
Definition: mainframe.cpp:1645
#define ID_DRIVE_FAT
Definition: resource.h:200
int Command(int id, int code)
Definition: mainframe.cpp:388
#define SM_CXEDGE
Definition: winuser.h:998
#define RBBS_CHILDEDGE
Definition: commctrl.h:1463
GLuint buffer
Definition: glext.h:5915
#define SM_CYSMICON
Definition: winuser.h:1003
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define ID_DRIVE_SHELL_NS
Definition: resource.h:196
#define WHITE_BRUSH
Definition: wingdi.h:901
IShellFolder smart pointer.
Definition: shellclasses.h:593
#define NMTVGETINFOTIP
Definition: commctrl.h:3744
WindowHandle _right_hwnd
Definition: mainframe.h:155
static WCHAR String[]
Definition: stringtable.c:55
UINT_PTR WPARAM
Definition: windef.h:207
#define Frame_CalcFrameClient(hwnd, prt)
Definition: window.h:388
#define ID_WINDOW_TILE_VERT
Definition: resource.h:49
#define WS_CHILD
Definition: pedump.c:617
#define TVIF_SELECTEDIMAGE
Definition: commctrl.h:3243
MDIMainFrame(HWND hwnd)
Definition: mainframe.cpp:691
LONG left
Definition: windef.h:291
#define SWP_NOZORDER
Definition: winuser.h:1232
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
int32_t INT_PTR
Definition: typedefs.h:62
static HWND Create()
Definition: mainframe.cpp:1342
#define TB_INSERTBUTTON
Definition: commctrl.h:1242
BYTE fsStyle
Definition: commctrl.h:924
#define VK_ESCAPE
Definition: winuser.h:2189
#define WS_CLIPCHILDREN
Definition: pedump.c:619
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:2635
HWND WINAPI CreateToolbarEx(HWND hwnd, DWORD style, UINT wID, INT nBitmaps, HINSTANCE hBMInst, UINT_PTR wBMID, LPCTBBUTTON lpButtons, INT iNumButtons, INT dxButton, INT dyButton, INT dxBitmap, INT dyBitmap, UINT uStructSize)
Definition: commctrl.c:929
#define ID_VIEW_SIDE_BAR
Definition: resource.h:140
LONG right
Definition: windef.h:293
BOOL WINAPI IsIconic(_In_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)
#define ID_GO_UP
Definition: resource.h:210
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
int32_t INT
Definition: typedefs.h:56
#define PM_TRANSLATE_MSG
Definition: window.h:266
static HWND child
Definition: cursoricon.c:298
& rect
Definition: startmenu.cpp:1413
#define SPLIT_WIDTH
Definition: eventvwr.c:62
#define ID_VIEW_FULLSCREEN
Definition: resource.h:193
HFONT hFont
Definition: main.c:53
DWORD WINAPI GetVersion(VOID)
Definition: version.c:22
#define DRIVE_REMOVABLE
Definition: winbase.h:248
#define ILC_COLOR4
Definition: commctrl.h:339
#define DefFrameProc
Definition: ros2win.h:32
static HWND Create(const ExplorerCmd &cmd)
Definition: mainframe.cpp:40
#define PM_FRM_GET_MENUINFO
Definition: window.h:280
#define RBS_BANDBORDERS
Definition: commctrl.h:1444
void explorer_about(HWND hwndParent)
Definition: explorer.cpp:934
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
#define ILC_COLOR32
Definition: commctrl.h:343
String _url
Definition: mainframe.h:165
Exception with context information.
Definition: shellclasses.h:113
UINT code
Definition: winuser.h:3133
HMENU _hMenuFrame
Definition: mainframe.h:60
#define TreeView_InsertItem(hwnd, lpis)
Definition: commctrl.h:3384
void update_clnt_rect()
Definition: mainframe.cpp:1598
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: mainframe.cpp:1384
HIMAGELIST _himl
Definition: mainframe.h:58
#define RBBIM_STYLE
Definition: commctrl.h:1474
#define RBBIM_SIZE
Definition: commctrl.h:1480
#define ID_VIEW_DRIVE_BAR
Definition: resource.h:137
#define CCS_NODIVIDER
Definition: commctrl.h:2220
#define WM_MDIICONARRANGE
Definition: winuser.h:1802
#define IDW_FIRST_CHILD
Definition: explorer.h:58
#define SM_CXSCREEN
Definition: winuser.h:949
#define LoadAccelerators
Definition: winuser.h:5711
#define ID_DRIVE_UNIX_FS
Definition: resource.h:197
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define BTNS_BUTTON
Definition: commctrl.h:970
#define DRIVE_REMOTE
Definition: winbase.h:250
#define ID_VIEW_STATUSBAR
Definition: resource.h:56
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:804
unsigned char * LPBYTE
Definition: typedefs.h:52
information structure for creation of FileChildWindow for the Registry
Definition: filechild.h:63
#define _MAX_DRIVE
Definition: utility.h:73
#define TVS_INFOTIP
Definition: commctrl.h:3230
unsigned int BOOL
Definition: ntddk_ex.h:94
#define DEFAULT_SPLIT_POS
Definition: window.h:270
#define e
Definition: ke_i.h:82
#define CreateStatusWindow
Definition: commctrl.h:1905
#define WM_SETCURSOR
Definition: winuser.h:1618
_Tp * release() _STLP_NOTHROW
Definition: _auto_ptr.h:53
#define ID_FILE_EXIT
Definition: resource.h:47
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
#define MDITILE_HORIZONTAL
Definition: winuser.h:2163
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
void toggle_child(HWND hwnd, UINT cmd, HWND hchild, int band_idx=-1)
Definition: mainframe.cpp:634
#define ID_WEB_WINDOW
Definition: resource.h:190
#define ShellExecute
Definition: shellapi.h:689
#define TVS_HASBUTTONS
Definition: commctrl.h:3219
HWND WINAPI GetCapture(void)
Definition: message.c:2879
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define ILC_COLOR
Definition: commctrl.h:337
#define PM_FRM_CALC_CLIENT
Definition: window.h:387
void fullscreen_move()
Definition: mainframe.cpp:616
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
#define IDD_EXECUTE
Definition: resource.h:112
#define GetCurrentDirectory
Definition: winbase.h:3622
#define ID_DRIVE_DESKTOP
Definition: resource.h:195
#define CreateWindowEx
Definition: winuser.h:5656
#define CW_USEDEFAULT
Definition: winuser.h:225
void set_url(LPCTSTR url)
Definition: mainframe.cpp:1656
#define IDW_ADDRESSBAR
Definition: explorer.h:56
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
#define VK_SHIFT
Definition: winuser.h:2177
bool activate_child_window(LPCTSTR filesys)
Definition: mainframe.cpp:1277
#define MAKELONG(a, b)
Definition: typedefs.h:248
#define RB_INSERTBAND
Definition: commctrl.h:1574
smooth NULL
Definition: ftsmooth.c:416
virtual void frame_get_clientspace(PRECT prect)
Definition: mainframe.cpp:1178
#define ID_DRIVE_FIRST
Definition: resource.h:201
void FillBookmarks()
Definition: mainframe.cpp:651
#define SM_CYSIZEFRAME
Definition: winuser.h:985
#define BUFFER_LEN
Definition: utility.h:97
struct tagMINMAXINFO * LPMINMAXINFO
#define WM_KEYDOWN
Definition: winuser.h:1697
LONG_PTR LPARAM
Definition: windef.h:208
#define SM_CYEDGE
Definition: winuser.h:999
#define CCS_NOPARENTALIGN
Definition: commctrl.h:2218
#define TVI_LAST
Definition: commctrl.h:3342
static HWND Create(CREATORFUNC creator, DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int w, int h, HWND hwndParent=0, HMENU hMenu=0)
Definition: window.cpp:87
#define RBBS_HIDETITLE
INT_PTR iString
Definition: commctrl.h:931
#define SW_SHOW
Definition: winuser.h:769
_Tp * get() const _STLP_NOTHROW
Definition: _auto_ptr.h:66
struct CFFOLDER folder
Definition: fdi.c:110
#define TreeView_SetImageList(hwnd, himl, iImage)
Definition: commctrl.h:3419
ChildWindow * CreateChild(LPCTSTR path=NULL, int mode=OWM_EXPLORE|OWM_DETAILS)
Definition: mainframe.cpp:909
HWND _hmdiclient
Definition: mainframe.h:108
#define WC_COMBOBOX
Definition: commctrl.h:4689
CHAR * PTSTR
Definition: xmlstorage.h:191
ShellPath _root_shell_path
Definition: shellbrowser.h:46
BOOL WINAPI GetWindowPlacement(_In_ HWND, _Inout_ WINDOWPLACEMENT *)
void resize_frame_client()
Definition: mainframe.cpp:551
#define WM_DESTROY
Definition: winuser.h:1591
#define ID_VIEW_SDI
Definition: resource.h:221
int _last_split
Definition: mainframe.h:162
int iBitmap
Definition: commctrl.h:921
#define PostMessage
Definition: winuser.h:5733
#define SM_CXSIZEFRAME
Definition: winuser.h:983
#define PM_SETSTATUSTEXT
Definition: window.h:340
#define _tcsstr
Definition: xmlstorage.h:199
int Notify(int id, NMHDR *pnmh)
Definition: mainframe.cpp:457
convenient loading of small (16x16) icon resources
Definition: globals.h:320
#define ID_WINDOW_CASCADE
Definition: resource.h:78
virtual void resize_frame(int cx, int cy)
Definition: mainframe.cpp:512
#define MF_CHECKED
Definition: winuser.h:132
#define RBS_AUTOSIZE
Definition: commctrl.h:1447
#define TB_GETBUTTONSIZE
Definition: commctrl.h:1132
void HandleException(COMException &e, HWND hwnd)
Exception Handler for COM exceptions.
virtual bool go_to(LPCTSTR url, bool new_window)
Definition: mainframe.cpp:681
char TCHAR
Definition: xmlstorage.h:189
#define SM_CYSCREEN
Definition: winuser.h:950
static HWND Create()
Definition: mainframe.cpp:866
#define _T(x)
Definition: vfdio.h:22
#define IDA_EXPLORER
Definition: resource.h:59
#define IDS_TITLE
Definition: resource.h:30
virtual void resize_frame(int cx, int cy)
Definition: mainframe.cpp:1190
#define TreeView_GetSelection(hwnd)
Definition: commctrl.h:3445
TCHAR _fs[_MAX_DIR]
Definition: entries.h:155
"rooted" window with special shell namespace root
Definition: mainframe.h:34
#define REBARBANDINFO
Definition: commctrl.h:1541
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define RBBIM_TEXT
Definition: commctrl.h:1476
#define BTNS_SEP
Definition: commctrl.h:971
#define SM_CYCAPTION
Definition: winuser.h:953
int _split_pos
Definition: mainframe.h:161
#define WC_TREEVIEW
Definition: commctrl.h:3217
#define ID_WINDOW_NEW
Definition: resource.h:227
if(!(yy_init))
Definition: macro.lex.yy.c:714
#define PM_GET_SHELLBROWSER_PTR
Definition: explorer.h:62
static HWND new_window(LPCSTR lpClassName, DWORD dwStyle, HWND parent)
Definition: editor.c:54
#define GetStockBrush(i)
Definition: windowsx.h:282
#define ID_VIEW_MDI
Definition: resource.h:220
int add_to_imagelist(HIMAGELIST himl, HDC hdc_wnd, COLORREF bk_color=GetSysColor(COLOR_WINDOW), HBRUSH bk_brush=GetSysColorBrush(COLOR_WINDOW)) const
Definition: explorer.cpp:306
#define WM_SIZE
Definition: winuser.h:1593
LONG HRESULT
Definition: typedefs.h:77
#define MDITILE_VERTICAL
Definition: winuser.h:2164
bool select_folder(Entry *entry, bool expand)
#define PM_OPEN_WINDOW
Definition: mainframe.h:29
static const WCHAR url[]
Definition: encode.c:1432
#define SWP_NOACTIVATE
Definition: winuser.h:1227
#define ILC_COLOR24
Definition: commctrl.h:342
#define WM_CLOSE
Definition: winuser.h:1603
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: mainframe.cpp:301
#define MAX_PATH
Definition: compat.h:26
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define IDW_SIDEBAR
Definition: explorer.h:57
int WINAPI GetSystemMetrics(_In_ int)
#define COLOR_SPLITBAR
Definition: window.h:271
UINT cidl
Definition: shlobj.h:491
unsigned long DWORD
Definition: ntddk_ex.h:95
information structure for creation of WebChildWindow
Definition: filechild.h:79
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define ShellAbout
Definition: shellapi.h:688
Favorites _favorites
Definition: globals.h:297
WindowHandle _left_hwnd
Definition: mainframe.h:154
HACCEL _hAccel
Definition: mainframe.h:68
#define RBBIM_CHILDSIZE
Definition: commctrl.h:1479
ShellPath _root_shell_path
Definition: filechild.h:51
WindowHandle _hsidebar
Definition: mainframe.h:57
#define TVE_EXPAND
Definition: commctrl.h:3395
#define RB_SHOWBAND
Definition: commctrl.h:1590
#define WS_HSCROLL
Definition: pedump.c:628
GLbitfield flags
Definition: glext.h:7161
#define IDB_DRIVEBAR
Definition: resource.h:62
#define TVI_ROOT
Definition: commctrl.h:3340
#define WM_PAINT
Definition: winuser.h:1602
bool ProcessMessage(UINT nmsg, WPARAM wparam, LPARAM lparam, LRESULT *pres)
Definition: mainframe.cpp:311
#define SM_CXSMICON
Definition: winuser.h:1002
#define CCS_NORESIZE
Definition: commctrl.h:2217
void UpdateFolderView(IShellFolder *folder)
#define PM_GET_CONTROLWINDOW
Definition: explorer.h:64
#define WM_MDIGETACTIVE
Definition: winuser.h:1803
ShellPath _shell_path
Definition: shellbrowser.h:45
void display_error(HWND hwnd, DWORD error)
Definition: utility.cpp:98
#define DialogBoxParam
Definition: winuser.h:5665
#define ID_WINDOW_TILE_HORZ
Definition: resource.h:48
LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
#define ID_EXPLORER_FAQ
Definition: resource.h:189
HINSTANCE _hInstance
Definition: globals.h:270
#define TVS_NOTOOLTIPS
Definition: commctrl.h:3226
virtual LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: window.cpp:280
#define ID_VIEW_EXTRA_BAR
Definition: resource.h:139
#define SB_SETTEXT
Definition: commctrl.h:1921
int idCommand
Definition: commctrl.h:922
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
#define TB_ADDBUTTONS
Definition: commctrl.h:1243
SHORT WINAPI GetAsyncKeyState(_In_ int)
uint32_t entry
Definition: isohybrid.c:63
#define ILC_MASK
Definition: commctrl.h:336
#define ID_EXECUTE
Definition: resource.h:68
HIMAGELIST _himl_old
Definition: mainframe.h:69
ExplorerGlobals g_Globals
Definition: explorer.cpp:52
#define LRESULT
Definition: ole.h:14
const Icon & get_icon(int icon_id)
Definition: explorer.cpp:625
#define HELP_INDEX
Definition: winuser.h:2385
#define WS_TABSTOP
Definition: pedump.c:634
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define IDW_EXTRABAR
Definition: explorer.h:54
#define WM_COMMAND
Definition: winuser.h:1722
#define WM_MDIACTIVATE
Definition: winuser.h:1796
virtual BOOL TranslateMsg(MSG *pmsg)
Definition: mainframe.cpp:379
#define MF_UNCHECKED
Definition: winuser.h:204
GLenum mode
Definition: glext.h:6217
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
MainFrameBase(HWND hwnd)
Definition: mainframe.cpp:150
#define ID_WINDOW_ARRANGE
Definition: resource.h:52
void fill_tree(HWND hwnd, HTREEITEM parent, HIMAGELIST, HDC hdc_wnd) const
fill treeview control with bookmark tree content
Definition: favorites.cpp:327
_Check_return_ _Ret_opt_z_ _CRTIMP char *__cdecl getcwd(_Out_writes_opt_(_SizeInBytes) char *_DstBuf, _In_ int _SizeInBytes)
#define LoadCursor
Definition: winuser.h:5713
#define ID_GO_SEARCH
Definition: resource.h:209
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
const Root & get_root() const
Definition: shellbrowser.h:117
#define REBARCLASSNAME
Definition: commctrl.h:1438
#define LOG(txt)
Definition: utility.h:102
WindowHandle _htoolbar
Definition: mainframe.h:53
static HDC hDC
Definition: 3dtext.c:33
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HWND hFrameWnd
Definition: main.c:30
HWND WINAPI SetCapture(_In_ HWND hWnd)
#define SW_SHOWNORMAL
Definition: winuser.h:764
HWND create_webchildwindow(const WebChildWndInfo &info)
Definition: webchild.cpp:175
#define TEXT(s)
Definition: k32.h:26
ShellPath create_absolute_pidl(LPCITEMIDLIST parent_pidl) const
#define WS_BORDER
Definition: pedump.c:625
#define WS_EX_NOPARENTNOTIFY
Definition: pedump.c:646
#define GET_WINDOW(CLASS, hwnd)
Definition: window.h:88
HMENU hMenuFrame
Definition: main.c:32
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
#define LoadMenu
Definition: winuser.h:5718
void assign(LPCITEMIDLIST pidl, size_t size)
Definition: shellclasses.h:806
#define ANSI_VAR_FONT
Definition: wingdi.h:906
#define NM_DBLCLK
Definition: commctrl.h:131
#define ID_ABOUT_EXPLORER
Definition: resource.h:204
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define TVIF_TEXT
Definition: commctrl.h:3238
#define lstrcpy
Definition: winbase.h:3691
#define ID_GO_HOME
Definition: resource.h:208
void update_shell_browser()
Definition: mainframe.cpp:1605
#define CBS_DROPDOWN
Definition: winuser.h:283
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_LBUTTONUP
Definition: winuser.h:1759
Definition: services.c:325
XMLPos get_cfg()
Definition: explorer.cpp:119
#define TVIF_IMAGE
Definition: commctrl.h:3239
#define DRIVE_CDROM
Definition: winbase.h:251
ShellPathInfo _shellpath_info
Definition: mainframe.h:152
static int OpenShellFolders(LPIDA pida, HWND hFrameWnd)
Definition: mainframe.cpp:77
HWND _hMainWnd
Definition: globals.h:275
UINT aoffset[1]
Definition: shlobj.h:492
#define SetWindowText
Definition: winuser.h:5758
unsigned int UINT
Definition: ndis.h:50
HMENU _hMenuWindow
Definition: mainframe.h:61
#define WM_MOUSEMOVE
Definition: winuser.h:1757
RECT _clnt_rect
Definition: mainframe.h:163
BOOL WINAPI IsZoomed(_In_ HWND)
#define WS_VSCROLL
Definition: pedump.c:627
#define SB_SETPARTS
Definition: commctrl.h:1926
information structure for creation of FileChildWindow
Definition: filechild.h:71
The "Execute..."-dialog lets the user enter a command line to launch.
Definition: filechild.h:133
#define WM_SETFONT
Definition: winuser.h:1632
information structure for creation of FileChildWindow
Definition: filechild.h:30
SDIMainFrame(HWND hwnd)
Definition: mainframe.cpp:1332
virtual void frame_get_clientspace(PRECT prect)
Definition: mainframe.cpp:558
#define RBBS_GRIPPERALWAYS
Definition: commctrl.h:1468
#define TVS_SHOWSELALWAYS
Definition: commctrl.h:3224
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
RECT rcNormalPosition
Definition: winuser.h:3269
window in explore mode
Definition: mainframe.h:33
#define IDC_ARROW
Definition: winuser.h:682
HMENU _hMenuView
Definition: window.h:277
#define TVS_HASLINES
Definition: commctrl.h:3220
_Out_opt_ int * cx
Definition: commctrl.h:570
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2888
#define TB_ADDSTRING
Definition: commctrl.h:1139
#define TVSIL_NORMAL
Definition: commctrl.h:3415
configuration dialog to choose between MDI and SDI mode
Definition: settings.h:91
#define SendMessage
Definition: winuser.h:5744
#define TBSTATE_ENABLED
Definition: commctrl.h:946
GLuint res
Definition: glext.h:9613
#define CCS_NOMOVEY
Definition: commctrl.h:2215
#define IDW_STATUSBAR
Definition: explorer.h:52
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define ID_GO_FORWARD
Definition: resource.h:207
#define HIWORD(l)
Definition: typedefs.h:246
static int DoModal(UINT nid, CREATORFUNC creator, HWND hwndParent=0)
Definition: window.cpp:701
BOOL WINAPI IsWindowVisible(_In_ HWND)
#define ILC_COLOR8
Definition: commctrl.h:340
static HINSTANCE hinst
Definition: edit.c:551
LONG bottom
Definition: windef.h:294
#define RBS_DBLCLKTOGGLE
Definition: commctrl.h:1449
#define IsMinimized(hwnd)
Definition: windowsx.h:443
#define W_VER_NT
Definition: utility.h:80
#define SelectBrush(hdc, hbr)
Definition: windowsx.h:490
#define SWP_NOMOVE
Definition: winuser.h:1229
#define IDB_TOOLBAR
Definition: wordpad.h:183
#define COUNTOF(x)
Definition: utility.h:93
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
DWORD bpp
Definition: surface.c:181
WindowHandle _hstatusbar
Definition: mainframe.h:55
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
virtual bool go_to(LPCTSTR url, bool new_window)
Definition: mainframe.cpp:1313
static FileChildWindow * create(const FileChildWndInfo &info)
Definition: filechild.cpp:377
view files in detail mode
Definition: mainframe.h:35
POINT ptMaxTrackSize
Definition: winuser.h:3605
void jump_to(LPCITEMIDLIST pidl)
convenient loading of string resources
Definition: globals.h:303
#define HTCLIENT
Definition: winuser.h:2450
GLfloat GLfloat p
Definition: glext.h:8902
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
void jump_to(LPCTSTR path, int mode)
Definition: mainframe.cpp:1665
LONG_PTR LRESULT
Definition: windef.h:209
#define ID_HELP
Definition: resource.h:28
LPARAM TreeView_GetItemData(HWND hwndTreeView, HTREEITEM hItem)
Definition: window.h:968
#define TV_INSERTSTRUCT
Definition: commctrl.h:3349
#define IDD_MDI_SDI
Definition: resource.h:105
#define TreeView_Expand(hwnd, hitem, code)
Definition: commctrl.h:3392
#define WS_VISIBLE
Definition: pedump.c:620
#define ID_DRIVE_NTOBJ_NS
Definition: resource.h:198
int Command(int id, int code)
Definition: mainframe.cpp:1522
#define PM_DISPATCH_COMMAND
Definition: window.h:265
HMENU WINAPI GetMenu(_In_ HWND)
WINDOWPLACEMENT _pos
Definition: filechild.h:39
#define IDI_DOT
Definition: resource.h:114
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
#define WS_EX_STATICEDGE
Definition: winuser.h:403
#define TBSTYLE_LIST
Definition: commctrl.h:965
#define WM_GETMINMAXINFO
Definition: winuser.h:1622
wrapper class for item ID lists
Definition: shellclasses.h:651
#define LOWORD(l)
Definition: pedump.c:82
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define TVN_GETINFOTIP
Definition: commctrl.h:3743
MenuInfo _menu_info
Definition: mainframe.h:63
BOOL WINAPI TranslateMDISysAccel(_In_ HWND, _In_ LPMSG)
#define ID_STOP
Definition: resource.h:21
auto_ptr< ShellBrowser > _shellBrowser
Definition: shellbrowser.h:209
base of all file and directory entries
Definition: entries.h:82
#define TBSTYLE_FLAT
Definition: commctrl.h:964
#define SetCurrentDirectory
Definition: winbase.h:3720
WindowHandle _hextrabar
Definition: mainframe.h:110
static IShellFolder IShellItem **static IBindCtx LPITEMIDLIST SFGAOF
Definition: ebrowser.c:83
#define WM_MDITILE
Definition: winuser.h:1800
#define SUCCEEDED(hr)
Definition: intsafe.h:57
path is given as PIDL, otherwise as LPCTSTR
Definition: mainframe.h:36
Definition: shlobj.h:490
static UINT WPARAM wparam
Definition: combo.c:716
#define lstrcpyn
Definition: winbase.h:3692
Definition: dlist.c:348
IconCache _icon_cache
Definition: globals.h:285
static IShellBrowser ShellBrowser
Definition: htmldoc.c:3702
#define ID_GO_BACK
Definition: resource.h:206
#define WS_MAXIMIZE
Definition: pedump.c:623
Shell folder path of the desktop.
Definition: shellclasses.h:991
#define WinHelp
Definition: winuser.h:5765
#define PM_JUMP_TO_URL
Definition: window.h:390