mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 09:50:02 +00:00
fix FOLDERSETTINGS usage
svn path=/trunk/; revision=5501
This commit is contained in:
parent
749c3d1719
commit
71e03db3fe
2 changed files with 17 additions and 10 deletions
|
@ -101,33 +101,40 @@ LRESULT DesktopWindow::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
|
|||
case WM_CREATE: {
|
||||
HRESULT hr = Desktop()->CreateViewObject(_hwnd, IID_IShellView, (void**)&_pShellView);
|
||||
|
||||
HWND hWndListView = 0;
|
||||
HWND hWndView = 0;
|
||||
|
||||
if (SUCCEEDED(hr)) {
|
||||
FOLDERSETTINGS fs;
|
||||
|
||||
fs.ViewMode = FWF_DESKTOP|FWF_TRANSPARENT|FWF_NOSUBFOLDERS|FWF_BESTFITWINDOW|FWF_ABBREVIATEDNAMES;
|
||||
fs.fFlags = FVM_ICON;
|
||||
fs.ViewMode = FVM_ICON;
|
||||
fs.fFlags = FWF_DESKTOP|FWF_TRANSPARENT|FWF_NOCLIENTEDGE|FWF_NOSCROLL|FWF_BESTFITWINDOW|FWF_SNAPTOGRID;
|
||||
|
||||
RECT rect;
|
||||
GetClientRect(_hwnd, &rect);
|
||||
|
||||
hr = _pShellView->CreateViewWindow(NULL, &fs, this, &rect, &hWndListView);
|
||||
hr = _pShellView->CreateViewWindow(NULL, &fs, this, &rect, &hWndView);
|
||||
|
||||
//TODO: use IShellBrowser::GetViewStateStream() to restore previous view state
|
||||
|
||||
if (SUCCEEDED(hr)) {
|
||||
HWND hwndFolderView = ::GetNextWindow(hWndListView, GW_CHILD);
|
||||
_pShellView->UIActivate(SVUIA_ACTIVATE_FOCUS);
|
||||
|
||||
HWND hwndFolderView = ::GetNextWindow(hWndView, GW_CHILD);
|
||||
|
||||
ShowWindow(hwndFolderView, SW_SHOW);
|
||||
}
|
||||
}
|
||||
|
||||
if (hWndListView && SetShellWindowEx)
|
||||
SetShellWindowEx(_hwnd, hWndListView);
|
||||
|
||||
if (hWndView && SetShellWindowEx)
|
||||
SetShellWindowEx(_hwnd, hWndView);
|
||||
else if (SetShellWindow)
|
||||
SetShellWindow(_hwnd);
|
||||
break;}
|
||||
|
||||
case WM_DESTROY:
|
||||
|
||||
//TODO: use IShellBrowser::GetViewStateStream() and _pShellView->SaveViewState() to store view state
|
||||
|
||||
if (SetShellWindow)
|
||||
SetShellWindow(0);
|
||||
break;
|
||||
|
|
|
@ -359,8 +359,8 @@ void ShellBrowserChild::OnTreeItemSelected(int idCtrl, LPNMTREEVIEW pnmtv)
|
|||
if (pLastShellView)
|
||||
pLastShellView->GetCurrentInfo(&fs);
|
||||
else {
|
||||
fs.ViewMode = FWF_SNAPTOGRID;
|
||||
fs.fFlags = FVM_DETAILS;
|
||||
fs.ViewMode = FVM_DETAILS;
|
||||
fs.fFlags = 0;
|
||||
}
|
||||
|
||||
HRESULT hr = folder->CreateViewObject(_hwnd, IID_IShellView, (void**)&_pShellView);
|
||||
|
|
Loading…
Reference in a new issue