mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-04-11 17:37:22 +10:00
* Rebrand to Open-Shell * Slight installer branding improvement
This commit is contained in:
776
Src/ClassicExplorer/ClassicCopy.cpp
Normal file
776
Src/ClassicExplorer/ClassicCopy.cpp
Normal file
@@ -0,0 +1,776 @@
|
||||
// Classic Shell (c) 2009-2017, Ivo Beltchev
|
||||
// Open-Shell (c) 2017-2018, The Open-Shell Team
|
||||
// Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <commctrl.h>
|
||||
#include <oleacc.h>
|
||||
#include <atlcomcli.h>
|
||||
#include <dwmapi.h>
|
||||
#include <utility>
|
||||
#include "Translations.h"
|
||||
#include "Settings.h"
|
||||
#include "ResourceHelper.h"
|
||||
#include "ComHelper.h"
|
||||
#include "dllmain.h"
|
||||
|
||||
static wchar_t g_TitleMove[256];
|
||||
static wchar_t g_TitleCopy[256];
|
||||
static wchar_t g_TitleFolder[256];
|
||||
static wchar_t g_ButtonMove[256];
|
||||
static wchar_t g_ButtonDontMove[256];
|
||||
static wchar_t g_ButtonCopy[256];
|
||||
static wchar_t g_ButtonDontCopy[256];
|
||||
static wchar_t g_ButtonCancel[256];
|
||||
static wchar_t g_ButtonMore[256];
|
||||
static HMODULE g_hShell32;
|
||||
|
||||
static void LogPrint( CString *pLog, const wchar_t *format, ... )
|
||||
{
|
||||
wchar_t buf[256];
|
||||
va_list args;
|
||||
va_start(args,format);
|
||||
int len=Vsprintf(buf,_countof(buf),format,args);
|
||||
va_end(args);
|
||||
*pLog+=buf;
|
||||
}
|
||||
|
||||
// CClassicCopyFile - this is the implementation of the Copy UI dialog box for files
|
||||
|
||||
class CClassicCopyFile
|
||||
{
|
||||
public:
|
||||
CClassicCopyFile( void );
|
||||
~CClassicCopyFile( void );
|
||||
|
||||
bool Run( HWND hWnd, IAccessible *pAcc, CString *pLog );
|
||||
|
||||
private:
|
||||
void EnumAccChildren( IAccessible *pAcc, CString *pLog );
|
||||
void AddAccChild( IAccessible *pAcc, const VARIANT &id, CString *pLog );
|
||||
void GetFileInfo( IAccessible *pAcc, bool bSrc );
|
||||
|
||||
CString m_FileName;
|
||||
bool m_bSystem;
|
||||
bool m_bReadOnly;
|
||||
HICON m_Icon;
|
||||
|
||||
CString m_SrcSize;
|
||||
CString m_SrcTime;
|
||||
HICON m_SrcIcon;
|
||||
|
||||
CString m_DstSize;
|
||||
CString m_DstTime;
|
||||
HICON m_DstIcon;
|
||||
|
||||
typedef std::pair<CComPtr<IAccessible>,int> CControl;
|
||||
CControl m_YesButton;
|
||||
CControl m_NoButton;
|
||||
CControl m_CheckBox;
|
||||
CControl m_Cancel;
|
||||
bool m_bCopyMultiLast; // the last of a series of multi-file boxes
|
||||
|
||||
static INT_PTR CALLBACK DialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
|
||||
static void PumpMessages( void );
|
||||
};
|
||||
|
||||
CClassicCopyFile::CClassicCopyFile( void )
|
||||
{
|
||||
m_Icon=m_SrcIcon=m_DstIcon=NULL;
|
||||
m_bCopyMultiLast=false;
|
||||
m_bSystem=m_bReadOnly=false;
|
||||
}
|
||||
|
||||
CClassicCopyFile::~CClassicCopyFile( void )
|
||||
{
|
||||
if (m_Icon) DestroyIcon(m_Icon);
|
||||
if (m_SrcIcon) DestroyIcon(m_SrcIcon);
|
||||
if (m_DstIcon) DestroyIcon(m_DstIcon);
|
||||
}
|
||||
|
||||
// Show the dialog box. Returns true to suppress the original task dialog box
|
||||
bool CClassicCopyFile::Run( HWND hWnd, IAccessible *pAcc, CString *pLog )
|
||||
{
|
||||
// find all interesting controls
|
||||
EnumAccChildren(pAcc,pLog);
|
||||
|
||||
if (!m_YesButton.first || m_YesButton.second!=CHILDID_SELF || !m_NoButton.first || m_NoButton.second!=CHILDID_SELF || !m_Cancel.first)
|
||||
return false; // something is wrong, do nothing
|
||||
|
||||
if (pLog) pLog->Empty(); // success - no need to log anything
|
||||
|
||||
// get the info for the source and the destination file (file name, icon, properties)
|
||||
m_bReadOnly=false;
|
||||
m_bSystem=false;
|
||||
GetFileInfo(m_YesButton.first,true);
|
||||
GetFileInfo(m_NoButton.first,false);
|
||||
|
||||
TlsData *pTlsData=GetTlsData();
|
||||
if (m_CheckBox.first)
|
||||
pTlsData->bCopyMultiFile=true;
|
||||
else if (pTlsData->bCopyMultiFile)
|
||||
m_bCopyMultiLast=true;
|
||||
|
||||
// pick the correct dialog template (for single and multiple files, for LTR and RTL)
|
||||
int dlg=pTlsData->bCopyMultiFile?(IsLanguageRTL()?IDD_FILEMULTIR:IDD_FILEMULTI):(IsLanguageRTL()?IDD_FILER:IDD_FILE);
|
||||
|
||||
HWND parent=GetWindow(GetAncestor(hWnd,GA_ROOT),GW_OWNER);
|
||||
|
||||
int res=(int)DialogBoxParam(g_Instance,MAKEINTRESOURCE(dlg),parent,DialogProc,(LPARAM)this);
|
||||
|
||||
if (res==IDOK || (res==IDYES && m_bCopyMultiLast))
|
||||
{
|
||||
// Yes was pressed, proceed with the operation
|
||||
m_YesButton.first->accDoDefaultAction(CComVariant(CHILDID_SELF));
|
||||
}
|
||||
else if (res==IDNO)
|
||||
{
|
||||
// No
|
||||
if (m_CheckBox.first && GetKeyState(VK_SHIFT)<0)
|
||||
m_CheckBox.first->accDoDefaultAction(CComVariant(CHILDID_SELF)); // Shift+No = No to All
|
||||
PumpMessages(); // messages need to be pumped after every accessibility action. otherwise the next action doesn't work
|
||||
m_NoButton.first->accDoDefaultAction(CComVariant(CHILDID_SELF));
|
||||
}
|
||||
else if (res==IDYES)
|
||||
{
|
||||
// Yes to All
|
||||
m_CheckBox.first->accDoDefaultAction(CComVariant(CHILDID_SELF));
|
||||
PumpMessages(); // messages need to be pumped after every accessibility action. otherwise the next action doesn't work
|
||||
m_YesButton.first->accDoDefaultAction(CComVariant(CHILDID_SELF));
|
||||
}
|
||||
if (res==IDCANCEL)
|
||||
{
|
||||
// Cancel
|
||||
if (GetKeyState(VK_SHIFT)<0 || GetKeyState(VK_CONTROL)<0)
|
||||
return false; // // Shift+Cancel or Ctrl+Cancel was clicked - show the original dialog box
|
||||
m_Cancel.first->accDoDefaultAction(CComVariant(CHILDID_SELF));
|
||||
}
|
||||
if (res==IDC_LINKMORE)
|
||||
{
|
||||
// More... was clicked - show the original dialog box
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void CClassicCopyFile::PumpMessages( void )
|
||||
{
|
||||
MSG msg;
|
||||
while (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
void CClassicCopyFile::AddAccChild( IAccessible *pAcc, const VARIANT &id, CString *pLog )
|
||||
{
|
||||
CComVariant state;
|
||||
pAcc->get_accState(id,&state);
|
||||
if (state.intVal&(STATE_SYSTEM_UNAVAILABLE|STATE_SYSTEM_INVISIBLE)) return;
|
||||
CComVariant role;
|
||||
pAcc->get_accRole(id,&role);
|
||||
if (role.intVal==ROLE_SYSTEM_PUSHBUTTON)
|
||||
{
|
||||
CComBSTR name;
|
||||
if (SUCCEEDED(pAcc->get_accName(id,&name)) && name)
|
||||
{
|
||||
if (pLog)
|
||||
LogPrint(pLog,L"button found: '%s', %d\r\n",name,id.intVal);
|
||||
if (_wcsicmp(name,g_ButtonCopy)==0 || _wcsicmp(name,g_ButtonMove)==0)
|
||||
{
|
||||
m_YesButton.first=pAcc;
|
||||
m_YesButton.second=id.intVal;
|
||||
if (pLog)
|
||||
LogPrint(pLog,L"YES button: %p, %d\r\n",pAcc,id.intVal);
|
||||
}
|
||||
else if (_wcsicmp(name,g_ButtonDontCopy)==0 || _wcsicmp(name,g_ButtonDontMove)==0)
|
||||
{
|
||||
m_NoButton.first=pAcc;
|
||||
m_NoButton.second=id.intVal;
|
||||
if (pLog)
|
||||
LogPrint(pLog,L"NO button: %p, %d\r\n",pAcc,id.intVal);
|
||||
}
|
||||
else if (_wcsicmp(name,g_ButtonCancel)==0)
|
||||
{
|
||||
m_Cancel.first=pAcc;
|
||||
m_Cancel.second=id.intVal;
|
||||
if (pLog)
|
||||
LogPrint(pLog,L"CANCEL button: %p, %d\r\n",pAcc,id.intVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (role.intVal==ROLE_SYSTEM_CHECKBUTTON)
|
||||
{
|
||||
// hopefully there is only one checkbox
|
||||
m_CheckBox.first=pAcc;
|
||||
m_CheckBox.second=id.intVal;
|
||||
}
|
||||
}
|
||||
|
||||
void CClassicCopyFile::EnumAccChildren( IAccessible *pAcc, CString *pLog )
|
||||
{
|
||||
AddAccChild(pAcc,CComVariant(CHILDID_SELF),pLog);
|
||||
long count;
|
||||
pAcc->get_accChildCount(&count);
|
||||
CComVariant children[20];
|
||||
AccessibleChildren(pAcc,0,count,children,&count);
|
||||
for (int i=0;i<count;i++)
|
||||
{
|
||||
if (children[i].vt==VT_DISPATCH)
|
||||
{
|
||||
CComQIPtr<IAccessible> pChild=children[i].pdispVal;
|
||||
if (pChild)
|
||||
EnumAccChildren(pChild,pLog);
|
||||
}
|
||||
else
|
||||
AddAccChild(pAcc,children[i],pLog);
|
||||
}
|
||||
}
|
||||
|
||||
void CClassicCopyFile::GetFileInfo( IAccessible *pAcc, bool bSrc )
|
||||
{
|
||||
long count;
|
||||
pAcc->get_accChildCount(&count);
|
||||
CComVariant children[20];
|
||||
AccessibleChildren(pAcc,0,count,children,&count);
|
||||
|
||||
wchar_t fname[_MAX_PATH]=L"";
|
||||
wchar_t dir[_MAX_PATH]=L"";
|
||||
CString size;
|
||||
CString date;
|
||||
|
||||
// get the file name, directory, size and date
|
||||
for (int i=0;i<count;i++)
|
||||
{
|
||||
CComBSTR name;
|
||||
if (children[i].vt==VT_DISPATCH)
|
||||
{
|
||||
CComQIPtr<IAccessible> pChild=children[i].pdispVal;
|
||||
if (pChild)
|
||||
pChild->get_accName(CComVariant(CHILDID_SELF),&name);
|
||||
}
|
||||
else
|
||||
{
|
||||
pAcc->get_accName(children[i],&name);
|
||||
}
|
||||
switch (i)
|
||||
{
|
||||
case 2: if (wcslen(name)<_countof(fname)) wcscpy_s(fname,name); break;
|
||||
case 3: if (wcslen(name)<_countof(dir)) wcscpy_s(dir,name); break;
|
||||
case 4: size=name; break;
|
||||
case 5: date=name; break;
|
||||
}
|
||||
}
|
||||
|
||||
if (bSrc)
|
||||
{
|
||||
m_FileName=fname;
|
||||
m_SrcSize=size;
|
||||
m_SrcTime=date;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_DstSize=size;
|
||||
m_DstTime=date;
|
||||
}
|
||||
|
||||
if (!fname[0] || !dir[0]) return;
|
||||
|
||||
wchar_t fname2[_MAX_PATH];
|
||||
memcpy(fname2,fname,sizeof(fname2));
|
||||
*PathFindExtension(fname2)=0;
|
||||
|
||||
int len1=Strlen(fname2);
|
||||
// the directory text is something like "filename (directory)". we need to parse out the real directory name
|
||||
int len2=Strlen(dir);
|
||||
if (dir[0]==0x202A) len1++; // for Arabic the first character is some RTL marker. needs to be skipped
|
||||
if (dir[len1]==0x1E) len1++; // for Hebrew there is an extra control character after the file name
|
||||
if (len1+1>=len2 || dir[len1]!=L' ' || dir[len1+1]!=L'(' || dir[len2-1]!=L')') return;
|
||||
if (dir[len1+2]==0x202A) len1++; // for Hebrew the first character is some RTL marker. needs to be skipped
|
||||
if (dir[len2-2]==0x202C) len2--; // for Hebrew the last character is some RTL marker. needs to be skipped
|
||||
dir[len2-1]=0;
|
||||
|
||||
// construct the full file name
|
||||
wchar_t path[_MAX_PATH];
|
||||
_wmakepath_s(path,NULL,dir+len1+2,fname,NULL);
|
||||
|
||||
if (!bSrc)
|
||||
{
|
||||
DWORD attrib=GetFileAttributes(path);
|
||||
if (attrib!=INVALID_FILE_ATTRIBUTES)
|
||||
{
|
||||
if (attrib&FILE_ATTRIBUTE_READONLY) m_bReadOnly=true;
|
||||
if (attrib&FILE_ATTRIBUTE_SYSTEM) m_bSystem=true;
|
||||
}
|
||||
}
|
||||
|
||||
// get file icon
|
||||
HICON hIcon=NULL;
|
||||
CAbsolutePidl pidl;
|
||||
if (SUCCEEDED(SHParseDisplayName(path,NULL,&pidl,0,NULL)) && pidl)
|
||||
{
|
||||
int iconSize=GetSystemMetrics(SM_CXICON);
|
||||
HBITMAP hBitmap=NULL;
|
||||
CComPtr<IShellItemImageFactory> pFactory;
|
||||
if (SUCCEEDED(SHCreateItemFromIDList(pidl,IID_IShellItemImageFactory,(void**)&pFactory)) && pFactory)
|
||||
{
|
||||
SIZE size={iconSize,iconSize};
|
||||
if (FAILED(pFactory->GetImage(size,SIIGBF_ICONONLY,&hBitmap)))
|
||||
hBitmap=NULL;
|
||||
}
|
||||
|
||||
if (hBitmap)
|
||||
{
|
||||
HBITMAP hMonoBitmap=CreateBitmap(iconSize,iconSize,1,1,NULL);
|
||||
ICONINFO info={TRUE,0,0,hMonoBitmap,hBitmap};
|
||||
hIcon=CreateIconIndirect(&info);
|
||||
DeleteObject(hMonoBitmap);
|
||||
DeleteObject(hBitmap);
|
||||
}
|
||||
}
|
||||
if (!hIcon) return;
|
||||
|
||||
if (bSrc)
|
||||
m_SrcIcon=hIcon;
|
||||
else
|
||||
m_DstIcon=hIcon;
|
||||
}
|
||||
|
||||
const int WM_BRINGFOREGROUND=WM_USER+11;
|
||||
|
||||
INT_PTR CALLBACK CClassicCopyFile::DialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
if (uMsg==WM_INITDIALOG)
|
||||
{
|
||||
SetWindowText(hwndDlg,FindTranslation(L"Copy.Title",L"Confirm File Replace"));
|
||||
CClassicCopyFile *pThis=(CClassicCopyFile*)lParam;
|
||||
wchar_t text[_MAX_PATH*2];
|
||||
if (pThis->m_bSystem)
|
||||
{
|
||||
Sprintf(text,_countof(text),FindTranslation(L"Copy.SubtitleSys",L"This folder already contains a system file named '%s'."),pThis->m_FileName);
|
||||
if (GetSettingInt(L"OverwriteAlertLevel")>=1)
|
||||
PlaySound(L".Default",NULL,SND_APPLICATION|SND_ALIAS|SND_ASYNC|SND_NODEFAULT|SND_SYSTEM);
|
||||
}
|
||||
else if (pThis->m_bReadOnly)
|
||||
{
|
||||
Sprintf(text,_countof(text),FindTranslation(L"Copy.SubtitleRO",L"This folder already contains a read-only file named '%s'."),pThis->m_FileName);
|
||||
if (GetSettingInt(L"OverwriteAlertLevel")>=2)
|
||||
PlaySound(L".Default",NULL,SND_APPLICATION|SND_ALIAS|SND_ASYNC|SND_NODEFAULT|SND_SYSTEM);
|
||||
}
|
||||
else
|
||||
Sprintf(text,_countof(text),FindTranslation(L"Copy.Subtitle",L"This folder already contains a file named '%s'."),pThis->m_FileName);
|
||||
SetDlgItemText(hwndDlg,IDC_STATICFNAME,text);
|
||||
|
||||
// load icon for file conflict (146) from Shell32.dll
|
||||
HMODULE hShell32=GetModuleHandle(L"Shell32.dll");
|
||||
pThis->m_Icon=LoadIcon(hShell32,MAKEINTRESOURCE(146));
|
||||
if (pThis->m_Icon)
|
||||
SendDlgItemMessage(hwndDlg,IDC_STATICICON1,STM_SETICON,(LPARAM)pThis->m_Icon,0);
|
||||
|
||||
// set the localized text
|
||||
SetDlgItemText(hwndDlg,IDC_STATICPROMPT1,FindTranslation(L"Copy.Prompt1",L"Do you want to replace the existing file:"));
|
||||
SetDlgItemText(hwndDlg,IDC_STATICDSTSIZE,pThis->m_DstSize);
|
||||
SetDlgItemText(hwndDlg,IDC_STATICDSTTIME,pThis->m_DstTime);
|
||||
SetDlgItemText(hwndDlg,IDC_STATICPROMPT2,FindTranslation(L"Copy.Prompt2",L"with this one?"));
|
||||
SendDlgItemMessage(hwndDlg,IDC_STATICDSTICON,STM_SETICON,(LPARAM)pThis->m_DstIcon,0);
|
||||
SetDlgItemText(hwndDlg,IDC_STATICSRCSIZE,pThis->m_SrcSize);
|
||||
SetDlgItemText(hwndDlg,IDC_STATICSRCTIME,pThis->m_SrcTime);
|
||||
SendDlgItemMessage(hwndDlg,IDC_STATICSRCICON,STM_SETICON,(LPARAM)pThis->m_SrcIcon,0);
|
||||
SetDlgItemText(hwndDlg,IDOK,FindTranslation(L"Copy.Yes",L"&Yes"));
|
||||
SetDlgItemText(hwndDlg,IDNO,FindTranslation(L"Copy.No",L"&No"));
|
||||
if (GetDlgItem(hwndDlg,IDYES))
|
||||
SetDlgItemText(hwndDlg,IDYES,FindTranslation(L"Copy.YesAll",L"Yes to &All"));
|
||||
if (GetDlgItem(hwndDlg,IDCANCEL))
|
||||
SetDlgItemText(hwndDlg,IDCANCEL,FindTranslation(L"Copy.Cancel",L"Cancel"));
|
||||
Sprintf(text,_countof(text),L"<a>%s</a>",FindTranslation(L"Copy.More",L"&More..."));
|
||||
SetDlgItemText(hwndDlg,IDC_LINKMORE,text);
|
||||
PostMessage(hwndDlg,WM_BRINGFOREGROUND,0,0);
|
||||
return TRUE;
|
||||
}
|
||||
if (uMsg==WM_BRINGFOREGROUND)
|
||||
{
|
||||
// bring window to front (sometimes on Windows7 it shows up behind Explorer)
|
||||
SetForegroundWindow(hwndDlg);
|
||||
return TRUE;
|
||||
}
|
||||
if (uMsg==WM_COMMAND && (wParam==IDOK || wParam==IDYES || wParam==IDNO || wParam==IDCANCEL))
|
||||
{
|
||||
EndDialog(hwndDlg,wParam);
|
||||
return TRUE;
|
||||
}
|
||||
if (uMsg==WM_NOTIFY)
|
||||
{
|
||||
NMHDR *pHdr=(NMHDR*)lParam;
|
||||
if (pHdr->idFrom==IDC_LINKMORE && (pHdr->code==NM_CLICK || pHdr->code==NM_RETURN))
|
||||
{
|
||||
EndDialog(hwndDlg,IDC_LINKMORE);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// CClassicCopyFolder - this is the implementation of the Copy UI dialog box for folders
|
||||
|
||||
class CClassicCopyFolder
|
||||
{
|
||||
public:
|
||||
CClassicCopyFolder( void ) { m_Icon=NULL; m_Original=NULL; }
|
||||
~CClassicCopyFolder( void );
|
||||
|
||||
bool Run( HWND hWnd );
|
||||
|
||||
private:
|
||||
HICON m_Icon;
|
||||
HWND m_Original;
|
||||
|
||||
static INT_PTR CALLBACK DialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
};
|
||||
|
||||
CClassicCopyFolder::~CClassicCopyFolder( void )
|
||||
{
|
||||
if (m_Icon) DestroyIcon(m_Icon);
|
||||
}
|
||||
|
||||
// Show the dialog box. Returns true to suppress the original task dialog box
|
||||
bool CClassicCopyFolder::Run( HWND hWnd )
|
||||
{
|
||||
m_Original=hWnd;
|
||||
const int ID_ALLCHECK=16663;
|
||||
HWND check=GetDlgItem(hWnd,ID_ALLCHECK);
|
||||
bool bMulti=(check && (GetWindowLong(check,GWL_STYLE)&WS_VISIBLE));
|
||||
// pick the correct dialog template (for single and multiple files, for LTR and RTL)
|
||||
int dlg=bMulti?(IsLanguageRTL()?IDD_FOLDERMULTIR:IDD_FOLDERMULTI):(IsLanguageRTL()?IDD_FOLDERR:IDD_FOLDER);
|
||||
|
||||
HWND parent=GetWindow(GetAncestor(hWnd,GA_ROOT),GW_OWNER);
|
||||
|
||||
int res=(int)DialogBoxParam(g_Instance,MAKEINTRESOURCE(dlg),parent,DialogProc,(LPARAM)this);
|
||||
|
||||
if (res==IDOK) // Yes button for single folder
|
||||
{
|
||||
// Yes was pressed, proceed with the operation
|
||||
PostMessage(hWnd,WM_COMMAND,IDYES,(LPARAM)GetDlgItem(hWnd,IDYES));
|
||||
}
|
||||
else if (res==IDNO)
|
||||
{
|
||||
// No
|
||||
if (bMulti)
|
||||
{
|
||||
if (GetKeyState(VK_SHIFT)<0)
|
||||
{
|
||||
CheckDlgButton(hWnd,ID_ALLCHECK,BST_CHECKED);
|
||||
SendMessage(hWnd,WM_COMMAND,ID_ALLCHECK,(LPARAM)check);
|
||||
}
|
||||
PostMessage(hWnd,WM_COMMAND,IDNO,(LPARAM)GetDlgItem(hWnd,IDNO)); // Skip
|
||||
}
|
||||
else
|
||||
PostMessage(hWnd,WM_COMMAND,IDCANCEL,(LPARAM)GetDlgItem(hWnd,IDCANCEL)); // No
|
||||
}
|
||||
else if (res==IDYES)
|
||||
{
|
||||
// Yes to All
|
||||
CheckDlgButton(hWnd,ID_ALLCHECK,BST_CHECKED);
|
||||
SendMessage(hWnd,WM_COMMAND,ID_ALLCHECK,(LPARAM)check);
|
||||
PostMessage(hWnd,WM_COMMAND,IDYES,(LPARAM)GetDlgItem(hWnd,IDYES));
|
||||
}
|
||||
if (res==IDCANCEL)
|
||||
{
|
||||
// Cancel
|
||||
if (GetKeyState(VK_SHIFT)<0 || GetKeyState(VK_CONTROL)<0)
|
||||
return false; // // Shift+Cancel or Ctrl+Cancel was clicked - show the original dialog box
|
||||
PostMessage(hWnd,WM_COMMAND,IDCANCEL,(LPARAM)GetDlgItem(hWnd,IDCANCEL)); // No
|
||||
}
|
||||
if (res==IDC_LINKMORE)
|
||||
{
|
||||
// More... was clicked - show the original dialog box
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
INT_PTR CALLBACK CClassicCopyFolder::DialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
if (uMsg==WM_INITDIALOG)
|
||||
{
|
||||
SetWindowText(hwndDlg,FindTranslation(L"Folder.Title",L"Confirm Folder Replace"));
|
||||
CClassicCopyFolder *pThis=(CClassicCopyFolder*)lParam;
|
||||
wchar_t text[2048];
|
||||
// find the link control and get its text
|
||||
HWND link=FindWindowEx(pThis->m_Original,NULL,WC_LINK,NULL);
|
||||
if (link)
|
||||
GetWindowText(link,text,_countof(text));
|
||||
else
|
||||
text[0]=0;
|
||||
Strcat(text,_countof(text),L"\r\n\r\n");
|
||||
Strcat(text,_countof(text),FindTranslation(L"Folder.Prompt",L"Do you still want to move or copy the folder?"));
|
||||
SetDlgItemText(hwndDlg,IDC_STATICFNAME,text);
|
||||
|
||||
// load icon for file conflict (146) from Shell32.dll
|
||||
HMODULE hShell32=GetModuleHandle(L"Shell32.dll");
|
||||
pThis->m_Icon=LoadIcon(hShell32,MAKEINTRESOURCE(146));
|
||||
if (pThis->m_Icon)
|
||||
SendDlgItemMessage(hwndDlg,IDC_STATICICON1,STM_SETICON,(LPARAM)pThis->m_Icon,0);
|
||||
|
||||
// set the localized text
|
||||
SetDlgItemText(hwndDlg,IDOK,FindTranslation(L"Copy.Yes",L"&Yes"));
|
||||
SetDlgItemText(hwndDlg,IDNO,FindTranslation(L"Copy.No",L"&No"));
|
||||
if (GetDlgItem(hwndDlg,IDYES))
|
||||
SetDlgItemText(hwndDlg,IDYES,FindTranslation(L"Copy.YesAll",L"Yes to &All"));
|
||||
if (GetDlgItem(hwndDlg,IDCANCEL))
|
||||
SetDlgItemText(hwndDlg,IDCANCEL,FindTranslation(L"Copy.Cancel",L"Cancel"));
|
||||
Sprintf(text,_countof(text),L"<a>%s</a>",FindTranslation(L"Copy.More",L"&More..."));
|
||||
SetDlgItemText(hwndDlg,IDC_LINKMORE,text);
|
||||
PostMessage(hwndDlg,WM_BRINGFOREGROUND,0,0);
|
||||
return TRUE;
|
||||
}
|
||||
if (uMsg==WM_BRINGFOREGROUND)
|
||||
{
|
||||
// bring window to front (sometimes on Windows7 it shows up behind Explorer)
|
||||
SetForegroundWindow(hwndDlg);
|
||||
return TRUE;
|
||||
}
|
||||
if (uMsg==WM_COMMAND && (wParam==IDOK || wParam==IDYES || wParam==IDNO || wParam==IDCANCEL))
|
||||
{
|
||||
EndDialog(hwndDlg,wParam);
|
||||
return TRUE;
|
||||
}
|
||||
if (uMsg==WM_NOTIFY)
|
||||
{
|
||||
NMHDR *pHdr=(NMHDR*)lParam;
|
||||
if (pHdr->idFrom==IDC_LINKMORE && (pHdr->code==NM_CLICK || pHdr->code==NM_RETURN))
|
||||
{
|
||||
EndDialog(hwndDlg,IDC_LINKMORE);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static CComPtr<IAccessible> FindMoreButton( IAccessible *pAcc )
|
||||
{
|
||||
CComVariant state;
|
||||
CComVariant self(CHILDID_SELF);
|
||||
pAcc->get_accState(self,&state);
|
||||
if (!(state.intVal&(STATE_SYSTEM_UNAVAILABLE|STATE_SYSTEM_INVISIBLE)))
|
||||
{
|
||||
CComVariant role;
|
||||
pAcc->get_accRole(self,&role);
|
||||
if (role.intVal==ROLE_SYSTEM_PUSHBUTTON)
|
||||
{
|
||||
CComBSTR name;
|
||||
if (SUCCEEDED(pAcc->get_accName(self,&name)) && name && _wcsicmp(name,g_ButtonMore)==0)
|
||||
return pAcc;
|
||||
}
|
||||
}
|
||||
|
||||
CComVariant children[30];
|
||||
long count;
|
||||
AccessibleChildren(pAcc,0,_countof(children),children,&count);
|
||||
for (int i=0;i<count;i++)
|
||||
{
|
||||
if (children[i].vt==VT_DISPATCH)
|
||||
{
|
||||
CComQIPtr<IAccessible> pChild=children[i].pdispVal;
|
||||
if (pChild)
|
||||
{
|
||||
CComPtr<IAccessible> pRes=FindMoreButton(pChild);
|
||||
if (pRes) return pRes;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static LRESULT CALLBACK WindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData )
|
||||
{
|
||||
if (uMsg==WM_WINDOWPOSCHANGING)
|
||||
{
|
||||
WINDOWPOS *pos=(WINDOWPOS*)lParam;
|
||||
if (pos->flags&SWP_SHOWWINDOW)
|
||||
{
|
||||
wchar_t title[256];
|
||||
GetWindowText(hWnd,title,_countof(title));
|
||||
|
||||
if (_wcsicmp(title,g_TitleMove)==0 || _wcsicmp(title,g_TitleCopy)==0)
|
||||
{
|
||||
// file UI
|
||||
if (GetSettingBool(L"ReplaceFileUI"))
|
||||
{
|
||||
CString log;
|
||||
CComPtr<IAccessible> pAcc;
|
||||
HRESULT h=AccessibleObjectFromWindow(hWnd,OBJID_WINDOW,IID_IAccessible,(void**)&pAcc);
|
||||
if (SUCCEEDED(h) && pAcc)
|
||||
{
|
||||
CClassicCopyFile copy;
|
||||
if (copy.Run(hWnd,pAcc,g_bLogLevel?&log:NULL))
|
||||
{
|
||||
pos->x=pos->y=-20000;
|
||||
pos->flags&=~(SWP_SHOWWINDOW|SWP_NOMOVE);
|
||||
}
|
||||
}
|
||||
else if (g_bLogLevel)
|
||||
LogPrint(&log,L"AccessibleObjectFromWindow: error=0x%X, hWnd=0x%p",h,hWnd);
|
||||
|
||||
if (g_bLogLevel)
|
||||
{
|
||||
wchar_t fname[_MAX_PATH]=L"%LOCALAPPDATA%\\OpenShell";
|
||||
DoEnvironmentSubst(fname,_MAX_PATH);
|
||||
SHCreateDirectory(NULL,fname);
|
||||
Strcat(fname,_countof(fname),L"\\ExplorerLog.txt");
|
||||
if (!log.IsEmpty())
|
||||
{
|
||||
FILE *f;
|
||||
if (_wfopen_s(&f,fname,L"wb")==0)
|
||||
{
|
||||
fwprintf(f,L"\xFEFF");
|
||||
|
||||
OSVERSIONINFOEX ver={sizeof(ver)};
|
||||
#pragma warning(suppress:4996)
|
||||
GetVersionEx((OSVERSIONINFO*)&ver);
|
||||
fwprintf(f,L"version = %d.%d.%d - %d.%d\r\n\r\n",ver.dwMajorVersion,ver.dwMinorVersion,ver.dwBuildNumber,ver.wServicePackMajor,ver.wServicePackMinor);
|
||||
|
||||
wchar_t languages[100]={0};
|
||||
ULONG size=4; // up to 4 languages
|
||||
ULONG len=_countof(languages);
|
||||
GetUserPreferredUILanguages(MUI_LANGUAGE_NAME,&size,languages,&len);
|
||||
for (const wchar_t *lang=languages;*lang;lang+=wcslen(lang)+1)
|
||||
fwprintf(f,L"language = %s\r\n",lang);
|
||||
|
||||
fwprintf(f,L"\r\n");
|
||||
fwprintf(f,L"g_ButtonMove = '%s'\r\n",g_ButtonMove);
|
||||
fwprintf(f,L"g_ButtonDontMove = '%s'\r\n",g_ButtonDontMove);
|
||||
fwprintf(f,L"g_ButtonCopy = '%s'\r\n",g_ButtonCopy);
|
||||
fwprintf(f,L"g_ButtonDontCopy = '%s'\r\n",g_ButtonDontCopy);
|
||||
fwprintf(f,L"g_ButtonCancel = '%s'\r\n",g_ButtonCancel);
|
||||
fwprintf(f,L"\r\n");
|
||||
|
||||
fwrite((const wchar_t*)log,log.GetLength(),2,f);
|
||||
fclose(f);
|
||||
}
|
||||
}
|
||||
else
|
||||
DeleteFile(fname);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (_wcsicmp(title,g_TitleFolder)==0)
|
||||
{
|
||||
// folder UI
|
||||
if (GetSettingBool(L"ReplaceFolderUI"))
|
||||
{
|
||||
CClassicCopyFolder copy;
|
||||
if (copy.Run(hWnd))
|
||||
{
|
||||
pos->x=pos->y=-20000;
|
||||
pos->flags&=~(SWP_SHOWWINDOW|SWP_NOMOVE);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// look for progress bar
|
||||
if (GetSettingBool(L"EnableMore"))
|
||||
{
|
||||
HWND progress=FindChildWindow(hWnd,PROGRESS_CLASS);
|
||||
if (progress)
|
||||
{
|
||||
bool bDef;
|
||||
int delay=GetSettingInt(L"MoreProgressDelay",bDef);
|
||||
if (bDef)
|
||||
{
|
||||
delay=0;
|
||||
if (GetWinVersion()>=WIN_VER_WIN7)
|
||||
{
|
||||
BOOL comp;
|
||||
if (SUCCEEDED(DwmIsCompositionEnabled(&comp)) && comp)
|
||||
delay=500;
|
||||
}
|
||||
}
|
||||
SetTimer(hWnd,'CLEX',delay,NULL);
|
||||
return DefSubclassProc(hWnd,uMsg,wParam,lParam);
|
||||
}
|
||||
}
|
||||
}
|
||||
LRESULT res=DefSubclassProc(hWnd,uMsg,wParam,lParam);
|
||||
RemoveWindowSubclass(hWnd,WindowProc,uIdSubclass);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
if (uMsg==WM_TIMER && wParam=='CLEX')
|
||||
{
|
||||
KillTimer(hWnd,wParam);
|
||||
|
||||
CComPtr<IAccessible> pAcc;
|
||||
HRESULT h=AccessibleObjectFromWindow(hWnd,OBJID_WINDOW,IID_IAccessible,(void**)&pAcc);
|
||||
if (SUCCEEDED(h) && pAcc)
|
||||
{
|
||||
CComPtr<IAccessible> pMore=FindMoreButton(pAcc);
|
||||
if (pMore) pMore->accDoDefaultAction(CComVariant(CHILDID_SELF));
|
||||
}
|
||||
|
||||
LRESULT res=DefSubclassProc(hWnd,uMsg,wParam,lParam);
|
||||
RemoveWindowSubclass(hWnd,WindowProc,uIdSubclass);
|
||||
return res;
|
||||
}
|
||||
return DefSubclassProc(hWnd,uMsg,wParam,lParam);
|
||||
}
|
||||
|
||||
LRESULT CALLBACK ClassicCopyHook( int nCode, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
if (nCode==HCBT_CREATEWND)
|
||||
{
|
||||
HWND hWnd=(HWND)wParam;
|
||||
CBT_CREATEWND *create=(CBT_CREATEWND*)lParam;
|
||||
HINSTANCE hInst=(HINSTANCE)GetWindowLongPtr(hWnd,GWLP_HINSTANCE);
|
||||
if (create->lpcs->lpszName && (intptr_t)create->lpcs->lpszClass==32770 && hInst==g_hShell32)
|
||||
{
|
||||
WaitDllInitThread();
|
||||
static LONG id;
|
||||
int i=InterlockedIncrement(&id);
|
||||
SetWindowSubclass(hWnd,WindowProc,i,0);
|
||||
}
|
||||
}
|
||||
TlsData *pTlsData=GetTlsData();
|
||||
return CallNextHookEx(pTlsData->copyHook,nCode,wParam,lParam);
|
||||
}
|
||||
|
||||
void InitClassicCopyProcess( void )
|
||||
{
|
||||
// load UI text from shell32.dll
|
||||
// the text is used to locate controls in the copy dialog by name
|
||||
g_hShell32=GetModuleHandle(L"shell32.dll");
|
||||
LoadString(g_hShell32,17027,g_TitleMove,256);
|
||||
LoadString(g_hShell32,17024,g_TitleCopy,256);
|
||||
LoadString(g_hShell32,16705,g_TitleFolder,256);
|
||||
LoadString(g_hShell32,13610,g_ButtonMove,256);
|
||||
LoadString(g_hShell32,13623,g_ButtonDontMove,256);
|
||||
LoadString(g_hShell32,13604,g_ButtonCopy,256);
|
||||
LoadString(g_hShell32,13606,g_ButtonDontCopy,256);
|
||||
LoadString(g_hShell32,13588,g_ButtonCancel,256);
|
||||
LoadString(g_hShell32,32992,g_ButtonMore,256);
|
||||
}
|
||||
|
||||
void InitClassicCopyThread( void )
|
||||
{
|
||||
TlsData *pTlsData=GetTlsData();
|
||||
if (!pTlsData->copyHook)
|
||||
pTlsData->copyHook=SetWindowsHookEx(WH_CBT,ClassicCopyHook,g_Instance,GetCurrentThreadId());
|
||||
}
|
||||
|
||||
void FreeClassicCopyThread( void )
|
||||
{
|
||||
TlsData *pTlsData=GetTlsData();
|
||||
if (pTlsData->copyHook)
|
||||
{
|
||||
UnhookWindowsHookEx(pTlsData->copyHook);
|
||||
pTlsData->copyHook=NULL;
|
||||
}
|
||||
}
|
||||
44
Src/ClassicExplorer/ClassicCopyExt.cpp
Normal file
44
Src/ClassicExplorer/ClassicCopyExt.cpp
Normal file
@@ -0,0 +1,44 @@
|
||||
// Classic Shell (c) 2009-2017, Ivo Beltchev
|
||||
// Open-Shell (c) 2017-2018, The Open-Shell Team
|
||||
// Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author
|
||||
|
||||
// ClassicCopyExt.cpp : Implementation of CClassicCopyExt
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "ClassicCopyExt.h"
|
||||
#include "ResourceHelper.h"
|
||||
#include "dllmain.h"
|
||||
|
||||
|
||||
// CClassicCopyExt - this is a dummy drag and drop handler. Its purpose is to get Explorer to load the DLL when
|
||||
// a file is being copied or moved.
|
||||
|
||||
void InitClassicCopyThread( void );
|
||||
|
||||
STDMETHODIMP CClassicCopyExt::Initialize( PCIDLIST_ABSOLUTE pidlFolder, LPDATAOBJECT pDataObj, HKEY hProgID )
|
||||
{
|
||||
InitClassicCopyThread();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CClassicCopyExt::QueryContextMenu( HMENU hmenu, UINT uMenuIndex, UINT uidFirstCmd, UINT uidLastCmd, UINT uFlags )
|
||||
{
|
||||
return MAKE_HRESULT(SEVERITY_SUCCESS,FACILITY_NULL,0);
|
||||
}
|
||||
|
||||
STDMETHODIMP CClassicCopyExt::GetCommandString( UINT_PTR idCmd, UINT uFlags, UINT* pwReserved, LPSTR pszName, UINT cchMax )
|
||||
{
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
STDMETHODIMP CClassicCopyExt::InvokeCommand( LPCMINVOKECOMMANDINFO pCmdInfo )
|
||||
{
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
HRESULT WINAPI CClassicCopyExt::UpdateRegistry( BOOL bRegister )
|
||||
{
|
||||
if (GetWinVersion()>=WIN_VER_WIN8)
|
||||
return S_OK;
|
||||
return _AtlModule.UpdateRegistryFromResource(IDR_CLASSICCOPYEXT,bRegister);
|
||||
}
|
||||
59
Src/ClassicExplorer/ClassicCopyExt.h
Normal file
59
Src/ClassicExplorer/ClassicCopyExt.h
Normal file
@@ -0,0 +1,59 @@
|
||||
// Classic Shell (c) 2009-2017, Ivo Beltchev
|
||||
// Open-Shell (c) 2017-2018, The Open-Shell Team
|
||||
// Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author
|
||||
|
||||
// ClassicCopyExt.h : Declaration of the CClassicCopyExt
|
||||
|
||||
#pragma once
|
||||
#include "resource.h" // main symbols
|
||||
|
||||
#include "ClassicExplorer_i.h"
|
||||
#include <vector>
|
||||
|
||||
// CClassicCopyExt
|
||||
|
||||
class ATL_NO_VTABLE CClassicCopyExt :
|
||||
public CComObjectRootEx<CComSingleThreadModel>,
|
||||
public CComCoClass<CClassicCopyExt, &CLSID_ClassicCopyExt>,
|
||||
public IShellExtInit,
|
||||
public IContextMenu
|
||||
|
||||
{
|
||||
public:
|
||||
CClassicCopyExt()
|
||||
{
|
||||
}
|
||||
|
||||
static HRESULT WINAPI UpdateRegistry( BOOL bRegister );
|
||||
|
||||
DECLARE_NOT_AGGREGATABLE(CClassicCopyExt)
|
||||
|
||||
BEGIN_COM_MAP(CClassicCopyExt)
|
||||
COM_INTERFACE_ENTRY(IShellExtInit)
|
||||
COM_INTERFACE_ENTRY(IContextMenu)
|
||||
END_COM_MAP()
|
||||
|
||||
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
HRESULT FinalConstruct()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void FinalRelease()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
// IShellExtInit
|
||||
STDMETHODIMP Initialize(PCIDLIST_ABSOLUTE, LPDATAOBJECT, HKEY);
|
||||
|
||||
// IContextMenu
|
||||
STDMETHODIMP GetCommandString(UINT_PTR, UINT, UINT*, LPSTR, UINT);
|
||||
STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO);
|
||||
STDMETHODIMP QueryContextMenu(HMENU, UINT, UINT, UINT, UINT);
|
||||
};
|
||||
|
||||
OBJECT_ENTRY_AUTO(__uuidof(ClassicCopyExt), CClassicCopyExt)
|
||||
58
Src/ClassicExplorer/ClassicCopyExt.rgs
Normal file
58
Src/ClassicExplorer/ClassicCopyExt.rgs
Normal file
@@ -0,0 +1,58 @@
|
||||
HKCR
|
||||
{
|
||||
ClassicExplorer.ClassicCopyExt.1 = s 'ClassicCopyExt Class'
|
||||
{
|
||||
CLSID = s '{8C83ACB1-75C3-45D2-882C-EFA32333491C}'
|
||||
}
|
||||
ClassicExplorer.ClassicCopyExt = s 'ClassicCopyExt Class'
|
||||
{
|
||||
CLSID = s '{8C83ACB1-75C3-45D2-882C-EFA32333491C}'
|
||||
CurVer = s 'ClassicExplorer.ClassicCopyExt.1'
|
||||
}
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {8C83ACB1-75C3-45D2-882C-EFA32333491C} = s 'ClassicCopyExt Class'
|
||||
{
|
||||
ProgID = s 'ClassicExplorer.ClassicCopyExt.1'
|
||||
VersionIndependentProgID = s 'ClassicExplorer.ClassicCopyExt'
|
||||
ForceRemove 'Programmable'
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
'TypeLib' = s '{BF8D124A-A4E0-402F-8152-4EF377E62586}'
|
||||
}
|
||||
}
|
||||
|
||||
NoRemove Directory
|
||||
{
|
||||
NoRemove shellex
|
||||
{
|
||||
NoRemove DragDropHandlers
|
||||
{
|
||||
ForceRemove ClassicCopyExt = s '{8C83ACB1-75C3-45D2-882C-EFA32333491C}'
|
||||
}
|
||||
}
|
||||
}
|
||||
NoRemove Drive
|
||||
{
|
||||
NoRemove shellex
|
||||
{
|
||||
NoRemove DragDropHandlers
|
||||
{
|
||||
ForceRemove ClassicCopyExt = s '{8C83ACB1-75C3-45D2-882C-EFA32333491C}'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NoRemove Folder
|
||||
{
|
||||
NoRemove shellex
|
||||
{
|
||||
NoRemove DragDropHandlers
|
||||
{
|
||||
ForceRemove ClassicCopyExt = s '{8C83ACB1-75C3-45D2-882C-EFA32333491C}'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
91
Src/ClassicExplorer/ClassicExplorer.cpp
Normal file
91
Src/ClassicExplorer/ClassicExplorer.cpp
Normal file
@@ -0,0 +1,91 @@
|
||||
// Classic Shell (c) 2009-2017, Ivo Beltchev
|
||||
// Open-Shell (c) 2017-2018, The Open-Shell Team
|
||||
// Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author
|
||||
|
||||
// ClassicExplorer.cpp : Implementation of DLL Exports.
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "resource.h"
|
||||
#include "ClassicExplorer_i.h"
|
||||
#include "dllmain.h"
|
||||
|
||||
// Used to determine whether the DLL can be unloaded by OLE
|
||||
STDAPI DllCanUnloadNow(void)
|
||||
{
|
||||
return _AtlModule.DllCanUnloadNow();
|
||||
}
|
||||
|
||||
extern bool g_bExplorerExe;
|
||||
|
||||
// Returns a class factory to create an object of the requested type
|
||||
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
|
||||
{
|
||||
WaitDllInitThread();
|
||||
if (!g_bExplorerExe && rclsid!=CLSID_ShareOverlay)
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
return _AtlModule.DllGetClassObject(rclsid, riid, ppv);
|
||||
}
|
||||
|
||||
|
||||
// DllRegisterServer - Adds entries to the system registry
|
||||
STDAPI DllRegisterServer(void)
|
||||
{
|
||||
WaitDllInitThread();
|
||||
// registers object, typelib and all interfaces in typelib
|
||||
HRESULT res=_AtlModule.DllRegisterServer();
|
||||
if (SUCCEEDED(res))
|
||||
{
|
||||
// mark the extensions as compatible with the enhanced protected mode of IE10
|
||||
// they are not technically IE extensions, but it complains about them as
|
||||
// being incompatible
|
||||
CComPtr<ICatRegister> catRegister;
|
||||
catRegister.CoCreateInstance(CLSID_StdComponentCategoriesMgr);
|
||||
if (catRegister)
|
||||
{
|
||||
CATID CATID_AppContainerCompatible={0x59fb2056,0xd625,0x48d0,{0xa9,0x44,0x1a,0x85,0xb5,0xab,0x26,0x40}};
|
||||
catRegister->RegisterClassImplCategories(CLSID_ExplorerBHO,1,&CATID_AppContainerCompatible);
|
||||
catRegister->RegisterClassImplCategories(CLSID_ExplorerBand,1,&CATID_AppContainerCompatible);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
// DllUnregisterServer - Removes entries from the system registry
|
||||
STDAPI DllUnregisterServer(void)
|
||||
{
|
||||
WaitDllInitThread();
|
||||
return _AtlModule.DllUnregisterServer();
|
||||
}
|
||||
|
||||
// DllInstall - Adds/Removes entries to the system registry per user
|
||||
// per machine.
|
||||
STDAPI DllInstall(BOOL bInstall, LPCWSTR pszCmdLine)
|
||||
{
|
||||
WaitDllInitThread();
|
||||
HRESULT hr = E_FAIL;
|
||||
static const wchar_t szUserSwitch[] = L"user";
|
||||
|
||||
if (pszCmdLine != NULL)
|
||||
{
|
||||
if (_wcsnicmp(pszCmdLine, szUserSwitch, _countof(szUserSwitch)) == 0)
|
||||
{
|
||||
AtlSetPerUserRegistration(true);
|
||||
}
|
||||
}
|
||||
|
||||
if (bInstall)
|
||||
{
|
||||
hr = DllRegisterServer();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
DllUnregisterServer();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hr = DllUnregisterServer();
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
90
Src/ClassicExplorer/ClassicExplorer.idl
Normal file
90
Src/ClassicExplorer/ClassicExplorer.idl
Normal file
@@ -0,0 +1,90 @@
|
||||
// ClassicExplorer.idl : IDL source for ClassicExplorer
|
||||
//
|
||||
|
||||
// This file will be processed by the MIDL tool to
|
||||
// produce the type library (ClassicExplorer.tlb) and marshalling code.
|
||||
|
||||
import "oaidl.idl";
|
||||
import "ocidl.idl";
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(BC4C1B8F-0BDE-4E42-9583-E072B2A28E0D),
|
||||
dual,
|
||||
nonextensible,
|
||||
helpstring("IExplorerBand Interface"),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IExplorerBand : IDispatch{
|
||||
};
|
||||
[
|
||||
object,
|
||||
uuid(6E00B97F-A4D4-4062-98E4-4F66FC96F32F),
|
||||
dual,
|
||||
nonextensible,
|
||||
helpstring("IClassicCopyExt Interface"),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IClassicCopyExt : IDispatch{
|
||||
};
|
||||
[
|
||||
object,
|
||||
uuid(A1678625-A011-4B7C-A1FA-D691E4CDDB79),
|
||||
dual,
|
||||
nonextensible,
|
||||
helpstring("IExplorerBHO Interface"),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IExplorerBHO : IDispatch{
|
||||
};
|
||||
[
|
||||
object,
|
||||
uuid(2576496C-B58A-4995-8878-8B68F9E8D1FC),
|
||||
dual,
|
||||
nonextensible,
|
||||
helpstring("IShareOverlay Interface"),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IShareOverlay : IDispatch{
|
||||
};
|
||||
[
|
||||
uuid(BF8D124A-A4E0-402F-8152-4EF377E62586),
|
||||
version(1.0),
|
||||
helpstring("ClassicExplorer 1.0 Type Library")
|
||||
]
|
||||
library ClassicExplorerLib
|
||||
{
|
||||
importlib("stdole2.tlb");
|
||||
[
|
||||
uuid(553891B7-A0D5-4526-BE18-D3CE461D6310),
|
||||
helpstring("ExplorerBand Class")
|
||||
]
|
||||
coclass ExplorerBand
|
||||
{
|
||||
[default] interface IExplorerBand;
|
||||
};
|
||||
[
|
||||
uuid(8C83ACB1-75C3-45D2-882C-EFA32333491C),
|
||||
helpstring("ClassicCopyExt Class")
|
||||
]
|
||||
coclass ClassicCopyExt
|
||||
{
|
||||
[default] interface IClassicCopyExt;
|
||||
};
|
||||
[
|
||||
uuid(449D0D6E-2412-4E61-B68F-1CB625CD9E52),
|
||||
helpstring("ExplorerBHO Class")
|
||||
]
|
||||
coclass ExplorerBHO
|
||||
{
|
||||
[default] interface IExplorerBHO;
|
||||
};
|
||||
[
|
||||
uuid(594D4122-1F87-41E2-96C7-825FB4796516),
|
||||
helpstring("ShareOverlay Class")
|
||||
]
|
||||
coclass ShareOverlay
|
||||
{
|
||||
[default] interface IShareOverlay;
|
||||
};
|
||||
};
|
||||
676
Src/ClassicExplorer/ClassicExplorer.rc
Normal file
676
Src/ClassicExplorer/ClassicExplorer.rc
Normal file
@@ -0,0 +1,676 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "windows.h"
|
||||
#include "winres.h"
|
||||
#include "..\Lib\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
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"#include ""..\\Lib\\resource.h""\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""..\\Lib\\resource.h""\r\n"
|
||||
"#include ""..\\Lib\\Lib.rc""\r\n"
|
||||
"1 TYPELIB ""ClassicExplorer.tlb""\r\0"
|
||||
END
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"#include ""..\\Lib\\resource.h""\r\n"
|
||||
"#include ""..\\Lib\\Lib.rc""\r\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\0"
|
||||
END
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#ifndef APSTUDIO_INVOKED\r\n"
|
||||
"#include ""targetver.h""\r\n"
|
||||
"#endif\r\n"
|
||||
"#include ""winres.h""\r\n"
|
||||
"#include ""..\\Lib\\resource.h""\r\n"
|
||||
"#include ""..\\Lib\\Lib.rc""\r\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"1 TYPELIB ""ClassicExplorer.tlb""\r\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_FILE DIALOGEX 0, 0, 266, 136
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Confirm File Replace"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Yes",IDOK,149,115,53,14
|
||||
PUSHBUTTON "&No",IDNO,206,115,53,14
|
||||
ICON "",IDC_STATICICON1,7,7,20,20
|
||||
LTEXT "This folder already contains a file called 'blah.txt'.",IDC_STATICFNAME,35,7,224,23,SS_NOPREFIX
|
||||
LTEXT "Do you want to replace the existing file:",IDC_STATICPROMPT1,35,34,224,8,SS_NOPREFIX
|
||||
ICON "",IDC_STATICDSTICON,43,46,20,20
|
||||
LTEXT "Static",IDC_STATICDSTSIZE,69,47,190,8,SS_NOPREFIX
|
||||
LTEXT "Static",IDC_STATICDSTTIME,69,57,190,8,SS_NOPREFIX
|
||||
LTEXT "with this one?",IDC_STATICPROMPT2,35,74,224,8,SS_NOPREFIX
|
||||
ICON "",IDC_STATICSRCICON,43,86,20,20
|
||||
LTEXT "Static",IDC_STATICSRCSIZE,69,87,190,8,SS_NOPREFIX
|
||||
LTEXT "Static",IDC_STATICSRCTIME,69,97,190,8,SS_NOPREFIX
|
||||
CONTROL "<a>&More...</a>",IDC_LINKMORE,"SysLink",WS_TABSTOP,7,120,57,10
|
||||
END
|
||||
|
||||
IDD_FILEMULTI DIALOGEX 0, 0, 285, 136
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Confirm File Replace"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Yes",IDOK,55,115,53,14
|
||||
PUSHBUTTON "Yes to &All",IDYES,112,115,53,14
|
||||
PUSHBUTTON "&No",IDNO,169,115,53,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,226,115,53,14
|
||||
ICON "",IDC_STATICICON1,7,7,20,20
|
||||
LTEXT "This folder already contains a file called 'blah.txt'.",IDC_STATICFNAME,35,7,243,23,SS_NOPREFIX
|
||||
LTEXT "Do you want to replace the existing file:",IDC_STATICPROMPT1,35,34,243,8,SS_NOPREFIX
|
||||
ICON "",IDC_STATICDSTICON,43,46,20,20
|
||||
LTEXT "Static",IDC_STATICDSTSIZE,69,47,209,8,SS_NOPREFIX
|
||||
LTEXT "Static",IDC_STATICDSTTIME,69,57,209,8,SS_NOPREFIX
|
||||
LTEXT "with this one?",IDC_STATICPROMPT2,35,74,243,8,SS_NOPREFIX
|
||||
ICON "",IDC_STATICSRCICON,43,86,20,20
|
||||
LTEXT "Static",IDC_STATICSRCSIZE,69,87,209,8,SS_NOPREFIX
|
||||
LTEXT "Static",IDC_STATICSRCTIME,69,97,209,8,SS_NOPREFIX
|
||||
CONTROL "<a>&More...</a>",IDC_LINKMORE,"SysLink",WS_TABSTOP,7,120,45,10
|
||||
END
|
||||
|
||||
IDD_FILEMULTIR DIALOGEX 0, 0, 285, 136
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_LAYOUTRTL
|
||||
CAPTION "Confirm File Replace"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Yes",IDOK,55,115,53,14
|
||||
PUSHBUTTON "Yes to &All",IDYES,112,115,53,14
|
||||
PUSHBUTTON "&No",IDNO,169,115,53,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,226,115,53,14
|
||||
ICON "",IDC_STATICICON1,7,7,20,20
|
||||
LTEXT "This folder already contains a file called 'blah.txt'.",IDC_STATICFNAME,35,7,243,23,SS_NOPREFIX
|
||||
LTEXT "Do you want to replace the existing file:",IDC_STATICPROMPT1,35,34,243,8,SS_NOPREFIX
|
||||
ICON "",IDC_STATICDSTICON,43,46,20,20
|
||||
LTEXT "Static",IDC_STATICDSTSIZE,69,47,209,8,SS_NOPREFIX
|
||||
LTEXT "Static",IDC_STATICDSTTIME,69,57,209,8,SS_NOPREFIX
|
||||
LTEXT "with this one?",IDC_STATICPROMPT2,35,74,243,8,SS_NOPREFIX
|
||||
ICON "",IDC_STATICSRCICON,43,86,20,20
|
||||
LTEXT "Static",IDC_STATICSRCSIZE,69,87,209,8,SS_NOPREFIX
|
||||
LTEXT "Static",IDC_STATICSRCTIME,69,97,209,8,SS_NOPREFIX
|
||||
CONTROL "<a>&More...</a>",IDC_LINKMORE,"SysLink",WS_TABSTOP,7,120,45,10
|
||||
END
|
||||
|
||||
IDD_FILER DIALOGEX 0, 0, 266, 136
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_LAYOUTRTL
|
||||
CAPTION "Confirm File Replace"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Yes",IDOK,149,115,53,14
|
||||
PUSHBUTTON "&No",IDNO,206,115,53,14
|
||||
ICON "",IDC_STATICICON1,7,7,20,20
|
||||
LTEXT "This folder already contains a file called 'blah.txt'.",IDC_STATICFNAME,35,7,224,23,SS_NOPREFIX
|
||||
LTEXT "Do you want to replace the existing file:",IDC_STATICPROMPT1,35,34,224,8,SS_NOPREFIX
|
||||
ICON "",IDC_STATICDSTICON,43,46,20,20
|
||||
LTEXT "Static",IDC_STATICDSTSIZE,69,47,190,8,SS_NOPREFIX
|
||||
LTEXT "Static",IDC_STATICDSTTIME,69,57,190,8,SS_NOPREFIX
|
||||
LTEXT "with this one?",IDC_STATICPROMPT2,35,74,224,8,SS_NOPREFIX
|
||||
ICON "",IDC_STATICSRCICON,43,86,20,20
|
||||
LTEXT "Static",IDC_STATICSRCSIZE,69,87,190,8,SS_NOPREFIX
|
||||
LTEXT "Static",IDC_STATICSRCTIME,69,97,190,8,SS_NOPREFIX
|
||||
CONTROL "<a>&More...</a>",IDC_LINKMORE,"SysLink",WS_TABSTOP,7,120,57,10
|
||||
END
|
||||
|
||||
IDD_FOLDERMULTI DIALOGEX 0, 0, 285, 100
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Confirm Folder Replace"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Yes",IDOK,55,79,53,14
|
||||
PUSHBUTTON "Yes to &All",IDYES,112,79,53,14
|
||||
PUSHBUTTON "&No",IDNO,169,79,53,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,226,79,53,14
|
||||
ICON "",IDC_STATICICON1,7,7,20,20
|
||||
LTEXT "This folder already contains a folder called 'blah'.",IDC_STATICFNAME,35,7,243,65,SS_NOPREFIX
|
||||
CONTROL "<a>&More...</a>",IDC_LINKMORE,"SysLink",WS_TABSTOP,7,84,45,10
|
||||
END
|
||||
|
||||
IDD_FOLDER DIALOGEX 0, 0, 266, 100
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Confirm Folder Replace"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Yes",IDOK,149,79,53,14
|
||||
PUSHBUTTON "&No",IDNO,206,79,53,14
|
||||
ICON "",IDC_STATICICON1,7,7,20,20
|
||||
LTEXT "This folder already contains a folder called 'blah'.",IDC_STATICFNAME,35,7,224,65,SS_NOPREFIX
|
||||
CONTROL "<a>&More...</a>",IDC_LINKMORE,"SysLink",WS_TABSTOP,7,84,57,10
|
||||
END
|
||||
|
||||
IDD_FOLDERR DIALOGEX 0, 0, 266, 99
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_LAYOUTRTL
|
||||
CAPTION "Confirm Folder Replace"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Yes",IDOK,149,78,53,14
|
||||
PUSHBUTTON "&No",IDNO,206,78,53,14
|
||||
ICON "",IDC_STATICICON1,7,7,20,20
|
||||
LTEXT "This folder already contains a folder called 'blah'.",IDC_STATICFNAME,35,7,224,65,SS_NOPREFIX
|
||||
CONTROL "<a>&More...</a>",IDC_LINKMORE,"SysLink",WS_TABSTOP,7,83,57,10
|
||||
END
|
||||
|
||||
IDD_FOLDERMULTIR DIALOGEX 0, 0, 285, 100
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_LAYOUTRTL
|
||||
CAPTION "Confirm Folder Replace"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Yes",IDOK,55,79,53,14
|
||||
PUSHBUTTON "Yes to &All",IDYES,112,79,53,14
|
||||
PUSHBUTTON "&No",IDNO,169,79,53,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,226,79,53,14
|
||||
ICON "",IDC_STATICICON1,7,7,20,20
|
||||
LTEXT "This folder already contains a folder called 'blah'.",IDC_STATICFNAME,35,7,243,65,SS_NOPREFIX
|
||||
CONTROL "<a>&More...</a>",IDC_LINKMORE,"SysLink",WS_TABSTOP,7,84,45,10
|
||||
END
|
||||
|
||||
IDD_CUSTOMTOOLBAR DIALOGEX 0, 0, 249, 183
|
||||
STYLE DS_SETFONT | DS_CENTER | WS_POPUP | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
|
||||
CAPTION "Edit Toolbar Button (%s)"
|
||||
FONT 9, "Segoe UI", 400, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Command:",IDC_STATICCOMMAND,7,7,35,12,SS_CENTERIMAGE
|
||||
COMBOBOX IDC_COMBOCOMMAND,47,7,180,30,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "...",IDC_BUTTONCOMMAND,228,7,14,12
|
||||
LTEXT "Link:",IDC_STATICLINK,7,23,16,12,SS_CENTERIMAGE
|
||||
COMBOBOX IDC_COMBOLINK,47,23,180,30,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "...",IDC_BUTTONLINK,228,23,14,12
|
||||
LTEXT "Label:",IDC_STATICTEXT,7,41,22,12,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDITLABEL,47,41,195,12,ES_AUTOHSCROLL
|
||||
LTEXT "Tip:",IDC_STATICINFOTIP,7,58,13,12,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDITTIP,47,58,195,12,ES_AUTOHSCROLL
|
||||
LTEXT "Icon:",IDC_STATICICON,7,74,18,12,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDITICON,47,74,180,12,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "...",IDC_BUTTONICON,228,74,14,12
|
||||
ICON "",IDC_ICONN,9,89,20,20
|
||||
LTEXT "Disabled:",IDC_STATICICOND,7,113,35,12,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDITICOND,47,113,180,12,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "...",IDC_BUTTONICOND,228,113,14,12
|
||||
ICON "",IDC_ICOND,9,127,20,20
|
||||
PUSHBUTTON "Restore defaults",IDC_BUTTONRESET,7,162,90,14
|
||||
DEFPUSHBUTTON "OK",IDOK,135,162,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,192,162,50,14
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION _PRODUCT_VERSION
|
||||
PRODUCTVERSION _PRODUCT_VERSION
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904e4"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Open-Shell"
|
||||
VALUE "FileDescription", "Adds classic Windows Explorer features"
|
||||
VALUE "FileVersion", _PRODUCT_VERSION_STR
|
||||
VALUE "InternalName", "ClassicExplorer.dll"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2017-2018, The Open-Shell Team"
|
||||
VALUE "OriginalFilename", "ClassicExplorer.dll"
|
||||
VALUE "ProductName", "Open-Shell"
|
||||
VALUE "ProductVersion", _PRODUCT_VERSION_STR
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1252
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// REGISTRY
|
||||
//
|
||||
|
||||
IDR_CLASSICEXPLORER REGISTRY "ClassicExplorer.rgs"
|
||||
IDR_EXPLORERBAND REGISTRY "ExplorerBand.rgs"
|
||||
IDR_EXPLORERBHO REGISTRY "ExplorerBHO.rgs"
|
||||
IDR_CLASSICCOPYEXT REGISTRY "ClassicCopyExt.rgs"
|
||||
IDR_SHAREOVERLAY REGISTRY "ShareOverlay.rgs"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_APPICON ICON "..\\Setup\\OpenShell.ico"
|
||||
IDI_UP2DISABLED ICON "up2Disabled.ico"
|
||||
IDI_UP2HOT ICON "up2Hot.ico"
|
||||
IDI_UP2NORMAL ICON "up2Normal.ico"
|
||||
IDI_UP2PRESSED ICON "up2Pressed.ico"
|
||||
IDI_UP ICON "up.ico"
|
||||
IDI_UPDISABLED ICON "upDisabled.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_CUSTOMTOOLBAR, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 242
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 176
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_APP_TITLE "Classic Explorer"
|
||||
IDS_NEW_SETTINGS1 "The new settings will take effect the next time you open an Explorer window."
|
||||
IDS_NEW_SETTINGS2 "You need to log off and back on for the new settings to take effect."
|
||||
IDS_SETTINGS_TITLE "Settings for Classic Explorer"
|
||||
IDS_SETTINGS_TITLE_VER "Settings for Classic Explorer %d.%d.%d"
|
||||
IDS_LANGUAGE_SETTINGS "Language"
|
||||
IDS_TOOLBAR_SETTINGS "Toolbar Settings"
|
||||
IDS_BIG_BUTTONS "Big buttons"
|
||||
IDS_BIG_BUTTONS_TIP "Use big buttons in the toolbar"
|
||||
IDS_SMALL_SIZE "Small icon size"
|
||||
IDS_SMALL_SIZE_TIP "Set the icon size when 'Big buttons' is unchecked. By default it is 16 for DPI<120 and 24 for DPI>=120"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_LARGE_SIZE "Large icon size"
|
||||
IDS_LARGE_SIZE_TIP "Set the icon size when 'Big buttons' is checked. By default it is 24 for DPI<120 and 32 for DPI>=120"
|
||||
IDS_MENU_SIZE "Menu icon size"
|
||||
IDS_MENU_SIZE_TIP "Set the size of the icons in the dropdown menus"
|
||||
IDS_SAME_SIZE "Same size buttons"
|
||||
IDS_SAME_SIZE_TIP "When this is checked, all toolbar buttons are the same size, determined by the widest button. Cannot be combined with 'Text is on the side'"
|
||||
IDS_LIST_MODE "Text is on the side"
|
||||
IDS_LIST_MODE_TIP "When this is checked, the toolbar is in list mode. The button text shows next to the icon instead of under the icon"
|
||||
IDS_RESIZEABLE "Resizeable toolbar"
|
||||
IDS_RESIZEABLE_TIP "When this is checked, the toolbar can be resized to be smaller than its full size. The buttons that don't fit on screen can be accessed by clicking on the small chevron button"
|
||||
IDS_BUTTONS_SETTINGS "Toolbar Buttons"
|
||||
IDS_NAVIGATION_SETTINGS "Navigation Pane"
|
||||
IDS_TREE_STYLE "Navigation pane style"
|
||||
IDS_TREE_STYLE_TIP "Pick the style for the folder tree in the navigation pane"
|
||||
IDS_XPCLASSIC "Windows XP Classic"
|
||||
IDS_XPCLASSIC_TIP "The navigation pane has lines connecting the folders"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_XPSIMPLE "Windows XP Simple"
|
||||
IDS_XPSIMPLE_TIP "The navigation pane has no lines"
|
||||
IDS_VISTA "Windows Vista"
|
||||
IDS_VISTA_TIP "The navigation pane shows little triangles to expand the folders"
|
||||
IDS_TREE_SPACING "Tree item spacing"
|
||||
IDS_TREE_SPACING_TIP "This is a number for controlling the spacing between the items in the folder tree. Use positive numbers to increase the spacing, and negative numbers to reduce the spacing"
|
||||
IDS_NO_FADE "Don't fade buttons"
|
||||
IDS_NO_FADE_TIP "When this is checked, the small triangle buttons for expanding the folder will not fade out when the mouse moves away"
|
||||
IDS_FULL_INDENT "Full-size offset for sub-folders"
|
||||
IDS_FULL_INDENT_TIP "When this is checked, the sub-folders will be offset by the full size of the icon, instead of the half of the size"
|
||||
IDS_NAVIGATE "Auto-navigate to the selected folder"
|
||||
IDS_NAVIGATE_TIP "Select if the files on the right should update to show the current folder on the left"
|
||||
IDS_NAV_DELAY "Auto-navigation delay"
|
||||
IDS_NAV_DELAY_TIP "Enter the delay (in ms) for updating the files after selecting a new folder"
|
||||
IDS_ALT_ENTER "Enable Alt+Enter in the navigation pane"
|
||||
IDS_ALT_ENTER_TIP "When this is checked, pressing Alt+Enter will show the properties of the selected folder"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_VIEWCONTENT_TIP "Shows the Content view"
|
||||
IDS_VIEWICONS1_TIP "Shows the Small Icons view"
|
||||
IDS_VIEWICONS2_TIP "Shows the Medium Icons view"
|
||||
IDS_VIEWICONS3_TIP "Shows the Large Icons view"
|
||||
IDS_VIEWICONS4_TIP "Shows the Extra Large Icons view"
|
||||
IDS_OPEN_TIP "Opens a given folder in the current window"
|
||||
IDS_CUSTOM_TIP "This is a custom button. Use the command property to launch a program, or the link property to show a folder as a drop-down menu"
|
||||
IDS_NEWFOLDER_TIP "Creates a new folder"
|
||||
IDS_SCROLLTIP "Hide scroll tooltips"
|
||||
IDS_SCROLLTIP_TIP "When this is checked, there won't be a tooltip when you are dragging the vertical scrollbar"
|
||||
IDS_NAV_DEFAULT "Default behavior"
|
||||
IDS_NAV_DEFAULT_TIP "Don't change the default behavior of Explorer"
|
||||
IDS_NAV_KBD "When using the keyboard"
|
||||
IDS_NAV_KBD_TIP "The files will update only if you select a new folder with the keyboard"
|
||||
IDS_NAV_ALWAYS "Always"
|
||||
IDS_NAV_ALWAYS_TIP "The files will update every time the selected folder changes for any reason"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_FIX_SCROLL "Fix folder scrolling"
|
||||
IDS_FIX_SCROLL_TIP "This option fixes a bug in Windows 7 that moves a folder to the bottom of the screen after it is expanded"
|
||||
IDS_TITLE_SETTINGS "Title Bar"
|
||||
IDS_SHOW_CAPTION "Show caption in the title bar"
|
||||
IDS_SHOW_CAPTION_TIP "Show the caption (the current path) in the title bar"
|
||||
IDS_SHOW_ICON "Show icon in the title bar"
|
||||
IDS_SHOW_ICON_TIP "Show the icon of the current folder in the title bar"
|
||||
IDS_NO_BREADCRUMBS "Disable breadcrumbs"
|
||||
IDS_NO_BREADCRUMBS_TIP "Disable breadcrumbs and show the full path in the address bar"
|
||||
IDS_ADDRESS_HISTORY "Address bar history"
|
||||
IDS_ADDRESS_HISTORY_TIP "Control the contents of the history dropdown"
|
||||
IDS_NORMAL_HISTORY "Normal history"
|
||||
IDS_NORMAL_HISTORY_TIP "Show the default contents as provided by Explorer (recently visited folders and websites)"
|
||||
IDS_SIMPLE_PATH "Simple path"
|
||||
IDS_SIMPLE_PATH_TIP "Show the parents of the current folder all the way to the Desktop"
|
||||
IDS_EXTENDED_PATH "Extended path"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_EXTENDED_PATH_TIP "Besides the parents, shows all immediate folders of the Desktop and Computer. This is how it works in Windows XP"
|
||||
IDS_HIDE_SEARCH "Hide Search box"
|
||||
IDS_HIDE_SEARCH_TIP "Hide the search box from the address bar"
|
||||
IDS_UP_SETTINGS "Up Button"
|
||||
IDS_SHOW_UP "Show Up button"
|
||||
IDS_SHOW_UP_TIP "Controls how the Up button is displayed"
|
||||
IDS_DONT_SHOW "Don't show"
|
||||
IDS_DONT_SHOW_TIP "The Up button is not shown"
|
||||
IDS_BEFORE_BACK "Before Back/Forward"
|
||||
IDS_BEFORE_BACK_TIP "The Up button appears before the Back/Forward buttons"
|
||||
IDS_AFTER_BACK "After Back/Forward"
|
||||
IDS_AFTER_BACK_TIP "The Up button appears after the Back/Forward buttons"
|
||||
IDS_UP_NORMAL "Normal Up button icon"
|
||||
IDS_UP_NORMAL_TIP "Pick the icon to use for the normal Up button"
|
||||
IDS_UP_HOT "Hot Up button icon"
|
||||
IDS_UP_HOT_TIP "Pick the icon to use for the hot Up button (when the mouse is over the button)"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_UP_PRESSED "Pressed Up button icon"
|
||||
IDS_UP_PRESSED_TIP "Pick the icon to use for the pressed Up button"
|
||||
IDS_UP_DISABLED "Disabled Up button icon"
|
||||
IDS_UP_DISABLED_TIP "Pick the icon to use for the disabled Up button"
|
||||
IDS_UP_SIZE "Up button size"
|
||||
IDS_UP_SIZE_TIP "Set the size for the Up button. By default it is 30 for DPI<120 and 36 for DPI>=120"
|
||||
IDS_STATUS_SETTINGS "Status Bar"
|
||||
IDS_FREE_SPACE "Show free space and file size"
|
||||
IDS_FREE_SPACE_TIP "The status bar will show the free space on the current drive and the total size of all selected files. If no files are selected, the total size of all files will be shown"
|
||||
IDS_INFO_TIP "Show detailed info for single selection"
|
||||
IDS_INFO_TIP_TIP "When a single file is selected, the status bar will show the detailed information for that file"
|
||||
IDS_FORCE_REFRESH "Force status refresh"
|
||||
IDS_FORCE_REFRESH_TIP "This is a workaround for a bug in Explorer for Windows 7. Sometimes when a new Explorer window is opened the status bar is blank. Check this option to enable the workaround"
|
||||
IDS_FILE_SETTINGS "File Operation"
|
||||
IDS_FILE_UI "Replace file conflict dialog"
|
||||
IDS_FILE_UI_TIP "When this is checked, the dialog showing file conflicts during a copy or move operation will be replaced with the old-style dialog from Windows XP"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_FOLDER_UI "Replace folder conflict dialog"
|
||||
IDS_FOLDER_UI_TIP "When this is checked, the dialog showing folder conflicts during a copy or move operation will be replaced with the old-style dialog from Windows XP"
|
||||
IDS_ALERT_LEVEL "Sound alert for file conflicts"
|
||||
IDS_ALERT_LEVEL_TIP "This setting adds a sound alert to the copy confirmation dialog when a system or read-only file is about to be overwritten"
|
||||
IDS_NO_ALERT "No alert"
|
||||
IDS_NO_ALERT_TIP "No sound is played"
|
||||
IDS_SYS_FILES "For system files"
|
||||
IDS_SYS_FILES_TIP "A sound is played when a system file is about to be overwritten"
|
||||
IDS_RO_FILES "For system and read-only files"
|
||||
IDS_RO_FILES_TIP "A sound is played when a system or a read-only file is about to be overwritten"
|
||||
IDS_MORE "Always show more details"
|
||||
IDS_MORE_TIP "When this is checked, Explorer dialogs like Copy, Move or Delete will expand to show all details by default"
|
||||
IDS_MORE_DELAY "Delay for more details"
|
||||
IDS_MORE_DELAY_TIP "Delay (in ms) for showing more details in the progress dialog. On Windows 7 with Aero if the details are shown too soon the progress dialog flickers badly. Use a delay of at least 250 ms to avoid the flicker. The delay is also useful if you want to see the details only for longer operations"
|
||||
IDS_FILE_EXPLORER "Enable only in Explorer (improves performance)"
|
||||
IDS_FILE_EXPLORER_TIP "When this is checked, the file and folder conflict dialogs will be replaced only in Explorer. Otherwise they will be replaced for all processes"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_FILEPANE_SETTINGS "File Pane"
|
||||
IDS_SHARE "Add icon overlay for shared folders"
|
||||
IDS_SHARE_TIP "When this is checked, the shared folders will get a small overlay icon"
|
||||
IDS_SHARE_ICON "Share overlay icon"
|
||||
IDS_SHARE_ICON_TIP "Set the icon to be used for the overlay"
|
||||
IDS_SHARE_EXPLORER "Show overlay only in Explorer (improves performance)"
|
||||
IDS_SHARE_EXPLORER_TIP "When this is checked, the overlay icon will be shown only in Explorer. Otherwise they will be shown in all processes"
|
||||
IDS_HEADERS "Show sort headers in all views"
|
||||
IDS_HEADERS_TIP "When this is checked, the sort headers will show in all views, not just Details"
|
||||
IDS_SCROLLBAR "Show horizontal scrollbar"
|
||||
IDS_SCROLLBAR_TIP "Select if the horizontal scrollbar will be enabled"
|
||||
IDS_SCROLLBAR_DEFAULT "Default"
|
||||
IDS_SCROLLBAR_DEFAULT_TIP
|
||||
"The scrollbar will be disabled for the 'Windows Vista' navigation pane style, and enabled for the others"
|
||||
IDS_SCROLLBAR_ON "Enabled"
|
||||
IDS_SCROLLBAR_ON_TIP "The scrollbar will show up when it is needed"
|
||||
IDS_SCROLLBAR_OFF "Disabled"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SCROLLBAR_OFF_TIP "The scrollbar will be hidden at all times"
|
||||
IDS_COMMAND_TIP "Pick a command for the button. The command determines what the button does when clicked"
|
||||
IDS_LINK_TIP "Type a full path of a file or a folder. The folder will open like a dropdown menu. The file will be executed when the button is clicked"
|
||||
IDS_TEXT_TIP "Enter the text for the button. If the text starts with $ (like $Toolbar.Settings) it will be looked up in the file ExplorerL10N.ini"
|
||||
IDS_TIP_TIP "Enter the tooltip for the button. If the text starts with $ (like $Toolbar.Settings) it will be looked up in the file ExplorerL10N.ini"
|
||||
IDS_ICON_TIP "Enter the icon for the button. If the icon is blank, the default icon of the link will be used instead. Use either a path to a .ico file, or a combination of a .dll file and a icon ID. Use 'none' to get no icon at all"
|
||||
IDS_ICOND_TIP "Enter the disabled icon for the button. If the setting is blank, the disabled icon will be generated from the normal icon"
|
||||
IDS_RESTORE_TIP "Restores all properties (text, icon and more) to the defaults for the selected command"
|
||||
IDS_SEPARATOR_TIP "This item separates buttons in the toolbar"
|
||||
IDS_UP_TIP "Goes up to the parent folder"
|
||||
IDS_CUT_TIP "Cuts the selected files"
|
||||
IDS_COPY_TIP "Copies the selected files"
|
||||
IDS_PASTE_TIP "Pastes files from the clipboard"
|
||||
IDS_DELETE_TIP "Deletes the selected files"
|
||||
IDS_PROPERTIES_TIP "Shows properties for the selection"
|
||||
IDS_EMAIL_TIP "Emails the selected files"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SETTINGS_TIP "Shows the Classic Explorer settings"
|
||||
IDS_REFRESH_TIP "Refreshes the Explorer view"
|
||||
IDS_STOP_TIP "Stops the current operation"
|
||||
IDS_RENAME_TIP "Renames the selected file"
|
||||
IDS_MOVETO_TIP "Moves the selection to a new place"
|
||||
IDS_COPYTO_TIP "Copies the selection to a new place"
|
||||
IDS_UNDO_TIP "Undoes the last operation"
|
||||
IDS_REDO_TIP "Redoes the last undo"
|
||||
IDS_SELECTALL_TIP "Selects all files in the folder"
|
||||
IDS_DESELECT_TIP "Deselects all"
|
||||
IDS_INVERT_TIP "Inverts the selection"
|
||||
IDS_BACK_TIP "Goes back to the previous location"
|
||||
IDS_FORWARD_TIP "Goes to the next location"
|
||||
IDS_VIEWTILES_TIP "Shows the Tiles view"
|
||||
IDS_VIEWDEATAILS_TIP "Shows the Details view"
|
||||
IDS_VIEWLIST_TIP "Shows the List view"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_ALT_D "Additional shortcut for the address bar: Alt +"
|
||||
IDS_ALT_D_TIP "Enter a letter 'A' to 'Z' to be a shortcut for the address bar. In some languages the default shortcut conflicts with a menu item"
|
||||
IDS_SORT_TIP "Sorts the folder by the given property (name, type, size or date). Use '-' before the property to sort in descending order. Read the help for more options."
|
||||
IDS_GROUP_TIP "Groups the folder by the given property (name, type, size or date). Use '-' before the property to group in descending order. Read the help for more options."
|
||||
IDS_PASTE_SHORTCUT_TIP "Creates shortcuts for the files in the clipboard"
|
||||
IDS_UP_HOTKEY "Additional shortcut for the Up button"
|
||||
IDS_UP_HOTKEY_TIP "Select a shortcut for navigating to the parent folder"
|
||||
IDS_MAP_DRIVE_TIP "Connects to a network drive"
|
||||
IDS_DISCONNECT_DRIVE_TIP "Disconnects from a network drive"
|
||||
IDS_CUSTOMIZEFOLDER_TIP "Customize this folder"
|
||||
IDS_SEPARATOR_ITEM "SEPARATOR"
|
||||
IDS_UP_ITEM "Up"
|
||||
IDS_CUT_ITEM "Cut"
|
||||
IDS_COPY_ITEM "Copy"
|
||||
IDS_PASTE_ITEM "Paste"
|
||||
IDS_PASTE_LNK_ITEM "Paste shortcut"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_DELETE_ITEM "Delete"
|
||||
IDS_PROPERTIES_ITEM "Properties"
|
||||
IDS_EMAIL_ITEM "Email"
|
||||
IDS_SETTINGS_ITEM "Settings"
|
||||
IDS_REFRESH_ITEM "Refresh"
|
||||
IDS_STOP_ITEM "Stop"
|
||||
IDS_RENAME_ITEM "Rename"
|
||||
IDS_NEWFOLDER_ITEM "New folder"
|
||||
IDS_MOVETO_ITEM "Move to"
|
||||
IDS_COPYTO_ITEM "Copy to"
|
||||
IDS_UNDO_ITEM "Undo"
|
||||
IDS_REDO_ITEM "Redo"
|
||||
IDS_SELECTALL_ITEM "Select all"
|
||||
IDS_DESELECT_ITEM "Deselect"
|
||||
IDS_INVERT_ITEM "Invert selection"
|
||||
IDS_BACK_ITEM "Back"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_FORWARD_ITEM "Forward"
|
||||
IDS_MAP_DRIVE_ITEM "Map network drive"
|
||||
IDS_DISCONNECT_ITEM "Disconnect network drive"
|
||||
IDS_CUSTOMIZE_ITEM "Customize folder"
|
||||
IDS_VIEWTILES_ITEM "View Tiles"
|
||||
IDS_VIEWDETAILS_ITEM "View Details"
|
||||
IDS_VIEWLIST_ITEM "View List"
|
||||
IDS_VIEWCONTENT_ITEM "View Content"
|
||||
IDS_VIEWICONS1_ITEM "View Small icons"
|
||||
IDS_VIEWICONS2_ITEM "View Medium icons"
|
||||
IDS_VIEWICONS3_ITEM "View Large icons"
|
||||
IDS_VIEWICONS4_ITEM "View Extra large icons"
|
||||
IDS_OPEN_ITEM "Open"
|
||||
IDS_SORYBY_ITEM "Sort by"
|
||||
IDS_GROUPBY_ITEM "Group by"
|
||||
IDS_CUSTOM_ITEM "Custom"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SHOWSTATUSBAR "Show status bar"
|
||||
IDS_SHOWSTATUSBAR_TIP "When this is checked, Explorer will have a status bar that shows information about the total selection size, free disk space, and more"
|
||||
IDS_SHOW_ZONE "Show zone"
|
||||
IDS_SHOW_ZONE_TIP "When this is checked, the status bar will display the current security zone"
|
||||
IDS_SHARE_HIDDEN "Show hidden shares"
|
||||
IDS_SHARE_HIDDEN_TIP "When this is checked, the overlay will appear also for hidden shares ending with $"
|
||||
IDS_NAVPANE_ITEM "Navigation pane"
|
||||
IDS_NAVPANE_TIP "Toggles the navigation pane"
|
||||
IDS_DETAILSPANE_ITEM "Details pane"
|
||||
IDS_DETAILSPANE_TIP "Toggles the details pane"
|
||||
IDS_PREVIEWPANE_ITEM "Preview pane"
|
||||
IDS_PREVIEWPANE_TIP "Toggles the preview pane"
|
||||
IDS_SHOW_EXTENSIONS "Show extensions"
|
||||
IDS_SHOW_EXTENSIONS_TIP "Toggles the visibility of the file extensions"
|
||||
IDS_HIDDEN_FILES "Hidden files"
|
||||
IDS_HIDDEN_FILES_TIP "Toggles the visibility of the hidden files"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_SYSTEM_FILES "System files"
|
||||
IDS_SYSTEM_FILES_TIP "Toggles the visibility of the system files"
|
||||
IDS_ZIP_ITEM "Create zip file"
|
||||
IDS_ZIP_TIP "Creates a zip file from the selected items"
|
||||
IDS_STATUS_FONT "Status bar font"
|
||||
IDS_STATUS_FONT_TIP "Select the font to use for the status bar"
|
||||
IDS_FOLDEROPTIONS "Folder options"
|
||||
IDS_FOLDEROPTIONS_TIP "Opens the folder options dialog"
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#include "..\Lib\resource.h"
|
||||
#include "..\Lib\Lib.rc"
|
||||
1 TYPELIB "ClassicExplorer.tlb"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
11
Src/ClassicExplorer/ClassicExplorer.rgs
Normal file
11
Src/ClassicExplorer/ClassicExplorer.rgs
Normal file
@@ -0,0 +1,11 @@
|
||||
HKCR
|
||||
{
|
||||
NoRemove AppID
|
||||
{
|
||||
'%APPID%' = s 'ClassicExplorer'
|
||||
'ClassicExplorer.DLL'
|
||||
{
|
||||
val AppID = s '%APPID%'
|
||||
}
|
||||
}
|
||||
}
|
||||
418
Src/ClassicExplorer/ClassicExplorer.vcxproj
Normal file
418
Src/ClassicExplorer/ClassicExplorer.vcxproj
Normal file
@@ -0,0 +1,418 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Setup|Win32">
|
||||
<Configuration>Setup</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Setup|x64">
|
||||
<Configuration>Setup</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{9AF324B7-F786-4D85-B2E1-6E51720F874E}</ProjectGuid>
|
||||
<RootNamespace>ClassicExplorer</RootNamespace>
|
||||
<Keyword>AtlProj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseOfAtl>Static</UseOfAtl>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseOfAtl>Static</UseOfAtl>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseOfAtl>Static</UseOfAtl>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Setup|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseOfAtl>Static</UseOfAtl>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseOfAtl>Static</UseOfAtl>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseOfAtl>Static</UseOfAtl>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\Version.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\Version.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\Version.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Setup|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\Version.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\Version.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\Version.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<IgnoreImportLibrary>true</IgnoreImportLibrary>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<TargetName>$(ProjectName)32</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(Configuration)64\</OutDir>
|
||||
<IntDir>$(Configuration)64\</IntDir>
|
||||
<IgnoreImportLibrary>true</IgnoreImportLibrary>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<TargetName>$(ProjectName)64</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<IgnoreImportLibrary>true</IgnoreImportLibrary>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>$(ProjectName)32</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(Configuration)64\</OutDir>
|
||||
<IntDir>$(Configuration)64\</IntDir>
|
||||
<IgnoreImportLibrary>true</IgnoreImportLibrary>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>$(ProjectName)64</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'">
|
||||
<OutDir>$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<IgnoreImportLibrary>true</IgnoreImportLibrary>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>$(ProjectName)32</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Setup|x64'">
|
||||
<OutDir>$(Configuration)64\</OutDir>
|
||||
<IntDir>$(Configuration)64\</IntDir>
|
||||
<IgnoreImportLibrary>true</IgnoreImportLibrary>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>$(ProjectName)64</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>false</MkTypLibCompatible>
|
||||
<GenerateStublessProxies>true</GenerateStublessProxies>
|
||||
<HeaderFileName>ClassicExplorer_i.h</HeaderFileName>
|
||||
<DllDataFileName />
|
||||
<InterfaceIdentifierFileName>ClassicExplorer_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>ClassicExplorer_p.c</ProxyFileName>
|
||||
<ValidateAllParameters>true</ValidateAllParameters>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir);..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<RegisterOutput>true</RegisterOutput>
|
||||
<AdditionalDependencies>oleacc.lib;comctl32.lib;uxtheme.lib;dwmapi.lib;winmm.lib;htmlhelp.lib;wininet.lib;wintrust.lib;crypt32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>.\$(TargetName).def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>false</MkTypLibCompatible>
|
||||
<GenerateStublessProxies>true</GenerateStublessProxies>
|
||||
<HeaderFileName>ClassicExplorer_i.h</HeaderFileName>
|
||||
<DllDataFileName />
|
||||
<InterfaceIdentifierFileName>ClassicExplorer_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>ClassicExplorer_p.c</ProxyFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir);..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<RegisterOutput>true</RegisterOutput>
|
||||
<AdditionalDependencies>oleacc.lib;comctl32.lib;uxtheme.lib;dwmapi.lib;winmm.lib;htmlhelp.lib;wininet.lib;wintrust.lib;crypt32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>.\$(TargetName).def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>false</MkTypLibCompatible>
|
||||
<GenerateStublessProxies>true</GenerateStublessProxies>
|
||||
<HeaderFileName>ClassicExplorer_i.h</HeaderFileName>
|
||||
<DllDataFileName />
|
||||
<InterfaceIdentifierFileName>ClassicExplorer_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>ClassicExplorer_p.c</ProxyFileName>
|
||||
<ValidateAllParameters>true</ValidateAllParameters>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories>..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir);..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<RegisterOutput>true</RegisterOutput>
|
||||
<AdditionalDependencies>oleacc.lib;comctl32.lib;uxtheme.lib;dwmapi.lib;winmm.lib;htmlhelp.lib;wininet.lib;wintrust.lib;crypt32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>.\$(TargetName).def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>false</MkTypLibCompatible>
|
||||
<GenerateStublessProxies>true</GenerateStublessProxies>
|
||||
<HeaderFileName>ClassicExplorer_i.h</HeaderFileName>
|
||||
<DllDataFileName />
|
||||
<InterfaceIdentifierFileName>ClassicExplorer_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>ClassicExplorer_p.c</ProxyFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories>..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir);..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<RegisterOutput>true</RegisterOutput>
|
||||
<AdditionalDependencies>oleacc.lib;comctl32.lib;uxtheme.lib;dwmapi.lib;winmm.lib;htmlhelp.lib;wininet.lib;wintrust.lib;crypt32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>.\$(TargetName).def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>false</MkTypLibCompatible>
|
||||
<GenerateStublessProxies>true</GenerateStublessProxies>
|
||||
<HeaderFileName>ClassicExplorer_i.h</HeaderFileName>
|
||||
<DllDataFileName />
|
||||
<InterfaceIdentifierFileName>ClassicExplorer_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>ClassicExplorer_p.c</ProxyFileName>
|
||||
<ValidateAllParameters>true</ValidateAllParameters>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories>..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_USRDLL;BUILD_SETUP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir);..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>oleacc.lib;comctl32.lib;uxtheme.lib;dwmapi.lib;winmm.lib;htmlhelp.lib;wininet.lib;wintrust.lib;crypt32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>.\$(TargetName).def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Setup|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>false</MkTypLibCompatible>
|
||||
<GenerateStublessProxies>true</GenerateStublessProxies>
|
||||
<HeaderFileName>ClassicExplorer_i.h</HeaderFileName>
|
||||
<DllDataFileName />
|
||||
<InterfaceIdentifierFileName>ClassicExplorer_i.c</InterfaceIdentifierFileName>
|
||||
<ProxyFileName>ClassicExplorer_p.c</ProxyFileName>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories>..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_USRDLL;BUILD_SETUP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir);..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>oleacc.lib;comctl32.lib;uxtheme.lib;dwmapi.lib;winmm.lib;htmlhelp.lib;wininet.lib;wintrust.lib;crypt32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>.\$(TargetName).def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ClassicCopy.cpp" />
|
||||
<ClCompile Include="ClassicCopyExt.cpp" />
|
||||
<ClCompile Include="ClassicExplorer.cpp" />
|
||||
<ClCompile Include="ClassicExplorer_i.c">
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dllmain.cpp" />
|
||||
<ClCompile Include="ExplorerBand.cpp" />
|
||||
<ClCompile Include="ExplorerBHO.cpp" />
|
||||
<ClCompile Include="SettingsUI.cpp" />
|
||||
<ClCompile Include="ShareOverlay.cpp" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="ClassicExplorer.idl" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ClassicCopyExt.rgs" />
|
||||
<None Include="ClassicExplorer.rgs" />
|
||||
<None Include="ClassicExplorer32.def" />
|
||||
<None Include="ClassicExplorer64.def" />
|
||||
<None Include="ExplorerBand.rgs" />
|
||||
<None Include="ExplorerBHO.rgs" />
|
||||
<None Include="ExplorerL10N.ini" />
|
||||
<None Include="ShareOverlay.rgs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\Localization\English\ClassicExplorerADMX.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="ClassicCopyExt.h" />
|
||||
<ClInclude Include="ClassicExplorer_i.h" />
|
||||
<ClInclude Include="dllmain.h" />
|
||||
<ClInclude Include="ExplorerBand.h" />
|
||||
<ClInclude Include="ExplorerBHO.h" />
|
||||
<ClInclude Include="Resource.h" />
|
||||
<ClInclude Include="SettingsUI.h" />
|
||||
<ClInclude Include="ShareOverlay.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ClassicExplorer.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="..\Setup\OpenShell.ico" />
|
||||
<Image Include="up.ico" />
|
||||
<Image Include="up2Disabled.ico" />
|
||||
<Image Include="up2Hot.ico" />
|
||||
<Image Include="up2Normal.ico" />
|
||||
<Image Include="up2Pressed.ico" />
|
||||
<Image Include="upDisabled.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Lib\Lib.vcxproj">
|
||||
<Project>{d42fe717-485b-492d-884a-1999f6d51154}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
149
Src/ClassicExplorer/ClassicExplorer.vcxproj.filters
Normal file
149
Src/ClassicExplorer/ClassicExplorer.vcxproj.filters
Normal file
@@ -0,0 +1,149 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Generated Files">
|
||||
<UniqueIdentifier>{5fffcfa3-305b-4c53-b51b-b387b5702497}</UniqueIdentifier>
|
||||
<SourceControlFiles>False</SourceControlFiles>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ClassicCopy.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ClassicCopyExt.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ClassicExplorer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ExplorerBand.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ExplorerBHO.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SettingsUI.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ShareOverlay.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ClassicExplorer_i.c">
|
||||
<Filter>Generated Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="ClassicExplorer.idl">
|
||||
<Filter>Source Files</Filter>
|
||||
</Midl>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ClassicExplorer32.def">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="ClassicExplorer64.def">
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="ClassicCopyExt.rgs">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="ClassicExplorer.rgs">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="ExplorerBand.rgs">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="ExplorerBHO.rgs">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="ExplorerL10N.ini">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="ShareOverlay.rgs">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\Localization\English\ClassicExplorerADMX.txt">
|
||||
<Filter>Source Files</Filter>
|
||||
</Text>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="ClassicCopyExt.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="dllmain.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ExplorerBand.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ExplorerBHO.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SettingsUI.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ShareOverlay.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="targetver.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Resource.h">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ClassicExplorer_i.h">
|
||||
<Filter>Generated Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ClassicExplorer.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="..\Setup\OpenShell.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Image>
|
||||
<Image Include="up.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Image>
|
||||
<Image Include="up2Disabled.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Image>
|
||||
<Image Include="up2Hot.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Image>
|
||||
<Image Include="up2Normal.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Image>
|
||||
<Image Include="up2Pressed.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Image>
|
||||
<Image Include="upDisabled.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
14
Src/ClassicExplorer/ClassicExplorer32.def
Normal file
14
Src/ClassicExplorer/ClassicExplorer32.def
Normal file
@@ -0,0 +1,14 @@
|
||||
; ClassicExplorer.def : Declares the module parameters.
|
||||
|
||||
LIBRARY "ClassicExplorer32.DLL"
|
||||
|
||||
EXPORTS
|
||||
DllCanUnloadNow PRIVATE
|
||||
DllGetClassObject PRIVATE
|
||||
DllRegisterServer PRIVATE
|
||||
DllUnregisterServer PRIVATE
|
||||
DllInstall PRIVATE
|
||||
ShowExplorerSettings
|
||||
DllImportSettingsXml
|
||||
DllExportSettingsXml
|
||||
DllSaveAdmx
|
||||
13
Src/ClassicExplorer/ClassicExplorer64.def
Normal file
13
Src/ClassicExplorer/ClassicExplorer64.def
Normal file
@@ -0,0 +1,13 @@
|
||||
; ClassicExplorer.def : Declares the module parameters.
|
||||
|
||||
LIBRARY "ClassicExplorer64.DLL"
|
||||
|
||||
EXPORTS
|
||||
DllCanUnloadNow PRIVATE
|
||||
DllGetClassObject PRIVATE
|
||||
DllRegisterServer PRIVATE
|
||||
DllUnregisterServer PRIVATE
|
||||
DllInstall PRIVATE
|
||||
ShowExplorerSettings
|
||||
DllImportSettingsXml
|
||||
DllExportSettingsXml
|
||||
@@ -0,0 +1,140 @@
|
||||
// Classic Shell (c) 2009-2017, Ivo Beltchev
|
||||
// Open-Shell (c) 2017-2018, The Open-Shell Team
|
||||
// Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author
|
||||
|
||||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
#include <shlwapi.h>
|
||||
#include <Psapi.h>
|
||||
#include "StringUtils.h"
|
||||
|
||||
// Find and activate the Settings window
|
||||
static BOOL CALLBACK FindSettingsEnum( HWND hwnd, LPARAM lParam )
|
||||
{
|
||||
wchar_t className[256];
|
||||
if (!GetClassName(hwnd,className,_countof(className)) || _wcsicmp(className,L"#32770")!=0)
|
||||
return TRUE;
|
||||
DWORD process=0;
|
||||
GetWindowThreadProcessId(hwnd,&process);
|
||||
HANDLE hProcess=OpenProcess(PROCESS_QUERY_INFORMATION|PROCESS_VM_READ,FALSE,process);
|
||||
bool bFound=false;
|
||||
if (hProcess!=INVALID_HANDLE_VALUE)
|
||||
{
|
||||
wchar_t path[_MAX_PATH];
|
||||
if (GetModuleFileNameEx(hProcess,NULL,path,_countof(path)))
|
||||
{
|
||||
if (_wcsicmp(PathFindFileName(path),L"ClassicExplorerSettings.exe")==0)
|
||||
{
|
||||
SetForegroundWindow(hwnd);
|
||||
bFound=true;
|
||||
}
|
||||
}
|
||||
CloseHandle(hProcess);
|
||||
}
|
||||
return !bFound;
|
||||
}
|
||||
|
||||
HMODULE LoadClassicExplorerDll( void )
|
||||
{
|
||||
wchar_t path[_MAX_PATH];
|
||||
GetModuleFileName(NULL,path,_countof(path));
|
||||
*PathFindFileName(path)=0;
|
||||
PathAppend(path,L"ClassicExplorer32.dll");
|
||||
return LoadLibrary(path);
|
||||
}
|
||||
|
||||
// A simple program that loads ClassicExplorer32.dll and calls the ShowExplorerSettings function
|
||||
// Why not use rundll32 instead? Because it doesn't include the correct manifest for comctl32.dll
|
||||
int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpstrCmdLine, int nCmdShow )
|
||||
{
|
||||
INITCOMMONCONTROLSEX init={sizeof(init),ICC_STANDARD_CLASSES};
|
||||
InitCommonControlsEx(&init);
|
||||
|
||||
{
|
||||
const wchar_t *pXml=wcsstr(lpstrCmdLine,L"-xml ");
|
||||
if (pXml)
|
||||
{
|
||||
wchar_t xml[_MAX_PATH];
|
||||
GetToken(pXml+5,xml,_countof(xml),L" ");
|
||||
HMODULE dll=LoadClassicExplorerDll();
|
||||
if (!dll) return 1;
|
||||
typedef bool (*tImportSettingsXml)( const wchar_t *fname );
|
||||
tImportSettingsXml DllImportSettingsXml=(tImportSettingsXml)GetProcAddress(dll,"DllImportSettingsXml");
|
||||
if (!DllImportSettingsXml)
|
||||
return 1;
|
||||
CoInitialize(NULL);
|
||||
bool res=DllImportSettingsXml(xml);
|
||||
CoUninitialize();
|
||||
return res?0:1;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
const wchar_t *pBackup=wcsstr(lpstrCmdLine,L"-backup ");
|
||||
if (pBackup)
|
||||
{
|
||||
wchar_t xml[_MAX_PATH];
|
||||
GetToken(pBackup+8,xml,_countof(xml),L" ");
|
||||
|
||||
HMODULE dll=LoadClassicExplorerDll();
|
||||
if (!dll) return 1;
|
||||
typedef bool (*tExportSettingsXml)( const wchar_t *fname );
|
||||
tExportSettingsXml DllExportSettingsXml=(tExportSettingsXml)GetProcAddress(dll,"DllExportSettingsXml");
|
||||
if (!DllExportSettingsXml)
|
||||
return 1;
|
||||
|
||||
CoInitialize(NULL);
|
||||
bool res=DllExportSettingsXml(xml);
|
||||
CoUninitialize();
|
||||
return res?0:1;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef _WIN64
|
||||
const wchar_t *pSaveAdmx=wcsstr(lpstrCmdLine,L"-saveadmx ");
|
||||
if (pSaveAdmx)
|
||||
{
|
||||
wchar_t language[100];
|
||||
GetToken(pSaveAdmx+10,language,_countof(language),L" ");
|
||||
|
||||
HMODULE dll=LoadClassicExplorerDll();
|
||||
if (!dll) return 1;
|
||||
typedef bool (*tSaveAdmx)( const char *admxFile, const char *admlFile, const char *docFile, const wchar_t *language );
|
||||
tSaveAdmx SaveAdmx=(tSaveAdmx)GetProcAddress(dll,"DllSaveAdmx");
|
||||
if (!SaveAdmx || !SaveAdmx("ClassicExplorer.admx","ClassicExplorer.adml","ClassicExplorerADMX.txt",language))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
// prevent multiple instances from running on the same desktop
|
||||
// the assumption is that multiple desktops for the same user will have different name (but may repeat across users)
|
||||
wchar_t userName[256];
|
||||
DWORD len=_countof(userName);
|
||||
GetUserName(userName,&len);
|
||||
len=0;
|
||||
HANDLE desktop=GetThreadDesktop(GetCurrentThreadId());
|
||||
GetUserObjectInformation(desktop,UOI_NAME,NULL,0,&len);
|
||||
wchar_t *deskName=(wchar_t*)malloc(len);
|
||||
GetUserObjectInformation(desktop,UOI_NAME,deskName,len,&len);
|
||||
|
||||
wchar_t mutexName[1024];
|
||||
Sprintf(mutexName,_countof(mutexName),L"ClassicExplorerSettings.Mutex.%s.%s",userName,deskName);
|
||||
free(deskName);
|
||||
|
||||
HANDLE hMutex=CreateMutex(NULL,TRUE,mutexName);
|
||||
if (GetLastError()==ERROR_ALREADY_EXISTS || GetLastError()==ERROR_ACCESS_DENIED)
|
||||
{
|
||||
EnumWindows(FindSettingsEnum,0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
HMODULE dll=LoadClassicExplorerDll();
|
||||
if (!dll) return 1;
|
||||
|
||||
FARPROC proc=GetProcAddress(dll,"ShowExplorerSettings");
|
||||
if (!proc) return 2;
|
||||
|
||||
proc();
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
|
||||
<assemblyIdentity
|
||||
version="1.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
name="Open-Shell.Menu"
|
||||
type="win32"
|
||||
/>
|
||||
<description>Classic Explorer Settings</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<asmv3:application>
|
||||
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
||||
<dpiAware>true</dpiAware>
|
||||
</asmv3:windowsSettings>
|
||||
</asmv3:application>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Windows Vista -->
|
||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
||||
<!-- Windows 7 -->
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||
<!-- Windows 8 -->
|
||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||
<!-- Windows 8.1 -->
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||
<!-- Windows 10 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||
</application>
|
||||
</compatibility>
|
||||
</assembly>
|
||||
@@ -0,0 +1,111 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "winres.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
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_APPICON ICON "..\\..\\Setup\\OpenShell.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION _PRODUCT_VERSION
|
||||
PRODUCTVERSION _PRODUCT_VERSION
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Open-Shell"
|
||||
VALUE "FileDescription", "Classic Explorer Settings"
|
||||
VALUE "FileVersion", _PRODUCT_VERSION_STR
|
||||
VALUE "InternalName", "ClassicExplorerSettings"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2017-2018, The Open-Shell Team"
|
||||
VALUE "OriginalFilename", "ClassicExplorerSettings.exe"
|
||||
VALUE "ProductName", "Open-Shell"
|
||||
VALUE "ProductVersion", _PRODUCT_VERSION_STR
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
@@ -0,0 +1,171 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Setup|Win32">
|
||||
<Configuration>Setup</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{E93271C8-0252-4A08-8227-1978C64C2D34}</ProjectGuid>
|
||||
<RootNamespace>ClassicExplorerSettings</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseOfAtl>Static</UseOfAtl>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseOfAtl>Static</UseOfAtl>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<UseOfAtl>Static</UseOfAtl>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\Version.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\Version.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\Version.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>..\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>..\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'">
|
||||
<OutDir>..\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>shlwapi.lib;comctl32.lib;psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>shlwapi.lib;comctl32.lib;psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;BUILD_SETUP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>shlwapi.lib;comctl32.lib;psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ClassicExplorerSettings.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Manifest Include="ClassicExplorerSettings.manifest" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ClassicExplorerSettings.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="..\..\Setup\OpenShell.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="resource.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Lib\Lib.vcxproj">
|
||||
<Project>{d42fe717-485b-492d-884a-1999f6d51154}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\ClassicExplorer.vcxproj">
|
||||
<Project>{9af324b7-f786-4d85-b2e1-6e51720f874e}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
16
Src/ClassicExplorer/ClassicExplorerSettings/resource.h
Normal file
16
Src/ClassicExplorer/ClassicExplorerSettings/resource.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by ClassicExplorerSettings.rc
|
||||
//
|
||||
#define IDI_APPICON 101
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 102
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
1573
Src/ClassicExplorer/ExplorerBHO.cpp
Normal file
1573
Src/ClassicExplorer/ExplorerBHO.cpp
Normal file
File diff suppressed because it is too large
Load Diff
191
Src/ClassicExplorer/ExplorerBHO.h
Normal file
191
Src/ClassicExplorer/ExplorerBHO.h
Normal file
@@ -0,0 +1,191 @@
|
||||
// Classic Shell (c) 2009-2017, Ivo Beltchev
|
||||
// Open-Shell (c) 2017-2018, The Open-Shell Team
|
||||
// Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author
|
||||
|
||||
// ExplorerBHO.h : Declaration of the CExplorerBHO
|
||||
|
||||
#pragma once
|
||||
#include "resource.h" // main symbols
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
#include "ClassicExplorer_i.h"
|
||||
#include "ComHelper.h"
|
||||
#include <shdispid.h>
|
||||
|
||||
|
||||
// CExplorerBHO
|
||||
|
||||
class ATL_NO_VTABLE CExplorerBHO :
|
||||
public CComObjectRootEx<CComSingleThreadModel>,
|
||||
public CComCoClass<CExplorerBHO, &CLSID_ExplorerBHO>,
|
||||
public IObjectWithSiteImpl<CExplorerBHO>,
|
||||
public IDispatchImpl<IExplorerBHO, &IID_IExplorerBHO, &LIBID_ClassicExplorerLib, /*wMajor =*/ 1, /*wMinor =*/ 0>,
|
||||
public IDispEventImpl<1,CExplorerBHO,&DIID_DWebBrowserEvents2,&LIBID_SHDocVw,1,1>,
|
||||
public IDispEventImpl<2,CExplorerBHO,&DIID_DShellFolderViewEvents,&LIBID_Shell32,1,0>
|
||||
{
|
||||
public:
|
||||
typedef IDispEventImpl<1,CExplorerBHO,&DIID_DWebBrowserEvents2,&LIBID_SHDocVw,1,1> DispEvent1;
|
||||
typedef IDispEventImpl<2,CExplorerBHO,&DIID_DShellFolderViewEvents,&LIBID_Shell32,1,0> DispEvent2;
|
||||
CExplorerBHO()
|
||||
{
|
||||
m_bResetStatus=true;
|
||||
m_bForceRefresh=false;
|
||||
m_bRemapBands=false;
|
||||
m_bNoBreadcrumbs=false;
|
||||
m_TreeItemHeight=0;
|
||||
m_CurIcon=NULL;
|
||||
m_CurPath[0]=0;
|
||||
m_Rebar=NULL;
|
||||
m_TopWindow=NULL;
|
||||
m_Breadcrumbs=NULL;
|
||||
m_Progress=NULL;
|
||||
m_Status=m_Status8=NULL;
|
||||
m_DUIView=NULL;
|
||||
m_Hook=m_HookKbd=NULL;
|
||||
m_Balloon=NULL;
|
||||
m_UpButtonIndex=0;
|
||||
m_UpHotkey=0;
|
||||
m_IconNormal=m_IconHot=m_IconPressed=m_IconDisabled=NULL;
|
||||
m_NavigateMsg=0;
|
||||
m_AltD=0;
|
||||
m_FileSizeWidth=0;
|
||||
m_ZoneWidth=0;
|
||||
}
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_EXPLORERBHO)
|
||||
|
||||
BEGIN_SINK_MAP( CExplorerBHO )
|
||||
SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_DOCUMENTCOMPLETE, OnDocumentComplete)
|
||||
SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_ONQUIT, OnQuit)
|
||||
SINK_ENTRY_EX(2, DIID_DShellFolderViewEvents, DISPID_SELECTIONCHANGED, OnSelChanged)
|
||||
END_SINK_MAP()
|
||||
|
||||
BEGIN_COM_MAP(CExplorerBHO)
|
||||
COM_INTERFACE_ENTRY(IExplorerBHO)
|
||||
COM_INTERFACE_ENTRY(IObjectWithSite)
|
||||
COM_INTERFACE_ENTRY(IDispatch)
|
||||
END_COM_MAP()
|
||||
|
||||
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
HRESULT FinalConstruct()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void FinalRelease()
|
||||
{
|
||||
}
|
||||
|
||||
// Navigation pane styles
|
||||
enum
|
||||
{
|
||||
STYLE_CLASSIC=0, // use classic XP style
|
||||
STYLE_SIMPLE=1, // use simple XP style
|
||||
STYLE_VISTA=2, // no change
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
SHOW_INFOTIP=1,
|
||||
SHOW_FREE_SPACE=2,
|
||||
SHOW_ZONE=4,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
PART_TEXT,
|
||||
PART_SIZE,
|
||||
PART_ZONE,
|
||||
};
|
||||
public:
|
||||
// IObjectWithSite
|
||||
STDMETHOD(SetSite)(IUnknown *pUnkSite);
|
||||
|
||||
// DWebBrowserEvents2
|
||||
STDMETHOD(OnDocumentComplete)( IDispatch *pDisp, VARIANT *URL );
|
||||
STDMETHOD(OnQuit)( void );
|
||||
|
||||
// DShellFolderViewEvents
|
||||
STDMETHOD(OnSelChanged)( void );
|
||||
|
||||
private:
|
||||
// Super-class the toolbar, so it has a different class name. A program called Folder Menu 3 looks for specific controls in Explorer,
|
||||
// and our extra toolbar throws it off
|
||||
class CToolbar: public CWindowImpl<CToolbar>
|
||||
{
|
||||
public:
|
||||
DECLARE_WND_SUPERCLASS(L"OpenShell.UpButton",TOOLBARCLASSNAME);
|
||||
|
||||
BEGIN_MSG_MAP( CToolbar )
|
||||
END_MSG_MAP()
|
||||
};
|
||||
|
||||
CComPtr<IShellBrowser> m_pBrowser;
|
||||
CComPtr<IWebBrowser2> m_pWebBrowser;
|
||||
CComPtr<IDispatch> m_pWebDoc;
|
||||
CComPtr<IInternetZoneManager> m_pZoneManager;
|
||||
CComPtr<IInternetSecurityManager> m_pSecurityManager;
|
||||
std::map<unsigned int,HICON> m_ZoneIconCache;
|
||||
bool m_bResetStatus;
|
||||
bool m_bForceRefresh;
|
||||
bool m_bNoBreadcrumbs;
|
||||
bool m_bRemapBands;
|
||||
int m_TreeItemHeight;
|
||||
int m_UpButtonIndex;
|
||||
int m_UpHotkey;
|
||||
CToolbar m_Toolbar;
|
||||
HWND m_TopWindow;
|
||||
HWND m_Rebar;
|
||||
HWND m_Balloon;
|
||||
HICON m_IconNormal, m_IconHot, m_IconPressed, m_IconDisabled;
|
||||
HICON m_CurIcon;
|
||||
CAbsolutePidl m_CurPidl;
|
||||
wchar_t m_CurPath[1024]; // the current path
|
||||
CWindow m_ComboBox;
|
||||
CAbsolutePidl m_NavigatePidl;
|
||||
UINT m_NavigateMsg; // private message that is posted to the progress bar to navigate to m_NavigatePidl
|
||||
HHOOK m_Hook;
|
||||
HHOOK m_HookKbd;
|
||||
HWND m_Breadcrumbs;
|
||||
HWND m_Progress;
|
||||
HWND m_Status, m_Status8;
|
||||
HWND m_DUIView;
|
||||
int m_FileSizeWidth;
|
||||
int m_ZoneWidth;
|
||||
char m_AltD;
|
||||
|
||||
struct ComboItem
|
||||
{
|
||||
PIDLIST_ABSOLUTE pidl;
|
||||
int indent;
|
||||
CString name;
|
||||
CString sortName;
|
||||
|
||||
bool operator<( const ComboItem &item ) { return _wcsicmp(sortName,item.sortName)<0; }
|
||||
};
|
||||
std::vector<ComboItem> m_ComboItems;
|
||||
void ClearComboItems( void );
|
||||
bool GetStatusText( wchar_t *buf, int size, const wchar_t *oldText, bool bShowTip, bool bShowSpace );
|
||||
void GetFileSize( wchar_t *buf, int size );
|
||||
|
||||
static int s_AutoNavDelay;
|
||||
|
||||
static LRESULT CALLBACK HookExplorer( int code, WPARAM wParam, LPARAM lParam );
|
||||
static LRESULT CALLBACK HookKeyboard( int code, WPARAM wParam, LPARAM lParam );
|
||||
static LRESULT CALLBACK SubclassTreeParentProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData );
|
||||
static LRESULT CALLBACK SubclassTreeProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData );
|
||||
static LRESULT CALLBACK SubclassStatusProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData );
|
||||
static LRESULT CALLBACK SubclassStatusProc8( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData );
|
||||
static LRESULT CALLBACK SubclassDUIViewProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData );
|
||||
static LRESULT CALLBACK SubclassRebarProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData );
|
||||
static LRESULT CALLBACK SubclassBreadcrumbProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData );
|
||||
static LRESULT CALLBACK SubclassProgressProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData );
|
||||
};
|
||||
|
||||
OBJECT_ENTRY_AUTO(__uuidof(ExplorerBHO), CExplorerBHO)
|
||||
|
||||
bool ShowTreeProperties( HWND hwndTree );
|
||||
59
Src/ClassicExplorer/ExplorerBHO.rgs
Normal file
59
Src/ClassicExplorer/ExplorerBHO.rgs
Normal file
@@ -0,0 +1,59 @@
|
||||
HKCR
|
||||
{
|
||||
ClassicExplorer.ExplorerBHO.1 = s 'ExplorerBHO Class'
|
||||
{
|
||||
CLSID = s '{449D0D6E-2412-4E61-B68F-1CB625CD9E52}'
|
||||
}
|
||||
ClassicExplorer.ExplorerBHO = s 'ExplorerBHO Class'
|
||||
{
|
||||
CLSID = s '{449D0D6E-2412-4E61-B68F-1CB625CD9E52}'
|
||||
CurVer = s 'ClassicExplorer.ExplorerBHO.1'
|
||||
}
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {449D0D6E-2412-4E61-B68F-1CB625CD9E52} = s 'ExplorerBHO Class'
|
||||
{
|
||||
ProgID = s 'ClassicExplorer.ExplorerBHO.1'
|
||||
VersionIndependentProgID = s 'ClassicExplorer.ExplorerBHO'
|
||||
ForceRemove 'Programmable'
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
'TypeLib' = s '{BF8D124A-A4E0-402F-8152-4EF377E62586}'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HKLM
|
||||
{
|
||||
NoRemove SOFTWARE
|
||||
{
|
||||
NoRemove Microsoft
|
||||
{
|
||||
NoRemove Windows
|
||||
{
|
||||
NoRemove CurrentVersion
|
||||
{
|
||||
NoRemove Explorer
|
||||
{
|
||||
NoRemove 'Browser Helper Objects'
|
||||
{
|
||||
ForceRemove '{449D0D6E-2412-4E61-B68F-1CB625CD9E52}'
|
||||
}
|
||||
}
|
||||
NoRemove Policies
|
||||
{
|
||||
NoRemove Ext
|
||||
{
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove val {449D0D6E-2412-4E61-B68F-1CB625CD9E52} = s '2'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2285
Src/ClassicExplorer/ExplorerBand.cpp
Normal file
2285
Src/ClassicExplorer/ExplorerBand.cpp
Normal file
File diff suppressed because it is too large
Load Diff
246
Src/ClassicExplorer/ExplorerBand.h
Normal file
246
Src/ClassicExplorer/ExplorerBand.h
Normal file
@@ -0,0 +1,246 @@
|
||||
// Classic Shell (c) 2009-2017, Ivo Beltchev
|
||||
// Open-Shell (c) 2017-2018, The Open-Shell Team
|
||||
// Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author
|
||||
|
||||
// ExplorerBand.h : Declaration of the CExplorerBand
|
||||
|
||||
#pragma once
|
||||
#include "resource.h"
|
||||
#include "ClassicExplorer_i.h"
|
||||
#include "SettingsParser.h"
|
||||
#include <vector>
|
||||
|
||||
class CBandWindow: public CWindowImpl<CBandWindow>
|
||||
{
|
||||
public:
|
||||
|
||||
enum
|
||||
{
|
||||
ID_LAST=-1,
|
||||
ID_SEPARATOR=0,
|
||||
|
||||
// standard toolbar commands
|
||||
ID_SETTINGS=1,
|
||||
ID_GOUP,
|
||||
ID_CUT,
|
||||
ID_COPY,
|
||||
ID_PASTE,
|
||||
ID_PASTE_SHORTCUT,
|
||||
ID_DELETE,
|
||||
ID_PROPERTIES,
|
||||
ID_EMAIL,
|
||||
|
||||
ID_MOVETO,
|
||||
ID_COPYTO,
|
||||
ID_UNDO,
|
||||
ID_REDO,
|
||||
ID_SELECTALL,
|
||||
ID_DESELECT,
|
||||
ID_INVERT,
|
||||
ID_GOBACK,
|
||||
ID_GOFORWARD,
|
||||
ID_REFRESH,
|
||||
ID_STOP,
|
||||
ID_RENAME,
|
||||
ID_NEWFOLDER,
|
||||
ID_ZIPFOLDER,
|
||||
ID_NAVPANE,
|
||||
ID_DETAILSPANE,
|
||||
ID_PREVIEWPANE,
|
||||
ID_MAP_DRIVE,
|
||||
ID_DISCONNECT,
|
||||
ID_CUSTOMIZEFOLDER,
|
||||
ID_FOLDEROPTIONS,
|
||||
ID_VIEW_TILES,
|
||||
ID_VIEW_DETAILS,
|
||||
ID_VIEW_LIST,
|
||||
ID_VIEW_CONTENT,
|
||||
ID_VIEW_ICONS1,
|
||||
ID_VIEW_ICONS2,
|
||||
ID_VIEW_ICONS3,
|
||||
ID_VIEW_ICONS4,
|
||||
ID_SHOW_EXTENSIONS,
|
||||
ID_HIDDEN_FILES,
|
||||
ID_SYSTEM_FILES,
|
||||
|
||||
ID_CUSTOM=100,
|
||||
};
|
||||
|
||||
DECLARE_WND_CLASS(L"OpenShell.CBandWindow")
|
||||
|
||||
enum {
|
||||
BWM_UPDATEBUTTONS=WM_USER,
|
||||
BWM_UPDATETOOLBAR,
|
||||
};
|
||||
|
||||
BEGIN_MSG_MAP( CBandWindow )
|
||||
MESSAGE_HANDLER( WM_CREATE, OnCreate )
|
||||
MESSAGE_HANDLER( WM_DESTROY, OnDestroy )
|
||||
MESSAGE_HANDLER( WM_CLEAR, OnUpdateUI )
|
||||
MESSAGE_HANDLER( WM_COMMAND, OnCommand )
|
||||
MESSAGE_HANDLER( BWM_UPDATEBUTTONS, OnUpdateButtons )
|
||||
MESSAGE_HANDLER( BWM_UPDATETOOLBAR, OnUpdateToolbar )
|
||||
NOTIFY_CODE_HANDLER( NM_RCLICK, OnRClick )
|
||||
NOTIFY_CODE_HANDLER( TBN_GETINFOTIP, OnGetInfoTip )
|
||||
NOTIFY_CODE_HANDLER( TBN_DROPDOWN, OnDropDown )
|
||||
NOTIFY_CODE_HANDLER( RBN_CHEVRONPUSHED, OnChevron )
|
||||
END_MSG_MAP()
|
||||
|
||||
CBandWindow( void ) { m_ImgEnabled=m_ImgDisabled=NULL; m_MenuIconSize=0; }
|
||||
|
||||
HWND GetToolbar( void ) { return m_Toolbar.m_hWnd; }
|
||||
void SetBrowsers( IShellBrowser *pBrowser, IWebBrowser2 *pWebBrowser );
|
||||
void Clear( void );
|
||||
void UpdateToolbar( void );
|
||||
void EnableButton( int cmd, bool bEnable );
|
||||
void CheckButton( int cmd, bool bCheck );
|
||||
bool HasPanes( void ) const;
|
||||
bool HasFolderSettings( void ) const;
|
||||
|
||||
protected:
|
||||
// Handler prototypes:
|
||||
// LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
// LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
||||
// LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
|
||||
LRESULT OnCreate( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled );
|
||||
LRESULT OnDestroy( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled );
|
||||
LRESULT OnUpdateUI( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled );
|
||||
LRESULT OnCommand( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled );
|
||||
LRESULT OnUpdateButtons( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled );
|
||||
LRESULT OnUpdateToolbar( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled );
|
||||
LRESULT OnRClick( int idCtrl, LPNMHDR pnmh, BOOL& bHandled );
|
||||
LRESULT OnGetInfoTip( int idCtrl, LPNMHDR pnmh, BOOL& bHandled );
|
||||
LRESULT OnDropDown( int idCtrl, LPNMHDR pnmh, BOOL& bHandled );
|
||||
LRESULT OnChevron( int idCtrl, LPNMHDR pnmh, BOOL& bHandled );
|
||||
|
||||
private:
|
||||
CWindow m_Toolbar;
|
||||
CWindow m_TreeParent;
|
||||
CComPtr<IShellBrowser> m_pBrowser;
|
||||
CComPtr<IWebBrowser2> m_pWebBrowser;
|
||||
CComPtr<IPropertyBag> m_pBrowserBag;
|
||||
HIMAGELIST m_ImgEnabled;
|
||||
HIMAGELIST m_ImgDisabled;
|
||||
int m_MenuIconSize;
|
||||
|
||||
struct StdToolbarItem
|
||||
{
|
||||
int id;
|
||||
const wchar_t *command;
|
||||
const wchar_t *link;
|
||||
const wchar_t *label; // text on the button
|
||||
const wchar_t *tip; // default tooltip
|
||||
const wchar_t *iconPath;
|
||||
const wchar_t *iconPathD;
|
||||
CString regName; // name of the registry value to check for enabled/checked state
|
||||
CString labelString, tipString; // additional storage for the strings
|
||||
const StdToolbarItem *submenu;
|
||||
mutable HBITMAP menuIcon;
|
||||
mutable HBITMAP menuIconD;
|
||||
mutable CString menuText;
|
||||
mutable bool bIconLoaded; // the menu icon is loaded
|
||||
bool bDisabled;
|
||||
bool bChecked;
|
||||
};
|
||||
|
||||
std::vector<StdToolbarItem> m_Items;
|
||||
std::vector<TBBUTTON> m_Buttons;
|
||||
CSettingsParser m_Parser;
|
||||
|
||||
void ParseToolbar( void );
|
||||
void ParseToolbarItem( const wchar_t *name, StdToolbarItem &item );
|
||||
void SendShellTabCommand( int command );
|
||||
HMENU CreateDropMenu( const StdToolbarItem *pItem );
|
||||
HMENU CreateDropMenuRec( const StdToolbarItem *pItem, std::vector<HMODULE> &modules, HMODULE hShell32 );
|
||||
void SendEmail( void );
|
||||
void SendToZip( void );
|
||||
void NewFolder( void );
|
||||
void ExecuteCommandFile( const wchar_t *pText );
|
||||
void ExecuteCustomCommand( const wchar_t *pCommand );
|
||||
void ViewByProperty( IFolderView2 *pView, const wchar_t *pProperty, bool bGroup );
|
||||
void UpdateBag( void );
|
||||
void UpdateFolderSettings( void );
|
||||
|
||||
static LRESULT CALLBACK ToolbarSubclassProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData );
|
||||
static HRESULT __stdcall BagWriteHook( IPropertyBag *pThis, LPCOLESTR pszPropName, VARIANT *pVar );
|
||||
};
|
||||
|
||||
|
||||
// CExplorerBand
|
||||
|
||||
class ATL_NO_VTABLE CExplorerBand :
|
||||
public CComObjectRootEx<CComSingleThreadModel>,
|
||||
public CComCoClass<CExplorerBand,&CLSID_ExplorerBand>,
|
||||
public IObjectWithSiteImpl<CExplorerBand>,
|
||||
public IDeskBand,
|
||||
public IDispEventImpl<1,CExplorerBand,&DIID_DWebBrowserEvents2,&LIBID_SHDocVw,1,1>
|
||||
{
|
||||
public:
|
||||
CExplorerBand( void );
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_EXPLORERBAND)
|
||||
|
||||
BEGIN_SINK_MAP( CExplorerBand )
|
||||
SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_NAVIGATECOMPLETE2, OnNavigateComplete)
|
||||
SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_COMMANDSTATECHANGE, OnCommandStateChange)
|
||||
SINK_ENTRY_EX(1, DIID_DWebBrowserEvents2, DISPID_ONQUIT, OnQuit)
|
||||
END_SINK_MAP()
|
||||
|
||||
BEGIN_COM_MAP(CExplorerBand)
|
||||
COM_INTERFACE_ENTRY( IOleWindow )
|
||||
COM_INTERFACE_ENTRY( IObjectWithSite )
|
||||
COM_INTERFACE_ENTRY_IID( IID_IDockingWindow, IDockingWindow )
|
||||
COM_INTERFACE_ENTRY_IID( IID_IDeskBand, IDeskBand )
|
||||
END_COM_MAP()
|
||||
|
||||
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
HRESULT FinalConstruct()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void FinalRelease()
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
// IDeskBand
|
||||
STDMETHOD(GetBandInfo)( DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO* pdbi );
|
||||
|
||||
// IObjectWithSite
|
||||
STDMETHOD(SetSite)( IUnknown* pUnkSite );
|
||||
|
||||
// IOleWindow
|
||||
STDMETHOD(GetWindow)( HWND* phwnd );
|
||||
STDMETHOD(ContextSensitiveHelp)( BOOL fEnterMode );
|
||||
|
||||
// IDockingWindow
|
||||
STDMETHOD(CloseDW)( unsigned long dwReserved );
|
||||
STDMETHOD(ResizeBorderDW)( const RECT* prcBorder, IUnknown* punkToolbarSite, BOOL fReserved );
|
||||
STDMETHOD(ShowDW)( BOOL fShow );
|
||||
|
||||
// DWebBrowserEvents2
|
||||
STDMETHOD(OnNavigateComplete)( IDispatch *pDisp, VARIANT *URL );
|
||||
STDMETHOD(OnCommandStateChange)( long Command, VARIANT_BOOL Enable );
|
||||
STDMETHOD(OnQuit)( void );
|
||||
|
||||
protected:
|
||||
bool m_bSubclassRebar; // the rebar needs subclassing
|
||||
bool m_bSubclassedRebar; // the rebar is subclassed
|
||||
bool m_bBandNewLine; // our band is on a new line (has RBBS_BREAK style)
|
||||
bool m_bHandleSetInfo; // mess with the RB_SETBANDINFO message
|
||||
CBandWindow m_BandWindow;
|
||||
CComPtr<IWebBrowser2> m_pWebBrowser;
|
||||
HWND m_TopWindow;
|
||||
|
||||
static LRESULT CALLBACK RebarSubclassProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData );
|
||||
static LRESULT CALLBACK ParentSubclassProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData );
|
||||
|
||||
friend class CBandWindow;
|
||||
};
|
||||
|
||||
OBJECT_ENTRY_AUTO(__uuidof(ExplorerBand), CExplorerBand)
|
||||
59
Src/ClassicExplorer/ExplorerBand.rgs
Normal file
59
Src/ClassicExplorer/ExplorerBand.rgs
Normal file
@@ -0,0 +1,59 @@
|
||||
HKCR
|
||||
{
|
||||
ClassicExplorer.ExplorerBand.1 = s 'ExplorerBand Class'
|
||||
{
|
||||
CLSID = s '{553891B7-A0D5-4526-BE18-D3CE461D6310}'
|
||||
}
|
||||
ClassicExplorer.ExplorerBand = s 'ExplorerBand Class'
|
||||
{
|
||||
CLSID = s '{553891B7-A0D5-4526-BE18-D3CE461D6310}'
|
||||
CurVer = s 'ClassicExplorer.ExplorerBand.1'
|
||||
}
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {553891B7-A0D5-4526-BE18-D3CE461D6310} = s 'Classic Explorer Bar'
|
||||
{
|
||||
ProgID = s 'ClassicExplorer.ExplorerBand.1'
|
||||
VersionIndependentProgID = s 'ClassicExplorer.ExplorerBand'
|
||||
ForceRemove 'Programmable'
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
'TypeLib' = s '{BF8D124A-A4E0-402F-8152-4EF377E62586}'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HKLM
|
||||
{
|
||||
NoRemove Software
|
||||
{
|
||||
NoRemove Microsoft
|
||||
{
|
||||
NoRemove 'Internet Explorer'
|
||||
{
|
||||
NoRemove Toolbar
|
||||
{
|
||||
ForceRemove val {553891B7-A0D5-4526-BE18-D3CE461D6310} = b ''
|
||||
}
|
||||
}
|
||||
NoRemove Windows
|
||||
{
|
||||
NoRemove CurrentVersion
|
||||
{
|
||||
NoRemove Policies
|
||||
{
|
||||
NoRemove Ext
|
||||
{
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove val {553891B7-A0D5-4526-BE18-D3CE461D6310} = s '2'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2599
Src/ClassicExplorer/ExplorerL10N.ini
Normal file
2599
Src/ClassicExplorer/ExplorerL10N.ini
Normal file
File diff suppressed because it is too large
Load Diff
765
Src/ClassicExplorer/SettingsUI.cpp
Normal file
765
Src/ClassicExplorer/SettingsUI.cpp
Normal file
@@ -0,0 +1,765 @@
|
||||
// Classic Shell (c) 2009-2017, Ivo Beltchev
|
||||
// Open-Shell (c) 2017-2018, The Open-Shell Team
|
||||
// Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "ExplorerBand.h"
|
||||
#include "ExplorerBHO.h"
|
||||
#include "SettingsUI.h"
|
||||
#include "Settings.h"
|
||||
#include "SettingsUIHelper.h"
|
||||
#include "LanguageSettingsHelper.h"
|
||||
#include "ResourceHelper.h"
|
||||
#include "Translations.h"
|
||||
#include "resource.h"
|
||||
#include "dllmain.h"
|
||||
#include <dwmapi.h>
|
||||
|
||||
enum
|
||||
{
|
||||
SETTINGS_STYLE_WIN7=1,
|
||||
SETTINGS_STYLE_WIN8=2,
|
||||
SETTINGS_STYLE_MASK=SETTINGS_STYLE_WIN7|SETTINGS_STYLE_WIN8,
|
||||
};
|
||||
|
||||
static const CStdCommand g_StdCommands[]={
|
||||
{L"SEPARATOR",IDS_SEPARATOR_ITEM,IDS_SEPARATOR_TIP},
|
||||
{L"up",IDS_UP_ITEM,IDS_UP_TIP,L"UpItem",NULL,L"$Toolbar.GoUp",L",2",NULL,0,L",3"},
|
||||
{L"cut",IDS_CUT_ITEM,IDS_CUT_TIP,L"CutItem",NULL,L"$Toolbar.Cut",L"shell32.dll,16762"},
|
||||
{L"copy",IDS_COPY_ITEM,IDS_COPY_TIP,L"CopyItem",NULL,L"$Toolbar.Copy",L"shell32.dll,243"},
|
||||
{L"paste",IDS_PASTE_ITEM,IDS_PASTE_TIP,L"PasteItem",NULL,L"$Toolbar.Paste",L"shell32.dll,16763"},
|
||||
{L"paste_shortcut",IDS_PASTE_LNK_ITEM,IDS_PASTE_SHORTCUT_TIP,L"PasteShortcutItem",NULL,L"$Toolbar.PasteShortcut",L"shell32.dll,16763",NULL,SETTINGS_STYLE_WIN7},
|
||||
{L"paste_shortcut",IDS_PASTE_LNK_ITEM,IDS_PASTE_SHORTCUT_TIP,L"PasteShortcutItem",NULL,L"$Toolbar.PasteShortcut",L"imageres.dll,5301",NULL,SETTINGS_STYLE_WIN8},
|
||||
{L"delete",IDS_DELETE_ITEM,IDS_DELETE_TIP,L"DeleteItem",NULL,L"$Toolbar.Delete",L"shell32.dll,240"},
|
||||
{L"properties",IDS_PROPERTIES_ITEM,IDS_PROPERTIES_TIP,L"PropertiesItem",NULL,L"$Toolbar.Properties",L"shell32.dll,253"},
|
||||
{L"email",IDS_EMAIL_ITEM,IDS_EMAIL_TIP,L"EmailItem",NULL,L"$Toolbar.Email",L"shell32.dll,265"},
|
||||
{L"settings",IDS_SETTINGS_ITEM,IDS_SETTINGS_TIP,L"SettingsItem",NULL,L"$Toolbar.Settings",L",1"},
|
||||
{L"refresh",IDS_REFRESH_ITEM,IDS_REFRESH_TIP,L"RefreshItem",NULL,L"$Toolbar.Refresh",L"shell32.dll,16739"},
|
||||
{L"stop",IDS_STOP_ITEM,IDS_STOP_TIP,L"StopItem",NULL,L"$Toolbar.Stop",L"imageres.dll,98"},
|
||||
{L"rename",IDS_RENAME_ITEM,IDS_RENAME_TIP,L"RenameItem",NULL,L"$Toolbar.Rename",L"shell32.dll,242"},
|
||||
{L"customizefolder",IDS_CUSTOMIZE_ITEM,IDS_CUSTOMIZEFOLDER_TIP,L"CustomizeFolderItem",NULL,L"$Toolbar.CustomizeFolder",L"shell32.dll,274"},
|
||||
{L"folderoptions",IDS_FOLDEROPTIONS,IDS_FOLDEROPTIONS_TIP,L"FolderOptionsItem",NULL,L"$Toolbar.FolderOptions",L"imageres.dll,166"},
|
||||
{L"newfolder",IDS_NEWFOLDER_ITEM,IDS_NEWFOLDER_TIP,L"NewFolderItem",NULL,L"$Toolbar.NewFolder",L"shell32.dll,319"},
|
||||
{L"zipfolder",IDS_ZIP_ITEM,IDS_ZIP_TIP,L"ZipItem",NULL,L"$Toolbar.ZipFolder",L"imageres.dll,174"},
|
||||
{L"nav_pane",IDS_NAVPANE_ITEM,IDS_NAVPANE_TIP,L"NavPaneItem",NULL,L"$Toolbar.NavigationPane",L"shell32.dll,16755"},
|
||||
{L"details_pane",IDS_DETAILSPANE_ITEM,IDS_DETAILSPANE_TIP,L"DetailsPaneItem",NULL,L"$Toolbar.DetailsPane",L"shell32.dll,16759",NULL,SETTINGS_STYLE_WIN7},
|
||||
{L"details_pane",IDS_DETAILSPANE_ITEM,IDS_DETAILSPANE_TIP,L"DetailsPaneItem",NULL,L"$Toolbar.DetailsPane",L"shell32.dll,16814",NULL,SETTINGS_STYLE_WIN8},
|
||||
{L"preview_pane",IDS_PREVIEWPANE_ITEM,IDS_PREVIEWPANE_TIP,L"PreviewPaneItem",NULL,L"$Toolbar.PreviewPane",L"shell32.dll,16757"},
|
||||
{L"mapdrive",IDS_MAP_DRIVE_ITEM,IDS_MAP_DRIVE_TIP,L"MapDriveItem",NULL,L"$Toolbar.MapDrive",L"shell32.dll,16779"},
|
||||
{L"disconnect",IDS_DISCONNECT_ITEM,IDS_DISCONNECT_DRIVE_TIP,L"DisconnectItem",NULL,L"$Toolbar.DisconnectDrive",L"shell32.dll,11"},
|
||||
{L"viewtiles",IDS_VIEWTILES_ITEM,IDS_VIEWTILES_TIP,L"TilesItem",NULL,L"$Toolbar.Tiles",L"shell32.dll,62999"},
|
||||
{L"viewdetails",IDS_VIEWDETAILS_ITEM,IDS_VIEWDEATAILS_TIP,L"DetailsItem",NULL,L"$Toolbar.Details",L"shell32.dll,62998"},
|
||||
{L"viewlist",IDS_VIEWLIST_ITEM,IDS_VIEWLIST_TIP,L"ListItem",NULL,L"$Toolbar.List",L"shell32.dll,63000"},
|
||||
{L"viewcontent",IDS_VIEWCONTENT_ITEM,IDS_VIEWCONTENT_TIP,L"ContentItem",NULL,L"$Toolbar.Content",L"shell32.dll,63011"},
|
||||
{L"viewicons_small",IDS_VIEWICONS1_ITEM,IDS_VIEWICONS1_TIP,L"Icons1Item",NULL,L"$Toolbar.Small",L"shell32.dll,63010"},
|
||||
{L"viewicons_medium",IDS_VIEWICONS2_ITEM,IDS_VIEWICONS2_TIP,L"Icons2Item",NULL,L"$Toolbar.Medium",L"shell32.dll,63009"},
|
||||
{L"viewicons_large",IDS_VIEWICONS3_ITEM,IDS_VIEWICONS3_TIP,L"Icons3Item",NULL,L"$Toolbar.Large",L"shell32.dll,63008"},
|
||||
{L"viewicons_extralarge",IDS_VIEWICONS4_ITEM,IDS_VIEWICONS4_TIP,L"Icons4Item",NULL,L"$Toolbar.ExtraLarge",L"shell32.dll,63001"},
|
||||
{L"moveto",IDS_MOVETO_ITEM,IDS_MOVETO_TIP,L"MoveToItem",NULL,L"$Toolbar.MoveTo",L"",NULL,SETTINGS_STYLE_WIN7},
|
||||
{L"moveto",IDS_MOVETO_ITEM,IDS_MOVETO_TIP,L"MoveToItem",NULL,L"$Toolbar.MoveTo",L"imageres.dll,5303",NULL,SETTINGS_STYLE_WIN8},
|
||||
{L"copyto",IDS_COPYTO_ITEM,IDS_COPYTO_TIP,L"CopyToItem",NULL,L"$Toolbar.CopyTo",L"",NULL,SETTINGS_STYLE_WIN7},
|
||||
{L"copyto",IDS_COPYTO_ITEM,IDS_COPYTO_TIP,L"CopyToItem",NULL,L"$Toolbar.CopyTo",L"imageres.dll,5304",NULL,SETTINGS_STYLE_WIN8},
|
||||
{L"undo",IDS_UNDO_ITEM,IDS_UNDO_TIP,L"UndoItem",NULL,L"$Toolbar.Undo",L"",NULL,SETTINGS_STYLE_WIN7},
|
||||
{L"undo",IDS_UNDO_ITEM,IDS_UNDO_TIP,L"UndoItem",NULL,L"$Toolbar.Undo",L"imageres.dll,5315",NULL,SETTINGS_STYLE_WIN8},
|
||||
{L"redo",IDS_REDO_ITEM,IDS_REDO_TIP,L"RedoItem",NULL,L"$Toolbar.Redo",L"",NULL,SETTINGS_STYLE_WIN7},
|
||||
{L"redo",IDS_REDO_ITEM,IDS_REDO_TIP,L"RedoItem",NULL,L"$Toolbar.Redo",L"imageres.dll,5311",NULL,SETTINGS_STYLE_WIN8},
|
||||
{L"selectall",IDS_SELECTALL_ITEM,IDS_SELECTALL_TIP,L"SelectAllItem",NULL,L"$Toolbar.SelectAll",L"",NULL,SETTINGS_STYLE_WIN7},
|
||||
{L"selectall",IDS_SELECTALL_ITEM,IDS_SELECTALL_TIP,L"SelectAllItem",NULL,L"$Toolbar.SelectAll",L"imageres.dll,5308",NULL,SETTINGS_STYLE_WIN8},
|
||||
{L"deselect",IDS_DESELECT_ITEM,IDS_DESELECT_TIP,L"DeselectItem",NULL,L"$Toolbar.Deselect",L"",NULL,SETTINGS_STYLE_WIN7},
|
||||
{L"deselect",IDS_DESELECT_ITEM,IDS_DESELECT_TIP,L"DeselectItem",NULL,L"$Toolbar.Deselect",L"imageres.dll,5309",NULL,SETTINGS_STYLE_WIN8},
|
||||
{L"invertselection",IDS_INVERT_ITEM,IDS_INVERT_TIP,L"InvertItem",NULL,L"$Toolbar.InvertSelection",L"",NULL,SETTINGS_STYLE_WIN7},
|
||||
{L"invertselection",IDS_INVERT_ITEM,IDS_INVERT_TIP,L"InvertItem",NULL,L"$Toolbar.InvertSelection",L"imageres.dll,5310",NULL,SETTINGS_STYLE_WIN8},
|
||||
{L"back",IDS_BACK_ITEM,IDS_BACK_TIP,L"BackItem",NULL,L"$Toolbar.Back",L""},
|
||||
{L"forward",IDS_FORWARD_ITEM,IDS_FORWARD_TIP,L"ForwardItem",NULL,L"$Toolbar.Forward",L""},
|
||||
{L"show_extensions",IDS_SHOW_EXTENSIONS,IDS_SHOW_EXTENSIONS_TIP,L"ShowExtensionsItem",NULL,L"$Toolbar.ShowExtensions"},
|
||||
{L"hidden_files",IDS_HIDDEN_FILES,IDS_HIDDEN_FILES_TIP,L"HiddenFilesItem",NULL,L"$Toolbar.ShowHiddenFiles"},
|
||||
{L"system_files",IDS_SYSTEM_FILES,IDS_SYSTEM_FILES_TIP,L"SystemFilesItem",NULL,L"$Toolbar.ShowSystemFiles"},
|
||||
{L"open <folder name>",IDS_OPEN_ITEM,IDS_OPEN_TIP,L"OpenFolderItem",NULL,NULL,L""},
|
||||
{L"sortby <property>",IDS_SORYBY_ITEM,IDS_SORT_TIP,L"SortFolderItem",NULL,NULL,L""},
|
||||
{L"groupby <property>",IDS_GROUPBY_ITEM,IDS_GROUP_TIP,L"GroupFolderItem",NULL,NULL,L""},
|
||||
{L"",IDS_CUSTOM_ITEM,IDS_CUSTOM_TIP,L"CustomItem",NULL,NULL,L""},
|
||||
{NULL},
|
||||
};
|
||||
|
||||
static const KNOWNFOLDERID *g_CommonLinks[]=
|
||||
{
|
||||
&FOLDERID_ComputerFolder,
|
||||
&FOLDERID_DesktopRoot,
|
||||
&FOLDERID_Desktop,
|
||||
&FOLDERID_Documents,
|
||||
&FOLDERID_Downloads,
|
||||
&FOLDERID_Favorites,
|
||||
&FOLDERID_Games,
|
||||
&FOLDERID_Links,
|
||||
&FOLDERID_Music,
|
||||
&FOLDERID_Pictures,
|
||||
&FOLDERID_Videos,
|
||||
&FOLDERID_Profile,
|
||||
&FOLDERID_HomeGroup,
|
||||
&FOLDERID_Libraries,
|
||||
&FOLDERID_DocumentsLibrary,
|
||||
&FOLDERID_MusicLibrary,
|
||||
&FOLDERID_PicturesLibrary,
|
||||
&FOLDERID_VideosLibrary,
|
||||
&FOLDERID_NetworkFolder,
|
||||
NULL,
|
||||
};
|
||||
|
||||
const wchar_t *g_DefaultToolbar=
|
||||
L"Items=UpItem, NavPaneItem, FolderOptionsItem, CutItem, CopyItem, PasteItem, DeleteItem, PropertiesItem, EmailItem, SEPARATOR, SettingsItem\n"
|
||||
L"UpItem.Command=up\n"
|
||||
L"UpItem.Tip=$Toolbar.GoUp\n"
|
||||
L"UpItem.Icon=,2\n"
|
||||
L"UpItem.IconDisabled=,3\n"
|
||||
L"NavPaneItem.Command=nav_pane\n"
|
||||
L"NavPaneItem.Tip=$Toolbar.NavigationPane\n"
|
||||
L"NavPaneItem.Icon=shell32.dll,16755\n"
|
||||
L"FolderOptionsItem.Command=folderoptions\n"
|
||||
L"FolderOptionsItem.Tip=$Toolbar.FolderOptions\n"
|
||||
L"FolderOptionsItem.Icon=imageres.dll,166\n"
|
||||
L"FolderOptionsItem.Items=ShowExtensionsItem, HiddenFilesItem, SystemFilesItem\n"
|
||||
L"ShowExtensionsItem.Command=show_extensions\n"
|
||||
L"ShowExtensionsItem.Label=$Toolbar.ShowExtensions\n"
|
||||
L"ShowExtensionsItem.Icon=none\n"
|
||||
L"HiddenFilesItem.Command=hidden_files\n"
|
||||
L"HiddenFilesItem.Label=$Toolbar.ShowHiddenFiles\n"
|
||||
L"HiddenFilesItem.Icon=none\n"
|
||||
L"SystemFilesItem.Command=system_files\n"
|
||||
L"SystemFilesItem.Label=$Toolbar.ShowSystemFiles\n"
|
||||
L"SystemFilesItem.Icon=none\n"
|
||||
L"CutItem.Command=cut\n"
|
||||
L"CutItem.Tip=$Toolbar.Cut\n"
|
||||
L"CutItem.Icon=shell32.dll,16762\n"
|
||||
L"CopyItem.Command=copy\n"
|
||||
L"CopyItem.Tip=$Toolbar.Copy\n"
|
||||
L"CopyItem.Icon=shell32.dll,243\n"
|
||||
L"PasteItem.Command=paste\n"
|
||||
L"PasteItem.Tip=$Toolbar.Paste\n"
|
||||
L"PasteItem.Icon=shell32.dll,16763\n"
|
||||
L"DeleteItem.Command=delete\n"
|
||||
L"DeleteItem.Tip=$Toolbar.Delete\n"
|
||||
L"DeleteItem.Icon=shell32.dll,240\n"
|
||||
L"PropertiesItem.Command=properties\n"
|
||||
L"PropertiesItem.Tip=$Toolbar.Properties\n"
|
||||
L"PropertiesItem.Icon=shell32.dll,253\n"
|
||||
L"EmailItem.Command=email\n"
|
||||
L"EmailItem.Tip=$Toolbar.Email\n"
|
||||
L"EmailItem.Icon=shell32.dll,265\n"
|
||||
L"SettingsItem.Command=settings\n"
|
||||
L"SettingsItem.Tip=$Toolbar.Settings\n"
|
||||
L"SettingsItem.Icon=,1\n";
|
||||
|
||||
const wchar_t *g_DefaultToolbar2=
|
||||
L"Items=NavPaneItem, FolderOptionsItem, CutItem, CopyItem, PasteItem, DeleteItem, PropertiesItem, EmailItem, SEPARATOR, SettingsItem\n"
|
||||
L"NavPaneItem.Command=nav_pane\n"
|
||||
L"NavPaneItem.Tip=$Toolbar.NavigationPane\n"
|
||||
L"NavPaneItem.Icon=shell32.dll,16755\n"
|
||||
L"FolderOptionsItem.Command=folderoptions\n"
|
||||
L"FolderOptionsItem.Tip=$Toolbar.FolderOptions\n"
|
||||
L"FolderOptionsItem.Icon=imageres.dll,166\n"
|
||||
L"FolderOptionsItem.Items=ShowExtensionsItem, HiddenFilesItem, SystemFilesItem\n"
|
||||
L"ShowExtensionsItem.Command=show_extensions\n"
|
||||
L"ShowExtensionsItem.Label=$Toolbar.ShowExtensions\n"
|
||||
L"ShowExtensionsItem.Icon=none\n"
|
||||
L"HiddenFilesItem.Command=hidden_files\n"
|
||||
L"HiddenFilesItem.Label=$Toolbar.ShowHiddenFiles\n"
|
||||
L"HiddenFilesItem.Icon=none\n"
|
||||
L"SystemFilesItem.Command=system_files\n"
|
||||
L"SystemFilesItem.Label=$Toolbar.ShowSystemFiles\n"
|
||||
L"SystemFilesItem.Icon=none\n"
|
||||
L"CutItem.Command=cut\n"
|
||||
L"CutItem.Tip=$Toolbar.Cut\n"
|
||||
L"CutItem.Icon=shell32.dll,16762\n"
|
||||
L"CopyItem.Command=copy\n"
|
||||
L"CopyItem.Tip=$Toolbar.Copy\n"
|
||||
L"CopyItem.Icon=shell32.dll,243\n"
|
||||
L"PasteItem.Command=paste\n"
|
||||
L"PasteItem.Tip=$Toolbar.Paste\n"
|
||||
L"PasteItem.Icon=shell32.dll,16763\n"
|
||||
L"DeleteItem.Command=delete\n"
|
||||
L"DeleteItem.Tip=$Toolbar.Delete\n"
|
||||
L"DeleteItem.Icon=shell32.dll,240\n"
|
||||
L"PropertiesItem.Command=properties\n"
|
||||
L"PropertiesItem.Tip=$Toolbar.Properties\n"
|
||||
L"PropertiesItem.Icon=shell32.dll,253\n"
|
||||
L"EmailItem.Command=email\n"
|
||||
L"EmailItem.Tip=$Toolbar.Email\n"
|
||||
L"EmailItem.Icon=shell32.dll,265\n"
|
||||
L"SettingsItem.Command=settings\n"
|
||||
L"SettingsItem.Tip=$Toolbar.Settings\n"
|
||||
L"SettingsItem.Icon=,1\n";
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class CEditToolbarDlg: public CEditCustomItemDlg
|
||||
{
|
||||
public:
|
||||
CEditToolbarDlg( CTreeItem *pItem, bool bNoLinks, std::vector<HMODULE> &modules ): CEditCustomItemDlg(pItem,modules) { m_bNoLinks=bNoLinks; }
|
||||
|
||||
BEGIN_MSG_MAP( CEditToolbarDlg )
|
||||
MESSAGE_HANDLER( WM_INITDIALOG, OnInitDialog )
|
||||
COMMAND_ID_HANDLER( IDOK, OnOK )
|
||||
COMMAND_ID_HANDLER( IDCANCEL, OnCancel )
|
||||
COMMAND_HANDLER( IDC_COMBOCOMMAND, CBN_KILLFOCUS, OnCommandChanged )
|
||||
COMMAND_HANDLER( IDC_COMBOCOMMAND, CBN_SELENDOK, OnCommandChanged )
|
||||
COMMAND_HANDLER( IDC_BUTTONCOMMAND, BN_CLICKED, OnBrowseCommand )
|
||||
COMMAND_HANDLER( IDC_BUTTONLINK, BN_CLICKED, OnBrowseLink )
|
||||
COMMAND_HANDLER( IDC_BUTTONICON, BN_CLICKED, OnBrowseIcon )
|
||||
COMMAND_HANDLER( IDC_BUTTONICOND, BN_CLICKED, OnBrowseIcon )
|
||||
COMMAND_HANDLER( IDC_COMBOLINK, CBN_KILLFOCUS, OnLinkChanged )
|
||||
COMMAND_HANDLER( IDC_COMBOLINK, CBN_SELENDOK, OnLinkChanged )
|
||||
COMMAND_HANDLER( IDC_EDITICON, EN_KILLFOCUS, OnIconChanged )
|
||||
COMMAND_HANDLER( IDC_EDITICOND, EN_KILLFOCUS, OnIconDChanged )
|
||||
COMMAND_HANDLER( IDC_BUTTONRESET, BN_CLICKED, OnReset )
|
||||
CHAIN_MSG_MAP( CEditCustomItemDlg )
|
||||
END_MSG_MAP()
|
||||
|
||||
virtual BEGIN_RESIZE_MAP
|
||||
RESIZE_CONTROL(IDC_COMBOCOMMAND,MOVE_SIZE_X)
|
||||
RESIZE_CONTROL(IDC_COMBOLINK,MOVE_SIZE_X)
|
||||
RESIZE_CONTROL(IDC_BUTTONCOMMAND,MOVE_MOVE_X)
|
||||
RESIZE_CONTROL(IDC_BUTTONLINK,MOVE_MOVE_X)
|
||||
RESIZE_CONTROL(IDC_EDITLABEL,MOVE_SIZE_X)
|
||||
RESIZE_CONTROL(IDC_EDITTIP,MOVE_SIZE_X)
|
||||
RESIZE_CONTROL(IDC_EDITICON,MOVE_SIZE_X)
|
||||
RESIZE_CONTROL(IDC_BUTTONICON,MOVE_MOVE_X)
|
||||
RESIZE_CONTROL(IDC_EDITICOND,MOVE_SIZE_X)
|
||||
RESIZE_CONTROL(IDC_BUTTONICOND,MOVE_MOVE_X)
|
||||
RESIZE_CONTROL(IDOK,MOVE_MOVE_X)
|
||||
RESIZE_CONTROL(IDCANCEL,MOVE_MOVE_X)
|
||||
END_RESIZE_MAP
|
||||
|
||||
protected:
|
||||
// Handler prototypes:
|
||||
// LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
// LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
|
||||
// LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
|
||||
LRESULT OnInitDialog( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled );
|
||||
LRESULT OnOK( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled );
|
||||
LRESULT OnCommandChanged( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled );
|
||||
LRESULT OnLinkChanged( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled );
|
||||
LRESULT OnIconChanged( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled );
|
||||
LRESULT OnIconDChanged( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled );
|
||||
LRESULT OnBrowseCommand( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled );
|
||||
LRESULT OnBrowseLink( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled );
|
||||
LRESULT OnBrowseIcon( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled );
|
||||
LRESULT OnReset( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled );
|
||||
|
||||
private:
|
||||
bool m_bNoLinks;
|
||||
int m_Style;
|
||||
};
|
||||
|
||||
LRESULT CEditToolbarDlg::OnInitDialog( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled )
|
||||
{
|
||||
m_Style=GetWinVersion()>=WIN_VER_WIN8?SETTINGS_STYLE_WIN8:SETTINGS_STYLE_WIN7;
|
||||
CWindow commands=GetDlgItem(IDC_COMBOCOMMAND);
|
||||
CWindow links=GetDlgItem(IDC_COMBOLINK);
|
||||
InitDialog(commands,g_StdCommands,m_Style,SETTINGS_STYLE_MASK,links,g_CommonLinks);
|
||||
SetDlgItemText(IDC_EDITLABEL,m_pItem->label);
|
||||
SetDlgItemText(IDC_EDITTIP,m_pItem->tip);
|
||||
SetDlgItemText(IDC_EDITICON,m_pItem->icon);
|
||||
SetDlgItemText(IDC_EDITICOND,m_pItem->iconD);
|
||||
|
||||
GetDlgItem(IDC_BUTTONRESET).EnableWindow(m_pItem->pStdCommand && *m_pItem->pStdCommand->name);
|
||||
|
||||
UpdateIcons(IDC_ICONN,IDC_ICOND);
|
||||
|
||||
CWindow tooltip=CreateWindowEx(WS_EX_TOPMOST|WS_EX_TOOLWINDOW|WS_EX_TRANSPARENT,TOOLTIPS_CLASS,NULL,WS_POPUP|TTS_NOPREFIX|TTS_ALWAYSTIP,0,0,0,0,m_hWnd,NULL,g_Instance,NULL);
|
||||
tooltip.SendMessage(TTM_SETMAXTIPWIDTH,0,GetSystemMetrics(SM_CXSCREEN)/2);
|
||||
|
||||
TOOLINFO tool={sizeof(tool),TTF_SUBCLASS|TTF_IDISHWND,m_hWnd,(UINT_PTR)(HWND)commands};
|
||||
CString str=LoadStringEx(IDS_COMMAND_TIP);
|
||||
tool.lpszText=(LPWSTR)(LPCWSTR)str;
|
||||
tooltip.SendMessage(TTM_ADDTOOL,0,(LPARAM)&tool);
|
||||
tool.uId=(UINT_PTR)(HWND)commands.GetWindow(GW_CHILD);
|
||||
tooltip.SendMessage(TTM_ADDTOOL,0,(LPARAM)&tool);
|
||||
|
||||
str=LoadStringEx(IDS_LINK_TIP);
|
||||
tool.lpszText=(LPWSTR)(LPCWSTR)str;
|
||||
tool.uId=(UINT_PTR)(HWND)links;
|
||||
tooltip.SendMessage(TTM_ADDTOOL,0,(LPARAM)&tool);
|
||||
tool.uId=(UINT_PTR)(HWND)links.GetWindow(GW_CHILD);
|
||||
tooltip.SendMessage(TTM_ADDTOOL,0,(LPARAM)&tool);
|
||||
|
||||
str=LoadStringEx(IDS_TEXT_TIP);
|
||||
tool.lpszText=(LPWSTR)(LPCWSTR)str;
|
||||
tool.uId=(UINT_PTR)(HWND)GetDlgItem(IDC_EDITLABEL);
|
||||
tooltip.SendMessage(TTM_ADDTOOL,0,(LPARAM)&tool);
|
||||
|
||||
str=LoadStringEx(IDS_TIP_TIP);
|
||||
tool.lpszText=(LPWSTR)(LPCWSTR)str;
|
||||
tool.uId=(UINT_PTR)(HWND)GetDlgItem(IDC_EDITTIP);
|
||||
tooltip.SendMessage(TTM_ADDTOOL,0,(LPARAM)&tool);
|
||||
|
||||
str=LoadStringEx(IDS_ICON_TIP);
|
||||
tool.lpszText=(LPWSTR)(LPCWSTR)str;
|
||||
tool.uId=(UINT_PTR)(HWND)GetDlgItem(IDC_EDITICON);
|
||||
tooltip.SendMessage(TTM_ADDTOOL,0,(LPARAM)&tool);
|
||||
|
||||
str=LoadStringEx(IDS_ICOND_TIP);
|
||||
tool.lpszText=(LPWSTR)(LPCWSTR)str;
|
||||
tool.uId=(UINT_PTR)(HWND)GetDlgItem(IDC_EDITICOND);
|
||||
tooltip.SendMessage(TTM_ADDTOOL,0,(LPARAM)&tool);
|
||||
|
||||
str=LoadStringEx(IDS_RESTORE_TIP);
|
||||
tool.lpszText=(LPWSTR)(LPCWSTR)str;
|
||||
tool.uId=(UINT_PTR)(HWND)GetDlgItem(IDC_BUTTONRESET);
|
||||
tooltip.SendMessage(TTM_ADDTOOL,0,(LPARAM)&tool);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LRESULT CEditToolbarDlg::OnOK( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled )
|
||||
{
|
||||
GetDlgItemText(IDC_EDITLABEL,m_pItem->label);
|
||||
m_pItem->label.TrimLeft();
|
||||
m_pItem->label.TrimRight();
|
||||
GetDlgItemText(IDC_EDITTIP,m_pItem->tip);
|
||||
m_pItem->tip.TrimLeft();
|
||||
m_pItem->tip.TrimRight();
|
||||
|
||||
return CEditCustomItemDlg::OnOK(wNotifyCode,wID,hWndCtl,bHandled);
|
||||
}
|
||||
|
||||
LRESULT CEditToolbarDlg::OnCommandChanged( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled )
|
||||
{
|
||||
CString text=GetComboText(wNotifyCode,wID);
|
||||
if (text==m_pItem->command) return 0;
|
||||
m_pItem->SetCommand(text,g_StdCommands,m_Style,SETTINGS_STYLE_MASK);
|
||||
GetDlgItem(IDC_BUTTONRESET).EnableWindow(m_pItem->pStdCommand && *m_pItem->pStdCommand->name);
|
||||
UpdateIcons(IDC_ICONN,IDC_ICOND);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CEditToolbarDlg::OnLinkChanged( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled )
|
||||
{
|
||||
CString text=GetComboText(wNotifyCode,wID);
|
||||
if (text==m_pItem->link) return 0;
|
||||
m_pItem->link=text;
|
||||
UpdateIcons(IDC_ICONN,IDC_ICOND);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CEditToolbarDlg::OnIconChanged( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled )
|
||||
{
|
||||
CString text;
|
||||
GetDlgItemText(IDC_EDITICON,text);
|
||||
text.TrimLeft();
|
||||
text.TrimRight();
|
||||
if (text==m_pItem->icon) return 0;
|
||||
m_pItem->icon=text;
|
||||
UpdateIcons(IDC_ICONN,IDC_ICOND);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CEditToolbarDlg::OnIconDChanged( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled )
|
||||
{
|
||||
CString text;
|
||||
GetDlgItemText(IDC_EDITICOND,text);
|
||||
text.TrimLeft();
|
||||
text.TrimRight();
|
||||
if (text==m_pItem->iconD) return 0;
|
||||
m_pItem->iconD=text;
|
||||
UpdateIcons(IDC_ICONN,IDC_ICOND);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CEditToolbarDlg::OnBrowseCommand( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled )
|
||||
{
|
||||
wchar_t text[_MAX_PATH];
|
||||
GetDlgItemText(IDC_COMBOCOMMAND,text,_countof(text));
|
||||
if (BrowseCommandHelper(m_hWnd,text))
|
||||
{
|
||||
SetDlgItemText(IDC_COMBOCOMMAND,text);
|
||||
SendMessage(WM_COMMAND,MAKEWPARAM(IDC_COMBOCOMMAND,CBN_KILLFOCUS));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CEditToolbarDlg::OnBrowseLink( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled )
|
||||
{
|
||||
wchar_t text[_MAX_PATH];
|
||||
GetDlgItemText(IDC_COMBOLINK,text,_countof(text));
|
||||
if (BrowseLinkHelper(m_hWnd,text))
|
||||
{
|
||||
SetDlgItemText(IDC_COMBOLINK,text);
|
||||
SendMessage(WM_COMMAND,MAKEWPARAM(IDC_COMBOLINK,CBN_KILLFOCUS));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CEditToolbarDlg::OnBrowseIcon( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled )
|
||||
{
|
||||
wchar_t text[_MAX_PATH];
|
||||
if (wID==IDC_BUTTONICON) wID=IDC_EDITICON;
|
||||
if (wID==IDC_BUTTONICOND) wID=IDC_EDITICOND;
|
||||
GetDlgItemText(wID,text,_countof(text));
|
||||
if (wID==IDC_EDITICOND && !*text)
|
||||
GetDlgItemText(IDC_EDITICON,text,_countof(text));
|
||||
if (BrowseIconHelper(m_hWnd,text))
|
||||
{
|
||||
SetDlgItemText(wID,text);
|
||||
SendMessage(WM_COMMAND,MAKEWPARAM(wID,EN_KILLFOCUS));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT CEditToolbarDlg::OnReset( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled )
|
||||
{
|
||||
if (!m_pItem->pStdCommand || !*m_pItem->pStdCommand->name)
|
||||
return 0;
|
||||
m_pItem->link.Empty();
|
||||
m_pItem->label=m_pItem->pStdCommand->label;
|
||||
m_pItem->tip=m_pItem->pStdCommand->tip;
|
||||
m_pItem->icon=m_pItem->pStdCommand->icon;
|
||||
m_pItem->iconD=m_pItem->pStdCommand->iconD;
|
||||
SendDlgItemMessage(IDC_COMBOLINK,CB_SETCURSEL,-1);
|
||||
SetDlgItemText(IDC_EDITLABEL,m_pItem->label);
|
||||
SetDlgItemText(IDC_EDITTIP,m_pItem->tip);
|
||||
SetDlgItemText(IDC_EDITICON,m_pItem->icon);
|
||||
SetDlgItemText(IDC_EDITICOND,m_pItem->iconD);
|
||||
|
||||
UpdateIcons(IDC_ICONN,IDC_ICOND);
|
||||
return 0;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class CCustomToolbarDlg: public CCustomTreeDlg
|
||||
{
|
||||
public:
|
||||
CCustomToolbarDlg( void ): CCustomTreeDlg(false,g_StdCommands,GetWinVersion()>=WIN_VER_WIN8?SETTINGS_STYLE_WIN8:SETTINGS_STYLE_WIN7,SETTINGS_STYLE_MASK) {}
|
||||
|
||||
protected:
|
||||
virtual void ParseTreeItemExtra( CTreeItem *pItem, CSettingsParser &parser );
|
||||
virtual void SerializeItemExtra( CTreeItem *pItem, std::vector<wchar_t> &stringBuilder );
|
||||
virtual bool EditItem( CTreeItem *pItem, HWND tree, HTREEITEM hItem, std::vector<HMODULE> &modules );
|
||||
};
|
||||
|
||||
void CCustomToolbarDlg::ParseTreeItemExtra( CTreeItem *pItem, CSettingsParser &parser )
|
||||
{
|
||||
wchar_t text[256];
|
||||
Sprintf(text,_countof(text),L"%s.IconDisabled",pItem->name);
|
||||
pItem->iconD=parser.FindSetting(text,L"");
|
||||
}
|
||||
|
||||
void CCustomToolbarDlg::SerializeItemExtra( CTreeItem *pItem, std::vector<wchar_t> &stringBuilder )
|
||||
{
|
||||
if (!pItem->iconD.IsEmpty())
|
||||
{
|
||||
wchar_t text[2048];
|
||||
Sprintf(text,_countof(text),L"%s.IconDisabled=%s\n",pItem->name,pItem->iconD);
|
||||
AppendString(stringBuilder,text);
|
||||
}
|
||||
}
|
||||
|
||||
bool CCustomToolbarDlg::EditItem( CTreeItem *pItem, HWND tree, HTREEITEM hItem, std::vector<HMODULE> &modules )
|
||||
{
|
||||
bool bNoLinks=(TreeView_GetParent(tree,hItem) || TreeView_GetChild(tree,hItem));
|
||||
return CEditToolbarDlg(pItem,bNoLinks,modules).Run(m_hWnd,IDD_CUSTOMTOOLBAR);
|
||||
}
|
||||
|
||||
class CCustomToolbarPanel: public ISettingsPanel
|
||||
{
|
||||
public:
|
||||
virtual HWND Create( HWND parent );
|
||||
virtual HWND Activate( CSetting *pGroup, const RECT &rect, bool bReset );
|
||||
virtual bool Validate( HWND parent ) { return true; }
|
||||
|
||||
private:
|
||||
static CCustomToolbarDlg s_Dialog;
|
||||
};
|
||||
|
||||
CCustomToolbarDlg CCustomToolbarPanel::s_Dialog;
|
||||
|
||||
HWND CCustomToolbarPanel::Create( HWND parent )
|
||||
{
|
||||
if (!s_Dialog.m_hWnd)
|
||||
s_Dialog.Create(parent,LoadDialogEx(IDD_CUSTOMTREE));
|
||||
return s_Dialog.m_hWnd;
|
||||
}
|
||||
|
||||
HWND CCustomToolbarPanel::Activate( CSetting *pGroup, const RECT &rect, bool bReset )
|
||||
{
|
||||
s_Dialog.SetGroup(pGroup,bReset);
|
||||
s_Dialog.SetWindowPos(HWND_TOP,&rect,SWP_SHOWWINDOW);
|
||||
return s_Dialog.m_hWnd;
|
||||
}
|
||||
|
||||
static CCustomToolbarPanel g_CustomToolbarPanel;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static CSetting g_Settings[]={
|
||||
{L"Basic",CSetting::TYPE_GROUP,IDS_BASIC_SETTINGS},
|
||||
{L"EnableSettings",CSetting::TYPE_BOOL,0,0,1,CSetting::FLAG_HIDDEN|CSetting::FLAG_NOSAVE},
|
||||
{L"ProcessWhiteList",CSetting::TYPE_STRING,0,0,L"",CSetting::FLAG_HIDDEN|CSetting::FLAG_NOSAVE},
|
||||
{L"ProcessBlackList",CSetting::TYPE_STRING,0,0,L"",CSetting::FLAG_HIDDEN|CSetting::FLAG_NOSAVE},
|
||||
{L"NoInitialToolbar",CSetting::TYPE_BOOL,0,0,0,CSetting::FLAG_HIDDEN|CSetting::FLAG_NOSAVE},
|
||||
|
||||
{L"NavigationPane",CSetting::TYPE_GROUP,IDS_NAVIGATION_SETTINGS},
|
||||
{L"TreeStyle",CSetting::TYPE_INT,IDS_TREE_STYLE,IDS_TREE_STYLE_TIP,2,CSetting::FLAG_WARM|CSetting::FLAG_BASIC},
|
||||
{L"XPClassic",CSetting::TYPE_RADIO,IDS_XPCLASSIC,IDS_XPCLASSIC_TIP},
|
||||
{L"XPSimple",CSetting::TYPE_RADIO,IDS_XPSIMPLE,IDS_XPSIMPLE_TIP},
|
||||
{L"Vista",CSetting::TYPE_RADIO,IDS_VISTA,IDS_VISTA_TIP},
|
||||
{L"HScrollbar",CSetting::TYPE_INT,IDS_SCROLLBAR,IDS_SCROLLBAR_TIP,0,CSetting::FLAG_WARM},
|
||||
{L"Default",CSetting::TYPE_RADIO,IDS_SCROLLBAR_DEFAULT,IDS_SCROLLBAR_DEFAULT_TIP},
|
||||
{L"Off",CSetting::TYPE_RADIO,IDS_SCROLLBAR_OFF,IDS_SCROLLBAR_OFF_TIP},
|
||||
{L"On",CSetting::TYPE_RADIO,IDS_SCROLLBAR_ON,IDS_SCROLLBAR_ON_TIP},
|
||||
{L"NoFadeButtons",CSetting::TYPE_BOOL,IDS_NO_FADE,IDS_NO_FADE_TIP,0,CSetting::FLAG_WARM,L"TreeStyle"},
|
||||
{L"TreeItemSpacing",CSetting::TYPE_INT,IDS_TREE_SPACING,IDS_TREE_SPACING_TIP,0,CSetting::FLAG_WARM},
|
||||
{L"FullIndent",CSetting::TYPE_BOOL,IDS_FULL_INDENT,IDS_FULL_INDENT_TIP,0,CSetting::FLAG_WARM,L"TreeStyle"},
|
||||
{L"AutoNavigate",CSetting::TYPE_INT,IDS_NAVIGATE,IDS_NAVIGATE_TIP,0,CSetting::FLAG_WARM|CSetting::FLAG_BASIC},
|
||||
{L"Default",CSetting::TYPE_RADIO,IDS_NAV_DEFAULT,IDS_NAV_DEFAULT_TIP},
|
||||
{L"KeyboardOnly",CSetting::TYPE_RADIO,IDS_NAV_KBD,IDS_NAV_KBD_TIP},
|
||||
{L"Always",CSetting::TYPE_RADIO,IDS_NAV_ALWAYS,IDS_NAV_ALWAYS_TIP},
|
||||
{L"AutoNavDelay",CSetting::TYPE_INT,IDS_NAV_DELAY,IDS_NAV_DELAY_TIP,100,CSetting::FLAG_WARM,L"AutoNavigate"},
|
||||
{L"AltEnter",CSetting::TYPE_BOOL,IDS_ALT_ENTER,IDS_ALT_ENTER_TIP,1,CSetting::FLAG_WARM|CSetting::FLAG_BASIC},
|
||||
{L"FixFolderScroll",CSetting::TYPE_BOOL,IDS_FIX_SCROLL,IDS_FIX_SCROLL_TIP,1,CSetting::FLAG_WARM},
|
||||
|
||||
{L"TitleBar",CSetting::TYPE_GROUP,IDS_TITLE_SETTINGS},
|
||||
{L"ShowCaption",CSetting::TYPE_BOOL,IDS_SHOW_CAPTION,IDS_SHOW_CAPTION_TIP,0,CSetting::FLAG_WARM},
|
||||
{L"ShowIcon",CSetting::TYPE_BOOL,IDS_SHOW_ICON,IDS_SHOW_ICON_TIP,0,CSetting::FLAG_WARM},
|
||||
{L"DisableBreadcrumbs",CSetting::TYPE_BOOL,IDS_NO_BREADCRUMBS,IDS_NO_BREADCRUMBS_TIP,0,CSetting::FLAG_WARM|CSetting::FLAG_BASIC},
|
||||
{L"AddressBarHistory",CSetting::TYPE_INT,IDS_ADDRESS_HISTORY,IDS_ADDRESS_HISTORY_TIP,0,CSetting::FLAG_WARM},
|
||||
{L"NormalHistory",CSetting::TYPE_RADIO,IDS_NORMAL_HISTORY,IDS_NORMAL_HISTORY_TIP},
|
||||
{L"SimplePath",CSetting::TYPE_RADIO,IDS_SIMPLE_PATH,IDS_SIMPLE_PATH_TIP},
|
||||
{L"ExtendedPath",CSetting::TYPE_RADIO,IDS_EXTENDED_PATH,IDS_EXTENDED_PATH_TIP},
|
||||
{L"HideSearch",CSetting::TYPE_BOOL,IDS_HIDE_SEARCH,IDS_HIDE_SEARCH_TIP,0,CSetting::FLAG_WARM},
|
||||
{L"AddressAltD",CSetting::TYPE_STRING,IDS_ALT_D,IDS_ALT_D_TIP,L"",CSetting::FLAG_WARM},
|
||||
{L"UpHotkey2",CSetting::TYPE_HOTKEY_ANY,IDS_UP_HOTKEY,IDS_UP_HOTKEY_TIP,0,CSetting::FLAG_WARM},
|
||||
|
||||
{L"UpButton",CSetting::TYPE_GROUP,IDS_UP_SETTINGS},
|
||||
{L"ShowUpButton",CSetting::TYPE_INT,IDS_SHOW_UP,IDS_SHOW_UP_TIP,2,CSetting::FLAG_WARM|CSetting::FLAG_BASIC},
|
||||
{L"DontShow",CSetting::TYPE_RADIO,IDS_DONT_SHOW,IDS_DONT_SHOW_TIP},
|
||||
{L"BeforeBack",CSetting::TYPE_RADIO,IDS_BEFORE_BACK,IDS_BEFORE_BACK_TIP},
|
||||
{L"AfterBack",CSetting::TYPE_RADIO,IDS_AFTER_BACK,IDS_AFTER_BACK_TIP},
|
||||
{L"UpIconNormal",CSetting::TYPE_ICON,IDS_UP_NORMAL,IDS_UP_NORMAL_TIP,L",4",CSetting::FLAG_WARM,L"ShowUpButton"},
|
||||
{L"UpIconPressed",CSetting::TYPE_ICON,IDS_UP_PRESSED,IDS_UP_PRESSED_TIP,L",5",CSetting::FLAG_WARM,L"ShowUpButton"},
|
||||
{L"UpIconHot",CSetting::TYPE_ICON,IDS_UP_HOT,IDS_UP_HOT_TIP,L",6",CSetting::FLAG_WARM,L"ShowUpButton"},
|
||||
{L"UpIconDisabled",CSetting::TYPE_ICON,IDS_UP_DISABLED,IDS_UP_DISABLED_TIP,L",7",CSetting::FLAG_WARM,L"ShowUpButton"},
|
||||
{L"UpIconSize",CSetting::TYPE_INT,IDS_UP_SIZE,IDS_UP_SIZE_TIP,0,CSetting::FLAG_WARM,L"ShowUpButton"}, // 30 for DPI<120 and 36 for DPI>=120
|
||||
{L"UpHotkey",CSetting::TYPE_HOTKEY_ANY,IDS_UP_HOTKEY,IDS_UP_HOTKEY_TIP,0,CSetting::FLAG_WARM},
|
||||
|
||||
{L"Toolbar",CSetting::TYPE_GROUP,IDS_TOOLBAR_SETTINGS},
|
||||
{L"UseBigButtons",CSetting::TYPE_BOOL,IDS_BIG_BUTTONS,IDS_BIG_BUTTONS_TIP,1,CSetting::FLAG_WARM},
|
||||
{L"SmallIconSize",CSetting::TYPE_INT,IDS_SMALL_SIZE,IDS_SMALL_SIZE_TIP,-1,CSetting::FLAG_WARM}, // 16 for DPI<120 and 24 for DPI>=120
|
||||
{L"LargeIconSize",CSetting::TYPE_INT,IDS_LARGE_SIZE,IDS_LARGE_SIZE_TIP,-1,CSetting::FLAG_WARM}, // 24 for DPI<120 and 32 for DPI>=120
|
||||
{L"MenuIconSize",CSetting::TYPE_INT,IDS_MENU_SIZE,IDS_MENU_SIZE_TIP,16,CSetting::FLAG_WARM},
|
||||
{L"ToolbarListMode",CSetting::TYPE_BOOL,IDS_LIST_MODE,IDS_LIST_MODE_TIP,0,CSetting::FLAG_WARM},
|
||||
{L"SameSizeButtons",CSetting::TYPE_BOOL,IDS_SAME_SIZE,IDS_SAME_SIZE_TIP,0,CSetting::FLAG_WARM,L"ToolbarListMode=0"},
|
||||
{L"ResizeableToolbar",CSetting::TYPE_BOOL,IDS_RESIZEABLE,IDS_RESIZEABLE_TIP,0,CSetting::FLAG_WARM},
|
||||
|
||||
{L"CustomToolbar",CSetting::TYPE_GROUP,IDS_BUTTONS_SETTINGS,0,0,0,NULL,NULL,&g_CustomToolbarPanel},
|
||||
{L"ToolbarItems",CSetting::TYPE_MULTISTRING,0,0,g_DefaultToolbar,CSetting::FLAG_WARM},
|
||||
|
||||
{L"StatusBar",CSetting::TYPE_GROUP,IDS_STATUS_SETTINGS},
|
||||
{L"ShowFreeSpace",CSetting::TYPE_BOOL,IDS_FREE_SPACE,IDS_FREE_SPACE_TIP,1,CSetting::FLAG_WARM|CSetting::FLAG_BASIC},
|
||||
{L"ShowInfoTip",CSetting::TYPE_BOOL,IDS_INFO_TIP,IDS_INFO_TIP_TIP,1,CSetting::FLAG_WARM,L"ShowFreeSpace"},
|
||||
{L"ForceRefreshWin7",CSetting::TYPE_BOOL,IDS_FORCE_REFRESH,IDS_FORCE_REFRESH_TIP,1,CSetting::FLAG_WARM,L"ShowFreeSpace"},
|
||||
|
||||
{L"StatusBar8",CSetting::TYPE_GROUP,IDS_STATUS_SETTINGS},
|
||||
{L"ShowStatusBar",CSetting::TYPE_BOOL,IDS_SHOWSTATUSBAR,IDS_SHOWSTATUSBAR_TIP,1,CSetting::FLAG_WARM|CSetting::FLAG_BASIC},
|
||||
{L"ShowFreeSpace2",CSetting::TYPE_BOOL,IDS_FREE_SPACE,IDS_FREE_SPACE_TIP,1,CSetting::FLAG_WARM,L"ShowStatusBar",L"ShowStatusBar"},
|
||||
{L"ShowZone",CSetting::TYPE_BOOL,IDS_SHOW_ZONE,IDS_SHOW_ZONE_TIP,1,CSetting::FLAG_WARM,L"ShowStatusBar",L"ShowStatusBar"},
|
||||
{L"ShowInfoTip2",CSetting::TYPE_BOOL,IDS_INFO_TIP,IDS_INFO_TIP_TIP,1,CSetting::FLAG_WARM,L"ShowStatusBar",L"ShowStatusBar"},
|
||||
{L"StatusBarFont",CSetting::TYPE_FONT,IDS_STATUS_FONT,IDS_STATUS_FONT_TIP,L"Segoe UI, normal, 9",CSetting::FLAG_WARM,L"ShowStatusBar",L"ShowStatusBar"},
|
||||
|
||||
{L"FilePane",CSetting::TYPE_GROUP,IDS_FILEPANE_SETTINGS},
|
||||
{L"ShareOverlay",CSetting::TYPE_BOOL,IDS_SHARE,IDS_SHARE_TIP,0,CSetting::FLAG_COLD|CSetting::FLAG_BASIC},
|
||||
{L"ShareOverlayIcon",CSetting::TYPE_ICON,IDS_SHARE_ICON,IDS_SHARE_ICON_TIP,L"%windir%\\system32\\imageres.dll,164",CSetting::FLAG_COLD,L"ShareOverlay",L"ShareOverlay"},
|
||||
{L"ShareOverlayHidden",CSetting::TYPE_BOOL,IDS_SHARE_HIDDEN,IDS_SHARE_HIDDEN_TIP,0,CSetting::FLAG_COLD,L"ShareOverlay",L"ShareOverlay"},
|
||||
{L"ShareExplorer",CSetting::TYPE_BOOL,IDS_SHARE_EXPLORER,IDS_SHARE_EXPLORER_TIP,1,CSetting::FLAG_COLD,L"ShareOverlay",L"ShareOverlay"},
|
||||
{L"ShowHeaders",CSetting::TYPE_BOOL,IDS_HEADERS,IDS_HEADERS_TIP,0,CSetting::FLAG_WARM},
|
||||
{L"HideScrollTip",CSetting::TYPE_BOOL,IDS_SCROLLTIP,IDS_SCROLLTIP_TIP,0,CSetting::FLAG_WARM},
|
||||
|
||||
{L"FileOperation",CSetting::TYPE_GROUP,IDS_FILE_SETTINGS},
|
||||
{L"ReplaceFileUI",CSetting::TYPE_BOOL,IDS_FILE_UI,IDS_FILE_UI_TIP,1,CSetting::FLAG_WARM|CSetting::FLAG_BASIC},
|
||||
{L"ReplaceFolderUI",CSetting::TYPE_BOOL,IDS_FOLDER_UI,IDS_FOLDER_UI_TIP,1,CSetting::FLAG_WARM|CSetting::FLAG_BASIC},
|
||||
{L"OverwriteAlertLevel",CSetting::TYPE_INT,IDS_ALERT_LEVEL,IDS_ALERT_LEVEL_TIP,0,CSetting::FLAG_WARM,L"ReplaceFileUI",L"ReplaceFileUI"},
|
||||
{L"NoAlert",CSetting::TYPE_RADIO,IDS_NO_ALERT,IDS_NO_ALERT_TIP},
|
||||
{L"SystemFiles",CSetting::TYPE_RADIO,IDS_SYS_FILES,IDS_SYS_FILES_TIP},
|
||||
{L"ReadOnlyFiles",CSetting::TYPE_RADIO,IDS_RO_FILES,IDS_RO_FILES_TIP},
|
||||
{L"EnableMore",CSetting::TYPE_BOOL,IDS_MORE,IDS_MORE_TIP,0,CSetting::FLAG_WARM},
|
||||
{L"MoreProgressDelay",CSetting::TYPE_INT,IDS_MORE_DELAY,IDS_MORE_DELAY_TIP,-1,CSetting::FLAG_WARM,L"EnableMore",L"EnableMore"}, // 500 for Windows 7 Aero, and 0 otherwise
|
||||
{L"FileExplorer",CSetting::TYPE_BOOL,IDS_FILE_EXPLORER,IDS_FILE_EXPLORER_TIP,1,CSetting::FLAG_COLD},
|
||||
|
||||
{L"Language",CSetting::TYPE_GROUP,IDS_LANGUAGE_SETTINGS,0,0,0,NULL,NULL,GetLanguageSettings(COMPONENT_EXPLORER)},
|
||||
{L"Language",CSetting::TYPE_STRING,0,0,L"",CSetting::FLAG_COLD|CSetting::FLAG_SHARED},
|
||||
|
||||
{NULL}
|
||||
};
|
||||
|
||||
void UpgradeSettings( bool bShared )
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateSettings( void )
|
||||
{
|
||||
HDC hdc=GetDC(NULL);
|
||||
int dpi=GetDeviceCaps(hdc,LOGPIXELSY);
|
||||
ReleaseDC(NULL,hdc);
|
||||
UpdateSetting(L"SmallIconSize",CComVariant((dpi>=120)?24:16),false);
|
||||
UpdateSetting(L"LargeIconSize",CComVariant((dpi>=120)?32:24),false);
|
||||
UpdateSetting(L"UpIconSize",CComVariant((dpi>=120)?36:30),false);
|
||||
FindSetting(L"UpHotkey2")->pLinkTo=FindSetting(L"UpHotkey");
|
||||
|
||||
if (GetWinVersion()>=WIN_VER_WIN8)
|
||||
{
|
||||
// Windows 8
|
||||
HideSettingGroup(L"StatusBar",true);
|
||||
HideSetting(L"ShowFreeSpace",true);
|
||||
FindSetting(L"ShowFreeSpace2")->pLinkTo=FindSetting(L"ShowFreeSpace");
|
||||
FindSetting(L"ShowInfoTip2")->pLinkTo=FindSetting(L"ShowInfoTip");
|
||||
|
||||
HideSettingGroup(L"UpButton",true);
|
||||
UpdateSetting(L"ShowUpButton",CComVariant(0),false); HideSetting(L"ShowUpButton",true);
|
||||
|
||||
HideSettingGroup(L"FileOperation",true);
|
||||
UpdateSetting(L"ReplaceFileUI",CComVariant(0),false); HideSetting(L"ReplaceFileUI",true);
|
||||
UpdateSetting(L"ReplaceFolderUI",CComVariant(0),false); HideSetting(L"ReplaceFolderUI",true);
|
||||
|
||||
UpdateSetting(L"ShowCaption",CComVariant(0),false); HideSetting(L"ShowCaption",true);
|
||||
UpdateSetting(L"ShowIcon",CComVariant(0),false); HideSetting(L"ShowIcon",true);
|
||||
UpdateSetting(L"FixFolderScroll",CComVariant(0),false); HideSetting(L"FixFolderScroll",true);
|
||||
UpdateSetting(L"ToolbarItems",CComVariant(g_DefaultToolbar2),false);
|
||||
|
||||
if (GetWinVersion()>=WIN_VER_WIN10)
|
||||
{
|
||||
FindSetting(L"TreeStyle")[1].flags|=CSetting::FLAG_HIDDEN;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Windows 7
|
||||
int delay=0;
|
||||
BOOL comp;
|
||||
if (SUCCEEDED(DwmIsCompositionEnabled(&comp)) && comp)
|
||||
delay=500;
|
||||
UpdateSetting(L"MoreProgressDelay",CComVariant(delay),false);
|
||||
HideSetting(L"UpHotkey2",true);
|
||||
HideSettingGroup(L"StatusBar8",true);
|
||||
}
|
||||
|
||||
CRegKey regKey;
|
||||
wchar_t language[100]=L"";
|
||||
if (regKey.Open(HKEY_LOCAL_MACHINE,L"Software\\OpenShell\\OpenShell",KEY_READ|KEY_WOW64_64KEY)==ERROR_SUCCESS)
|
||||
{
|
||||
ULONG size=_countof(language);
|
||||
if (regKey.QueryStringValue(L"DefaultLanguage",language,&size)!=ERROR_SUCCESS)
|
||||
language[0]=0;
|
||||
}
|
||||
UpdateSetting(L"Language",language,false);
|
||||
}
|
||||
|
||||
static bool g_bCopyHook0; // initial state of the copy hook before the settings are edited
|
||||
|
||||
void InitSettings( void )
|
||||
{
|
||||
InitSettings(g_Settings,COMPONENT_EXPLORER,NULL);
|
||||
g_bCopyHook0=GetWinVersion()<WIN_VER_WIN8 && (GetSettingBool(L"ReplaceFileUI") || GetSettingBool(L"ReplaceFolderUI") || GetSettingBool(L"EnableMore"));
|
||||
}
|
||||
|
||||
void ClosingSettings( HWND hWnd, int flags, int command )
|
||||
{
|
||||
if (command==IDOK)
|
||||
{
|
||||
bool bCopyHook=GetWinVersion()<WIN_VER_WIN8 && (GetSettingBool(L"ReplaceFileUI") || GetSettingBool(L"ReplaceFolderUI") || GetSettingBool(L"EnableMore"));
|
||||
|
||||
if ((flags&CSetting::FLAG_COLD) || (bCopyHook && !g_bCopyHook0))
|
||||
MessageBox(hWnd,LoadStringEx(IDS_NEW_SETTINGS2),LoadStringEx(IDS_APP_TITLE),MB_OK|MB_ICONWARNING);
|
||||
else if (flags&CSetting::FLAG_WARM)
|
||||
MessageBox(hWnd,LoadStringEx(IDS_NEW_SETTINGS1),LoadStringEx(IDS_APP_TITLE),MB_OK|MB_ICONINFORMATION);
|
||||
}
|
||||
}
|
||||
|
||||
void SettingChangedCallback( const CSetting *pSetting )
|
||||
{
|
||||
}
|
||||
|
||||
void EditSettings( void )
|
||||
{
|
||||
STARTUPINFO startupInfo={sizeof(startupInfo)};
|
||||
PROCESS_INFORMATION processInfo;
|
||||
memset(&processInfo,0,sizeof(processInfo));
|
||||
wchar_t path[_MAX_PATH];
|
||||
GetModuleFileName(g_Instance,path,_countof(path));
|
||||
wchar_t *end=PathFindFileName(path);
|
||||
*end=0;
|
||||
Strcpy(end,(int)(path+_countof(path)-end),L"ClassicExplorerSettings.exe");
|
||||
if (CreateProcess(NULL,path,NULL,NULL,TRUE,0,NULL,NULL,&startupInfo,&processInfo))
|
||||
{
|
||||
CloseHandle(processInfo.hProcess);
|
||||
CloseHandle(processInfo.hThread);
|
||||
}
|
||||
}
|
||||
|
||||
void ShowSettingsMenu( HWND parent, int x, int y )
|
||||
{
|
||||
HMENU menu=CreatePopupMenu();
|
||||
AppendMenu(menu,MF_STRING,CBandWindow::ID_SETTINGS,FindTranslation(L"Toolbar.Settings",L"Classic Explorer Settings"));
|
||||
int size=16;
|
||||
HBITMAP shellBmp=NULL;
|
||||
HICON icon=(HICON)LoadImage(g_Instance,MAKEINTRESOURCE(IDI_APPICON),IMAGE_ICON,size,size,LR_DEFAULTCOLOR);
|
||||
if (icon)
|
||||
{
|
||||
shellBmp=BitmapFromIcon(icon,size,NULL,true);
|
||||
MENUITEMINFO mii={sizeof(mii)};
|
||||
mii.fMask=MIIM_BITMAP;
|
||||
mii.hbmpItem=shellBmp;
|
||||
SetMenuItemInfo(menu,CBandWindow::ID_SETTINGS,FALSE,&mii);
|
||||
}
|
||||
MENUINFO info={sizeof(info),MIM_STYLE,MNS_CHECKORBMP};
|
||||
SetMenuInfo(menu,&info);
|
||||
|
||||
DWORD pos=GetMessagePos();
|
||||
if (!GetSettingBool(L"EnableSettings"))
|
||||
EnableMenuItem(menu,0,MF_BYPOSITION|MF_GRAYED);
|
||||
int res=TrackPopupMenu(menu,TPM_RIGHTBUTTON|TPM_RETURNCMD,x,y,0,parent,NULL);
|
||||
DestroyMenu(menu);
|
||||
if (shellBmp) DeleteObject(shellBmp);
|
||||
if (res==CBandWindow::ID_SETTINGS)
|
||||
EditSettings();
|
||||
}
|
||||
|
||||
void ShowExplorerSettings( void )
|
||||
{
|
||||
WaitDllInitThread();
|
||||
if (!GetSettingBool(L"EnableSettings"))
|
||||
return;
|
||||
wchar_t title[100];
|
||||
DWORD ver=GetVersionEx(g_Instance);
|
||||
if (ver)
|
||||
Sprintf(title,_countof(title),LoadStringEx(IDS_SETTINGS_TITLE_VER),ver>>24,(ver>>16)&0xFF,ver&0xFFFF);
|
||||
else
|
||||
Sprintf(title,_countof(title),LoadStringEx(IDS_SETTINGS_TITLE));
|
||||
EditSettings(title,true,0);
|
||||
}
|
||||
|
||||
bool DllImportSettingsXml( const wchar_t *fname )
|
||||
{
|
||||
return ImportSettingsXml(fname);
|
||||
}
|
||||
|
||||
bool DllExportSettingsXml( const wchar_t *fname )
|
||||
{
|
||||
return ExportSettingsXml(fname);
|
||||
}
|
||||
|
||||
#ifndef _WIN64
|
||||
bool DllSaveAdmx( const char *admxFile, const char *admlFile, const char *docFile, const wchar_t *language )
|
||||
{
|
||||
WaitDllInitThread();
|
||||
HMODULE dll=NULL;
|
||||
if (language[0])
|
||||
{
|
||||
wchar_t path[_MAX_PATH];
|
||||
GetCurrentDirectory(_countof(path),path);
|
||||
PathAppend(path,language);
|
||||
PathAddExtension(path,L".dll");
|
||||
dll=LoadLibraryEx(path,NULL,LOAD_LIBRARY_AS_DATAFILE|LOAD_LIBRARY_AS_IMAGE_RESOURCE);
|
||||
}
|
||||
LoadTranslationResources(dll,NULL);
|
||||
return SaveAdmx(COMPONENT_EXPLORER,admxFile,admlFile,docFile);
|
||||
}
|
||||
#endif
|
||||
9
Src/ClassicExplorer/SettingsUI.h
Normal file
9
Src/ClassicExplorer/SettingsUI.h
Normal file
@@ -0,0 +1,9 @@
|
||||
// Classic Shell (c) 2009-2017, Ivo Beltchev
|
||||
// Open-Shell (c) 2017-2018, The Open-Shell Team
|
||||
// Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author
|
||||
|
||||
#pragma once
|
||||
|
||||
void InitSettings( void );
|
||||
void EditSettings( void );
|
||||
void ShowSettingsMenu( HWND parent, int x, int y );
|
||||
134
Src/ClassicExplorer/ShareOverlay.cpp
Normal file
134
Src/ClassicExplorer/ShareOverlay.cpp
Normal file
@@ -0,0 +1,134 @@
|
||||
// Classic Shell (c) 2009-2017, Ivo Beltchev
|
||||
// Open-Shell (c) 2017-2018, The Open-Shell Team
|
||||
// Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author
|
||||
|
||||
// ShareOverlay.cpp : Implementation of CShareOverlay
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "ShareOverlay.h"
|
||||
|
||||
// CShareOverlay - adds an overlay icon to the shared folders
|
||||
|
||||
bool CShareOverlay::s_bEnabled=false;
|
||||
bool CShareOverlay::s_bShowHidden=false;
|
||||
int CShareOverlay::s_Index;
|
||||
wchar_t CShareOverlay::s_IconPath[_MAX_PATH];
|
||||
|
||||
CShareOverlay::CShareOverlay( void )
|
||||
{
|
||||
SHGetDesktopFolder(&m_pDesktop);
|
||||
m_pShareInfo=NULL;
|
||||
m_ShareCount=0;
|
||||
m_UpdateTime=0;
|
||||
InitializeCriticalSection(&m_Section);
|
||||
}
|
||||
|
||||
void CShareOverlay::FinalRelease( void )
|
||||
{
|
||||
DeleteCriticalSection(&m_Section);
|
||||
if (m_pShareInfo)
|
||||
NetApiBufferFree(m_pShareInfo);
|
||||
m_pShareInfo=NULL;
|
||||
}
|
||||
|
||||
void CShareOverlay::InitOverlay( const wchar_t *icon, bool showHidden )
|
||||
{
|
||||
s_bEnabled=true;
|
||||
if (icon)
|
||||
{
|
||||
Strcpy(s_IconPath,_countof(s_IconPath),icon);
|
||||
wchar_t *c=wcsrchr(s_IconPath,',');
|
||||
if (c)
|
||||
{
|
||||
*c=0;
|
||||
s_Index=-_wtol(c+1);
|
||||
}
|
||||
else
|
||||
s_Index=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Strcpy(s_IconPath,_countof(s_IconPath),L"%windir%\\system32\\imageres.dll");
|
||||
s_Index=-164;
|
||||
}
|
||||
DoEnvironmentSubst(s_IconPath,_countof(s_IconPath));
|
||||
s_bShowHidden=showHidden;
|
||||
}
|
||||
|
||||
HRESULT CShareOverlay::_InternalQueryInterface( REFIID iid, void** ppvObject )
|
||||
{
|
||||
if (iid==IID_IUnknown)
|
||||
{
|
||||
AddRef();
|
||||
*ppvObject=static_cast<IUnknown*>(this);
|
||||
return S_OK;
|
||||
}
|
||||
if (iid==IID_IShellIconOverlayIdentifier && s_bEnabled)
|
||||
{
|
||||
// only support IShellIconOverlayIdentifier if s_bEnabled is true
|
||||
AddRef();
|
||||
*ppvObject=static_cast<IShellIconOverlayIdentifier*>(this);
|
||||
return S_OK;
|
||||
}
|
||||
*ppvObject=NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
STDMETHODIMP CShareOverlay::IsMemberOf( LPCWSTR pwszPath, DWORD dwAttrib )
|
||||
{
|
||||
EnterCriticalSection(&m_Section);
|
||||
UpdateShareInfo();
|
||||
HRESULT res=S_FALSE;
|
||||
if (m_pShareInfo)
|
||||
{
|
||||
for (DWORD i=0;i<m_ShareCount;i++)
|
||||
{
|
||||
if (!(m_pShareInfo[i].shi502_type&STYPE_SPECIAL) && _wcsicmp(pwszPath,m_pShareInfo[i].shi502_path)==0)
|
||||
{
|
||||
if (s_bShowHidden)
|
||||
{
|
||||
res=S_OK;
|
||||
break;
|
||||
}
|
||||
int len=Strlen(m_pShareInfo[i].shi502_netname);
|
||||
if (len==0 || m_pShareInfo[i].shi502_netname[len-1]!='$')
|
||||
{
|
||||
res=S_OK;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
LeaveCriticalSection(&m_Section);
|
||||
return res;
|
||||
}
|
||||
|
||||
STDMETHODIMP CShareOverlay::GetOverlayInfo( LPWSTR pwszIconFile, int cchMax, int * pIndex, DWORD * pdwFlags )
|
||||
{
|
||||
Strcpy(pwszIconFile,cchMax,s_IconPath);
|
||||
*pIndex=s_Index;
|
||||
*pdwFlags=ISIOI_ICONFILE;
|
||||
if (s_Index)
|
||||
*pdwFlags|=ISIOI_ICONINDEX;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CShareOverlay::GetPriority( int * pIPriority )
|
||||
{
|
||||
*pIPriority=0;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CShareOverlay::UpdateShareInfo( void )
|
||||
{
|
||||
int time=GetTickCount();
|
||||
if (time-m_UpdateTime<5000)
|
||||
return;
|
||||
m_UpdateTime=time;
|
||||
if (m_pShareInfo)
|
||||
NetApiBufferFree(m_pShareInfo);
|
||||
m_pShareInfo=NULL;
|
||||
DWORD countAll;
|
||||
if (NetShareEnum(NULL,502,(BYTE**)&m_pShareInfo,MAX_PREFERRED_LENGTH,&m_ShareCount,&countAll,NULL)!=NERR_Success)
|
||||
m_ShareCount=0;
|
||||
}
|
||||
60
Src/ClassicExplorer/ShareOverlay.h
Normal file
60
Src/ClassicExplorer/ShareOverlay.h
Normal file
@@ -0,0 +1,60 @@
|
||||
// Classic Shell (c) 2009-2017, Ivo Beltchev
|
||||
// Open-Shell (c) 2017-2018, The Open-Shell Team
|
||||
// Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author
|
||||
|
||||
// ShareOverlay.h : Declaration of the CShareOverlay
|
||||
|
||||
#pragma once
|
||||
#include "resource.h" // main symbols
|
||||
#include <lm.h>
|
||||
|
||||
#include "ClassicExplorer_i.h"
|
||||
|
||||
// CShareOverlay
|
||||
|
||||
class ATL_NO_VTABLE CShareOverlay :
|
||||
public CComObjectRootEx<CComSingleThreadModel>,
|
||||
public CComCoClass<CShareOverlay, &CLSID_ShareOverlay>,
|
||||
public IShellIconOverlayIdentifier
|
||||
{
|
||||
public:
|
||||
CShareOverlay( void );
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_SHAREOVERLAY)
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
HRESULT FinalConstruct( void )
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void FinalRelease( void );
|
||||
|
||||
public:
|
||||
|
||||
HRESULT _InternalQueryInterface( REFIID iid, void** ppvObject );
|
||||
|
||||
// IShellIconOverlayIdentifier
|
||||
STDMETHOD (IsMemberOf)( LPCWSTR pwszPath, DWORD dwAttrib );
|
||||
STDMETHOD (GetOverlayInfo)( LPWSTR pwszIconFile, int cchMax, int * pIndex, DWORD * pdwFlags );
|
||||
STDMETHOD (GetPriority)( int * pIPriority );
|
||||
|
||||
static void InitOverlay( const wchar_t *icon, bool showHidden );
|
||||
|
||||
private:
|
||||
CComPtr<IShellFolder> m_pDesktop;
|
||||
CRITICAL_SECTION m_Section;
|
||||
SHARE_INFO_502 *m_pShareInfo;
|
||||
DWORD m_ShareCount;
|
||||
int m_UpdateTime;
|
||||
|
||||
void UpdateShareInfo( void );
|
||||
|
||||
static bool s_bEnabled;
|
||||
static bool s_bShowHidden;
|
||||
static int s_Index;
|
||||
static wchar_t s_IconPath[_MAX_PATH];
|
||||
};
|
||||
|
||||
OBJECT_ENTRY_AUTO(__uuidof(ShareOverlay), CShareOverlay)
|
||||
49
Src/ClassicExplorer/ShareOverlay.rgs
Normal file
49
Src/ClassicExplorer/ShareOverlay.rgs
Normal file
@@ -0,0 +1,49 @@
|
||||
HKCR
|
||||
{
|
||||
ClassicExplorer.ShareOverlay.1 = s 'ShareOverlay Class'
|
||||
{
|
||||
CLSID = s '{594D4122-1F87-41E2-96C7-825FB4796516}'
|
||||
}
|
||||
ClassicExplorer.ShareOverlay = s 'ShareOverlay Class'
|
||||
{
|
||||
CLSID = s '{594D4122-1F87-41E2-96C7-825FB4796516}'
|
||||
CurVer = s 'ClassicExplorer.ShareOverlay.1'
|
||||
}
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {594D4122-1F87-41E2-96C7-825FB4796516} = s 'ShareOverlay Class'
|
||||
{
|
||||
ProgID = s 'ClassicExplorer.ShareOverlay.1'
|
||||
VersionIndependentProgID = s 'ClassicExplorer.ShareOverlay'
|
||||
ForceRemove 'Programmable'
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
'TypeLib' = s '{BF8D124A-A4E0-402F-8152-4EF377E62586}'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HKLM
|
||||
{
|
||||
NoRemove SOFTWARE
|
||||
{
|
||||
NoRemove Microsoft
|
||||
{
|
||||
NoRemove Windows
|
||||
{
|
||||
NoRemove CurrentVersion
|
||||
{
|
||||
NoRemove Explorer
|
||||
{
|
||||
NoRemove ShellIconOverlayIdentifiers
|
||||
{
|
||||
ForceRemove ShareOverlay = s '{594D4122-1F87-41E2-96C7-825FB4796516}'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
283
Src/ClassicExplorer/dllmain.cpp
Normal file
283
Src/ClassicExplorer/dllmain.cpp
Normal file
@@ -0,0 +1,283 @@
|
||||
// Classic Shell (c) 2009-2017, Ivo Beltchev
|
||||
// Open-Shell (c) 2017-2018, The Open-Shell Team
|
||||
// Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author
|
||||
|
||||
// dllmain.cpp : Implementation of DllMain.
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "resource.h"
|
||||
#include "..\Lib\resource.h"
|
||||
#include "dllmain.h"
|
||||
#include "ShareOverlay.h"
|
||||
#include "SettingsUI.h"
|
||||
#include "Settings.h"
|
||||
#include "Translations.h"
|
||||
#include "ResourceHelper.h"
|
||||
#include "FNVHash.h"
|
||||
#include <uxtheme.h>
|
||||
#include <dwmapi.h>
|
||||
|
||||
#pragma comment(linker, \
|
||||
"\"/manifestdependency:type='Win32' "\
|
||||
"name='Microsoft.Windows.Common-Controls' "\
|
||||
"version='6.0.0.0' "\
|
||||
"processorArchitecture='*' "\
|
||||
"publicKeyToken='6595b64144ccf1df' "\
|
||||
"language='*'\"")
|
||||
|
||||
CClassicExplorerModule _AtlModule;
|
||||
bool g_bLogLevel;
|
||||
|
||||
void InitClassicCopyProcess( void );
|
||||
void InitClassicCopyThread( void );
|
||||
void FreeClassicCopyThread( void );
|
||||
|
||||
bool g_bHookCopyThreads;
|
||||
bool g_bExplorerExe;
|
||||
LPCWSTR g_LoadedSettingsAtom;
|
||||
|
||||
static int g_LoadDialogs[]=
|
||||
{
|
||||
IDD_SETTINGS,0x04000000,
|
||||
IDD_SETTINGSTREE,0x04000000,
|
||||
IDD_BROWSEFORICON,0x04000000,
|
||||
IDD_LANGUAGE,0x04000000,
|
||||
IDD_CUSTOMTOOLBAR,0x04000000,
|
||||
IDD_CUSTOMTREE,0x04000000,
|
||||
IDD_PROGRESS,0x04000004,
|
||||
0
|
||||
};
|
||||
|
||||
const wchar_t *GetDocRelativePath( void )
|
||||
{
|
||||
return DOC_PATH;
|
||||
}
|
||||
|
||||
struct FindChild
|
||||
{
|
||||
const wchar_t *className;
|
||||
HWND hWnd;
|
||||
};
|
||||
|
||||
static BOOL CALLBACK EnumChildProc( HWND hwnd, LPARAM lParam )
|
||||
{
|
||||
FindChild &find=*(FindChild*)lParam;
|
||||
wchar_t name[256];
|
||||
GetClassName(hwnd,name,_countof(name));
|
||||
if (_wcsicmp(name,find.className)!=0) return TRUE;
|
||||
find.hWnd=hwnd;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
HWND FindChildWindow( HWND hwnd, const wchar_t *className )
|
||||
{
|
||||
FindChild find={className};
|
||||
EnumChildWindows(hwnd,EnumChildProc,(LPARAM)&find);
|
||||
return find.hWnd;
|
||||
}
|
||||
|
||||
static DWORD g_TlsIndex;
|
||||
|
||||
TlsData *GetTlsData( void )
|
||||
{
|
||||
void *pData=TlsGetValue(g_TlsIndex);
|
||||
if (!pData)
|
||||
{
|
||||
pData=(void*)LocalAlloc(LPTR,sizeof(TlsData));
|
||||
memset(pData,0,sizeof(TlsData));
|
||||
TlsSetValue(g_TlsIndex,pData);
|
||||
}
|
||||
return (TlsData*)pData;
|
||||
}
|
||||
|
||||
static HANDLE g_DllInitThread;
|
||||
|
||||
static DWORD CALLBACK DllInitThread( void* )
|
||||
{
|
||||
{
|
||||
g_bLogLevel=false;
|
||||
CRegKey regKey;
|
||||
if (regKey.Open(HKEY_CURRENT_USER,L"Software\\OpenShell\\ClassicExplorer\\Settings",KEY_READ|KEY_WOW64_64KEY)==ERROR_SUCCESS)
|
||||
{
|
||||
DWORD log;
|
||||
if (regKey.QueryDWORDValue(L"LogLevel",log)==ERROR_SUCCESS)
|
||||
g_bLogLevel=log!=0;
|
||||
}
|
||||
}
|
||||
InitSettings();
|
||||
|
||||
wchar_t path[_MAX_PATH];
|
||||
GetModuleFileName(g_Instance,path,_countof(path));
|
||||
*PathFindFileName(path)=0;
|
||||
wchar_t fname[_MAX_PATH];
|
||||
Sprintf(fname,_countof(fname),L"%s" INI_PATH L"ExplorerL10N.ini",path);
|
||||
CString language=GetSettingString(L"Language");
|
||||
ParseTranslations(fname,language);
|
||||
|
||||
HINSTANCE resInstance=LoadTranslationDll(language);
|
||||
|
||||
LoadTranslationResources(resInstance,g_LoadDialogs);
|
||||
|
||||
if (resInstance)
|
||||
FreeLibrary(resInstance);
|
||||
|
||||
if (GetSettingBool(L"ShareOverlay") && (g_bExplorerExe || !GetSettingBool(L"ShareExplorer")))
|
||||
CShareOverlay::InitOverlay(GetSettingString(L"ShareOverlayIcon"),GetSettingBool(L"ShareOverlayHidden"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
void WaitDllInitThread( void )
|
||||
{
|
||||
ATLASSERT(g_DllInitThread);
|
||||
WaitForSingleObject(g_DllInitThread,INFINITE);
|
||||
}
|
||||
|
||||
// DLL Entry Point
|
||||
extern "C" BOOL WINAPI DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved )
|
||||
{
|
||||
if (dwReason==DLL_PROCESS_ATTACH)
|
||||
{
|
||||
g_Instance=hInstance;
|
||||
g_TlsIndex=TlsAlloc();
|
||||
if (g_TlsIndex==TLS_OUT_OF_INDEXES)
|
||||
return FALSE; // TLS failure
|
||||
|
||||
CRegKey regSettings, regSettingsUser, regPolicy, regPolicyUser;
|
||||
bool bUpgrade=OpenSettingsKeys(COMPONENT_EXPLORER,regSettings,regSettingsUser,regPolicy,regPolicyUser);
|
||||
|
||||
enum
|
||||
{
|
||||
SETTING_SHARE_OVERLAY,
|
||||
SETTING_SHARE_EXPLORER,
|
||||
SETTING_FILE_EXPLORER,
|
||||
SETTING_REPLACE_FILE,
|
||||
SETTING_REPLACE_FOLDER,
|
||||
SETTING_MORE,
|
||||
SETTING_WHITE_LIST,
|
||||
SETTING_BLACK_LIST,
|
||||
};
|
||||
|
||||
CSetting settings[]={
|
||||
{L"ShareOverlay",CSetting::TYPE_BOOL,0,0,0},
|
||||
{L"ShareExplorer",CSetting::TYPE_BOOL,0,0,1},
|
||||
{L"FileExplorer",CSetting::TYPE_BOOL,0,0,1},
|
||||
{L"ReplaceFileUI",CSetting::TYPE_BOOL,0,0,1},
|
||||
{L"ReplaceFolderUI",CSetting::TYPE_BOOL,0,0,1},
|
||||
{L"EnableMore",CSetting::TYPE_BOOL,0,0,0},
|
||||
{L"ProcessWhiteList",CSetting::TYPE_STRING,0,0,L""},
|
||||
{L"ProcessBlackList",CSetting::TYPE_STRING,0,0,L""},
|
||||
{NULL}
|
||||
};
|
||||
|
||||
wchar_t path[_MAX_PATH];
|
||||
GetModuleFileName(NULL,path,_countof(path));
|
||||
const wchar_t *exe=PathFindFileName(path);
|
||||
g_bExplorerExe=(_wcsicmp(exe,L"explorer.exe")==0 || _wcsicmp(exe,L"verclsid.exe")==0);
|
||||
bool bReplaceUI=false;
|
||||
if (GetWinVersion()<=WIN_VER_WIN7)
|
||||
{
|
||||
settings[SETTING_REPLACE_FILE].LoadValue(regSettings,regSettingsUser,regPolicy,regPolicyUser);
|
||||
settings[SETTING_REPLACE_FOLDER].LoadValue(regSettings,regSettingsUser,regPolicy,regPolicyUser);
|
||||
settings[SETTING_MORE].LoadValue(regSettings,regSettingsUser,regPolicy,regPolicyUser);
|
||||
bReplaceUI=(GetSettingBool(settings[SETTING_REPLACE_FILE]) || GetSettingBool(settings[SETTING_REPLACE_FOLDER]) || GetSettingBool(settings[SETTING_MORE]));
|
||||
}
|
||||
|
||||
settings[SETTING_FILE_EXPLORER].LoadValue(regSettings,regSettingsUser,regPolicy,regPolicyUser);
|
||||
if (_wcsicmp(exe,L"regsvr32.exe")!=0 && _wcsicmp(exe,L"msiexec.exe")!=0 && _wcsicmp(exe,L"ClassicExplorerSettings.exe")!=0 && !g_bExplorerExe)
|
||||
{
|
||||
// some arbitrary app
|
||||
settings[SETTING_SHARE_OVERLAY].LoadValue(regSettings,regSettingsUser,regPolicy,regPolicyUser);
|
||||
settings[SETTING_SHARE_EXPLORER].LoadValue(regSettings,regSettingsUser,regPolicy,regPolicyUser);
|
||||
if ((!GetSettingBool(settings[SETTING_SHARE_OVERLAY]) || GetSettingBool(settings[SETTING_SHARE_EXPLORER])) && (!bReplaceUI || GetSettingBool(settings[SETTING_FILE_EXPLORER])))
|
||||
return FALSE;
|
||||
|
||||
settings[SETTING_WHITE_LIST].LoadValue(regSettings,regSettingsUser,regPolicy,regPolicyUser);
|
||||
CString whiteList=GetSettingString(settings[SETTING_WHITE_LIST]);
|
||||
if (!whiteList.IsEmpty())
|
||||
{
|
||||
// check for whitelisted process names
|
||||
const wchar_t *str=whiteList;
|
||||
bool bFound=false;
|
||||
while (*str)
|
||||
{
|
||||
wchar_t token[_MAX_PATH];
|
||||
str=GetToken(str,token,_countof(token),L",;");
|
||||
wchar_t *start=token;
|
||||
while (*start==' ')
|
||||
start++;
|
||||
wchar_t *end=start+Strlen(start);
|
||||
while (end>start && end[-1]==' ')
|
||||
end--;
|
||||
*end=0;
|
||||
if (_wcsicmp(exe,start)==0)
|
||||
{
|
||||
bFound=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!bFound)
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
settings[SETTING_BLACK_LIST].LoadValue(regSettings,regSettingsUser,regPolicy,regPolicyUser);
|
||||
// check for blacklisted process names
|
||||
CString blackList=GetSettingString(settings[SETTING_BLACK_LIST]);
|
||||
const wchar_t *str=blackList;
|
||||
while (*str)
|
||||
{
|
||||
wchar_t token[_MAX_PATH];
|
||||
str=GetToken(str,token,_countof(token),L",;");
|
||||
wchar_t *start=token;
|
||||
while (*start==' ')
|
||||
start++;
|
||||
wchar_t *end=start+Strlen(start);
|
||||
while (end>start && end[-1]==' ')
|
||||
end--;
|
||||
*end=0;
|
||||
if (_wcsicmp(exe,start)==0)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_LoadedSettingsAtom=(LPCWSTR)GlobalAddAtom(L"ClassicExplorer.LoadedSettings");
|
||||
|
||||
g_bHookCopyThreads=(bReplaceUI && (g_bExplorerExe || !GetSettingBool(settings[SETTING_FILE_EXPLORER])));
|
||||
if (g_bHookCopyThreads)
|
||||
{
|
||||
InitClassicCopyProcess();
|
||||
InitClassicCopyThread();
|
||||
}
|
||||
|
||||
g_DllInitThread=CreateThread(NULL,0,DllInitThread,NULL,0,NULL);
|
||||
}
|
||||
|
||||
if (dwReason==DLL_THREAD_ATTACH)
|
||||
{
|
||||
if (g_bHookCopyThreads)
|
||||
InitClassicCopyThread();
|
||||
}
|
||||
|
||||
if (dwReason==DLL_THREAD_DETACH)
|
||||
{
|
||||
void *pData=TlsGetValue(g_TlsIndex);
|
||||
if (pData)
|
||||
LocalFree((HLOCAL)pData);
|
||||
TlsSetValue(g_TlsIndex,NULL);
|
||||
if (g_bHookCopyThreads)
|
||||
FreeClassicCopyThread();
|
||||
}
|
||||
|
||||
if (dwReason==DLL_PROCESS_DETACH)
|
||||
{
|
||||
void *pData=TlsGetValue(g_TlsIndex);
|
||||
if (pData)
|
||||
LocalFree((HLOCAL)pData);
|
||||
TlsSetValue(g_TlsIndex,NULL);
|
||||
TlsFree(g_TlsIndex);
|
||||
GlobalDeleteAtom((ATOM)(uintptr_t)g_LoadedSettingsAtom);
|
||||
}
|
||||
|
||||
return _AtlModule.DllMain(dwReason, lpReserved);
|
||||
}
|
||||
44
Src/ClassicExplorer/dllmain.h
Normal file
44
Src/ClassicExplorer/dllmain.h
Normal file
@@ -0,0 +1,44 @@
|
||||
// Classic Shell (c) 2009-2017, Ivo Beltchev
|
||||
// Open-Shell (c) 2017-2018, The Open-Shell Team
|
||||
// Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author
|
||||
|
||||
// dllmain.h : Declaration of module class.
|
||||
#pragma once
|
||||
|
||||
#include "ClassicExplorer_i.h"
|
||||
#include <vector>
|
||||
|
||||
class CClassicExplorerModule : public CAtlDllModuleT< CClassicExplorerModule >
|
||||
{
|
||||
public :
|
||||
DECLARE_LIBID(LIBID_ClassicExplorerLib)
|
||||
DECLARE_REGISTRY_APPID_RESOURCEID(IDR_CLASSICEXPLORER, "{65843E27-A491-429F-84A0-30A947E20F92}")
|
||||
};
|
||||
|
||||
extern class CClassicExplorerModule _AtlModule;
|
||||
|
||||
// Some utility functions used by various modules
|
||||
HWND FindChildWindow( HWND hwnd, const wchar_t *className );
|
||||
INT_PTR RunSettingsDialog( HWND hWndParent, DLGPROC lpDialogFunc );
|
||||
|
||||
struct TlsData
|
||||
{
|
||||
// the bho instance that runs on this thread
|
||||
class CExplorerBHO *bho;
|
||||
|
||||
// the band instance that runs on this thread
|
||||
class CExplorerBand *band;
|
||||
|
||||
// one hook for each copy thread
|
||||
HHOOK copyHook;
|
||||
|
||||
// bCopyMultiFile is true if the first dialog in this thread is multi-file (IDD_FILEMULTI)
|
||||
// if so, all the rest are multi-file. this makes the UI consistent (like the position of the Yes button doesn't change)
|
||||
bool bCopyMultiFile;
|
||||
};
|
||||
|
||||
TlsData *GetTlsData( void );
|
||||
extern LPCWSTR g_LoadedSettingsAtom;
|
||||
extern bool g_bLogLevel;
|
||||
|
||||
void WaitDllInitThread( void );
|
||||
336
Src/ClassicExplorer/resource.h
Normal file
336
Src/ClassicExplorer/resource.h
Normal file
@@ -0,0 +1,336 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by ClassicExplorer.rc
|
||||
//
|
||||
#define IDI_APPICON 1
|
||||
#define IDI_UP 2
|
||||
#define IDI_UPDISABLED 3
|
||||
#define IDI_UP2NORMAL 4
|
||||
#define IDI_UP2PRESSED 5
|
||||
#define IDI_UP2HOT 6
|
||||
#define IDI_UP2DISABLED 7
|
||||
#define IDR_CLASSICEXPLORER 101
|
||||
#define IDR_EXPLORERBAND 102
|
||||
#define IDR_EXPLORERBHO 104
|
||||
#define IDR_SHAREOVERLAY 105
|
||||
#define IDD_FILEMULTI 129
|
||||
#define IDD_FILE 130
|
||||
#define IDC_LINKMORE 204
|
||||
#define IDC_CHECKBHO 205
|
||||
#define IDC_CHECKCOPY 206
|
||||
#define IDC_STATICPROMPT1 207
|
||||
#define IDC_CHECKBIG 207
|
||||
#define IDC_STATICPROMPT2 208
|
||||
#define IDD_FILEMULTIR 208
|
||||
#define IDD_FILER 209
|
||||
#define IDC_STATICICON 209
|
||||
#define IDC_CHECK1 210
|
||||
#define IDD_FOLDERMULTI 210
|
||||
#define IDC_CHECK2 211
|
||||
#define IDD_FOLDER 211
|
||||
#define IDC_CHECK3 212
|
||||
#define IDD_FOLDERR 212
|
||||
#define IDC_CHECK4 213
|
||||
#define IDD_FOLDERMULTIR 213
|
||||
#define IDC_CHECK5 214
|
||||
#define IDC_CHECK6 215
|
||||
#define IDR_CLASSICCOPYEXT 216
|
||||
#define IDC_CHECKNOFADE 218
|
||||
#define IDC_CHECKSIZE 219
|
||||
#define IDC_CHECKAUTO 220
|
||||
#define IDC_CHECKCOPYFOLDER 221
|
||||
#define IDC_CHECK7 222
|
||||
#define IDC_CHECK8 223
|
||||
#define IDC_COMBOSTYLE 224
|
||||
#define IDC_CHECKOFFSET 225
|
||||
#define IDC_CHECKUP 226
|
||||
#define IDC_CHECKTITLE 227
|
||||
#define IDC_CHECKICON 228
|
||||
#define IDC_CHECKCRUMBS 229
|
||||
#define IDC_CHECKSHARED 230
|
||||
#define IDC_CHECKSHAREDEXP 231
|
||||
#define IDC_CHECKCOPYEXP 233
|
||||
#define IDC_CHECKMORE 234
|
||||
#define IDC_CHECKINFO 235
|
||||
#define IDC_COMBOCOMMAND 239
|
||||
#define IDC_EDITLABEL 240
|
||||
#define IDC_EDITTIP 241
|
||||
#define IDC_BUTTONLINK 242
|
||||
#define IDC_BUTTONCOMMAND 243
|
||||
#define IDC_EDITICON 245
|
||||
#define IDC_BUTTONICON 246
|
||||
#define IDC_EDITICOND 247
|
||||
#define IDC_BUTTONICOND 248
|
||||
#define IDC_STATICCOMMAND 251
|
||||
#define IDC_STATICLINK 252
|
||||
#define IDC_STATICTEXT 253
|
||||
#define IDC_STATICINFOTIP 254
|
||||
#define IDC_STATICICOND 255
|
||||
#define IDC_ICONN 256
|
||||
#define IDC_ICOND 257
|
||||
#define IDC_COMBOLINK 258
|
||||
#define IDC_STATICICON1 260
|
||||
#define IDC_BUTTONRESET 261
|
||||
#define IDC_STATICFNAME 1003
|
||||
#define IDC_STATICSRCSIZE 1004
|
||||
#define IDC_STATICSRCTIME 1005
|
||||
#define IDC_STATICDSTSIZE 1006
|
||||
#define IDC_STATICDSTTIME 1007
|
||||
#define IDC_STATICSRCICON 1008
|
||||
#define IDC_STATICDSTICON 1009
|
||||
#define IDD_CUSTOMTOOLBAR 2001
|
||||
#define IDS_APP_TITLE 2001
|
||||
#define IDS_SETTINGS_BTN 2002
|
||||
#define IDS_NEW_SETTINGS1 2003
|
||||
#define IDS_NEW_SETTINGS2 2004
|
||||
#define IDS_SETTINGS_TITLE 2005
|
||||
#define IDS_SETTINGS_TITLE_VER 2006
|
||||
#define IDS_LANGUAGE_SETTINGS 2010
|
||||
#define IDS_TOOLBAR_SETTINGS 2011
|
||||
#define IDS_BIG_BUTTONS 2012
|
||||
#define IDS_BIG_BUTTONS_TIP 2013
|
||||
#define IDS_SMALL_SIZE 2014
|
||||
#define IDS_SMALL_SIZE_TIP 2015
|
||||
#define IDS_LARGE_SIZE 2016
|
||||
#define IDS_LARGE_SIZE_TIP 2017
|
||||
#define IDS_MENU_SIZE 2018
|
||||
#define IDS_MENU_SIZE_TIP 2019
|
||||
#define IDS_SAME_SIZE 2020
|
||||
#define IDS_SAME_SIZE_TIP 2021
|
||||
#define IDS_LIST_MODE 2022
|
||||
#define IDS_LIST_MODE_TIP 2023
|
||||
#define IDS_RESIZEABLE 2024
|
||||
#define IDS_RESIZEABLE_TIP 2025
|
||||
#define IDS_BUTTONS_SETTINGS 2026
|
||||
#define IDS_NAVIGATION_SETTINGS 2027
|
||||
#define IDS_TREE_STYLE 2028
|
||||
#define IDS_TREE_STYLE_TIP 2029
|
||||
#define IDS_XPCLASSIC 2030
|
||||
#define IDS_XPCLASSIC_TIP 2031
|
||||
#define IDS_XPSIMPLE 2032
|
||||
#define IDS_XPSIMPLE_TIP 2033
|
||||
#define IDS_VISTA 2034
|
||||
#define IDS_VISTA_TIP 2035
|
||||
#define IDS_TREE_SPACING 2036
|
||||
#define IDS_TREE_SPACING_TIP 2037
|
||||
#define IDS_NO_FADE 2038
|
||||
#define IDS_NO_FADE_TIP 2039
|
||||
#define IDS_FULL_INDENT 2040
|
||||
#define IDS_FULL_INDENT_TIP 2041
|
||||
#define IDS_NAVIGATE 2042
|
||||
#define IDS_NAVIGATE_TIP 2043
|
||||
#define IDS_NAV_DELAY 2044
|
||||
#define IDS_NAV_DELAY_TIP 2045
|
||||
#define IDS_ALT_ENTER 2046
|
||||
#define IDS_ALT_ENTER_TIP 2047
|
||||
#define IDS_FIX_SCROLL 2048
|
||||
#define IDS_FIX_SCROLL_TIP 2049
|
||||
#define IDS_TITLE_SETTINGS 2050
|
||||
#define IDS_SHOW_CAPTION 2051
|
||||
#define IDS_SHOW_CAPTION_TIP 2052
|
||||
#define IDS_SHOW_ICON 2053
|
||||
#define IDS_SHOW_ICON_TIP 2054
|
||||
#define IDS_NO_BREADCRUMBS 2055
|
||||
#define IDS_NO_BREADCRUMBS_TIP 2056
|
||||
#define IDS_ADDRESS_HISTORY 2057
|
||||
#define IDS_ADDRESS_HISTORY_TIP 2058
|
||||
#define IDS_NORMAL_HISTORY 2059
|
||||
#define IDS_NORMAL_HISTORY_TIP 2060
|
||||
#define IDS_SIMPLE_PATH 2061
|
||||
#define IDS_SIMPLE_PATH_TIP 2062
|
||||
#define IDS_EXTENDED_PATH 2063
|
||||
#define IDS_EXTENDED_PATH_TIP 2064
|
||||
#define IDS_HIDE_SEARCH 2065
|
||||
#define IDS_HIDE_SEARCH_TIP 2066
|
||||
#define IDS_UP_SETTINGS 2067
|
||||
#define IDS_SHOW_UP 2068
|
||||
#define IDS_SHOW_UP_TIP 2069
|
||||
#define IDS_DONT_SHOW 2070
|
||||
#define IDS_DONT_SHOW_TIP 2071
|
||||
#define IDS_BEFORE_BACK 2072
|
||||
#define IDS_BEFORE_BACK_TIP 2073
|
||||
#define IDS_AFTER_BACK 2074
|
||||
#define IDS_AFTER_BACK_TIP 2075
|
||||
#define IDS_UP_NORMAL 2076
|
||||
#define IDS_UP_NORMAL_TIP 2077
|
||||
#define IDS_UP_HOT 2078
|
||||
#define IDS_UP_HOT_TIP 2079
|
||||
#define IDS_UP_PRESSED 2080
|
||||
#define IDS_UP_PRESSED_TIP 2081
|
||||
#define IDS_UP_DISABLED 2082
|
||||
#define IDS_UP_DISABLED_TIP 2083
|
||||
#define IDS_UP_SIZE 2084
|
||||
#define IDS_UP_SIZE_TIP 2085
|
||||
#define IDS_STATUS_SETTINGS 2086
|
||||
#define IDS_FREE_SPACE 2087
|
||||
#define IDS_FREE_SPACE_TIP 2088
|
||||
#define IDS_INFO_TIP 2089
|
||||
#define IDS_INFO_TIP_TIP 2090
|
||||
#define IDS_FORCE_REFRESH 2091
|
||||
#define IDS_FORCE_REFRESH_TIP 2092
|
||||
#define IDS_FILE_SETTINGS 2093
|
||||
#define IDS_FILE_UI 2094
|
||||
#define IDS_FILE_UI_TIP 2095
|
||||
#define IDS_FOLDER_UI 2096
|
||||
#define IDS_FOLDER_UI_TIP 2097
|
||||
#define IDS_ALERT_LEVEL 2098
|
||||
#define IDS_ALERT_LEVEL_TIP 2099
|
||||
#define IDS_NO_ALERT 2100
|
||||
#define IDS_NO_ALERT_TIP 2101
|
||||
#define IDS_SYS_FILES 2102
|
||||
#define IDS_SYS_FILES_TIP 2103
|
||||
#define IDS_RO_FILES 2104
|
||||
#define IDS_RO_FILES_TIP 2105
|
||||
#define IDS_MORE 2106
|
||||
#define IDS_MORE_TIP 2107
|
||||
#define IDS_MORE_DELAY 2108
|
||||
#define IDS_MORE_DELAY_TIP 2109
|
||||
#define IDS_FILE_EXPLORER 2110
|
||||
#define IDS_FILE_EXPLORER_TIP 2111
|
||||
#define IDS_FILEPANE_SETTINGS 2112
|
||||
#define IDS_SHARE 2113
|
||||
#define IDS_SHARE_TIP 2114
|
||||
#define IDS_SHARE_ICON 2115
|
||||
#define IDS_SHARE_ICON_TIP 2116
|
||||
#define IDS_SHARE_EXPLORER 2117
|
||||
#define IDS_SHARE_EXPLORER_TIP 2118
|
||||
#define IDS_HEADERS 2119
|
||||
#define IDS_HEADERS_TIP 2120
|
||||
#define IDS_SCROLLBAR 2121
|
||||
#define IDS_SCROLLBAR_TIP 2122
|
||||
#define IDS_SCROLLBAR_DEFAULT 2123
|
||||
#define IDS_SCROLLBAR_DEFAULT_TIP 2124
|
||||
#define IDS_SCROLLBAR_ON 2125
|
||||
#define IDS_SCROLLBAR_ON_TIP 2126
|
||||
#define IDS_SCROLLBAR_OFF 2127
|
||||
#define IDS_SCROLLBAR_OFF_TIP 2128
|
||||
#define IDS_COMMAND_TIP 2129
|
||||
#define IDS_LINK_TIP 2130
|
||||
#define IDS_TEXT_TIP 2131
|
||||
#define IDS_TIP_TIP 2132
|
||||
#define IDS_ICON_TIP 2133
|
||||
#define IDS_ICOND_TIP 2134
|
||||
#define IDS_RESTORE_TIP 2135
|
||||
#define IDS_SEPARATOR_TIP 2136
|
||||
#define IDS_UP_TIP 2137
|
||||
#define IDS_CUT_TIP 2138
|
||||
#define IDS_COPY_TIP 2139
|
||||
#define IDS_PASTE_TIP 2140
|
||||
#define IDS_DELETE_TIP 2141
|
||||
#define IDS_PROPERTIES_TIP 2142
|
||||
#define IDS_EMAIL_TIP 2143
|
||||
#define IDS_SETTINGS_TIP 2144
|
||||
#define IDS_REFRESH_TIP 2145
|
||||
#define IDS_STOP_TIP 2146
|
||||
#define IDS_RENAME_TIP 2147
|
||||
#define IDS_MOVETO_TIP 2148
|
||||
#define IDS_COPYTO_TIP 2149
|
||||
#define IDS_UNDO_TIP 2150
|
||||
#define IDS_REDO_TIP 2151
|
||||
#define IDS_SELECTALL_TIP 2152
|
||||
#define IDS_DESELECT_TIP 2153
|
||||
#define IDS_INVERT_TIP 2154
|
||||
#define IDS_BACK_TIP 2155
|
||||
#define IDS_FORWARD_TIP 2156
|
||||
#define IDS_VIEWTILES_TIP 2157
|
||||
#define IDS_VIEWDEATAILS_TIP 2158
|
||||
#define IDS_VIEWLIST_TIP 2159
|
||||
#define IDS_VIEWCONTENT_TIP 2160
|
||||
#define IDS_VIEWICONS1_TIP 2161
|
||||
#define IDS_VIEWICONS2_TIP 2162
|
||||
#define IDS_VIEWICONS3_TIP 2163
|
||||
#define IDS_VIEWICONS4_TIP 2164
|
||||
#define IDS_OPEN_TIP 2165
|
||||
#define IDS_CUSTOM_TIP 2166
|
||||
#define IDS_NEWFOLDER_TIP 2167
|
||||
#define IDS_SCROLLTIP 2168
|
||||
#define IDS_SCROLLTIP_TIP 2169
|
||||
#define IDS_NAV_DEFAULT 2170
|
||||
#define IDS_NAV_DEFAULT_TIP 2171
|
||||
#define IDS_NAV_KBD 2172
|
||||
#define IDS_NAV_KBD_TIP 2173
|
||||
#define IDS_NAV_ALWAYS 2174
|
||||
#define IDS_NAV_ALWAYS_TIP 2175
|
||||
#define IDS_ALT_D 2176
|
||||
#define IDS_ALT_D_TIP 2177
|
||||
#define IDS_SORT_TIP 2178
|
||||
#define IDS_GROUP_TIP 2179
|
||||
#define IDS_PASTE_SHORTCUT_TIP 2180
|
||||
#define IDS_UP_HOTKEY 2181
|
||||
#define IDS_UP_HOTKEY_TIP 2182
|
||||
#define IDS_MAP_DRIVE_TIP 2183
|
||||
#define IDS_DISCONNECT_DRIVE_TIP 2184
|
||||
#define IDS_CUSTOMIZEFOLDER_TIP 2185
|
||||
#define IDS_SEPARATOR_ITEM 2186
|
||||
#define IDS_UP_ITEM 2187
|
||||
#define IDS_CUT_ITEM 2188
|
||||
#define IDS_COPY_ITEM 2189
|
||||
#define IDS_PASTE_ITEM 2190
|
||||
#define IDS_PASTE_LNK_ITEM 2191
|
||||
#define IDS_DELETE_ITEM 2192
|
||||
#define IDS_PROPERTIES_ITEM 2193
|
||||
#define IDS_EMAIL_ITEM 2194
|
||||
#define IDS_SETTINGS_ITEM 2195
|
||||
#define IDS_REFRESH_ITEM 2196
|
||||
#define IDS_STOP_ITEM 2197
|
||||
#define IDS_RENAME_ITEM 2198
|
||||
#define IDS_NEWFOLDER_ITEM 2199
|
||||
#define IDS_MOVETO_ITEM 2200
|
||||
#define IDS_COPYTO_ITEM 2201
|
||||
#define IDS_UNDO_ITEM 2202
|
||||
#define IDS_REDO_ITEM 2203
|
||||
#define IDS_SELECTALL_ITEM 2204
|
||||
#define IDS_DESELECT_ITEM 2205
|
||||
#define IDS_INVERT_ITEM 2206
|
||||
#define IDS_BACK_ITEM 2207
|
||||
#define IDS_FORWARD_ITEM 2208
|
||||
#define IDS_MAP_DRIVE_ITEM 2209
|
||||
#define IDS_DISCONNECT_ITEM 2210
|
||||
#define IDS_CUSTOMIZE_ITEM 2211
|
||||
#define IDS_VIEWTILES_ITEM 2212
|
||||
#define IDS_VIEWDETAILS_ITEM 2213
|
||||
#define IDS_VIEWLIST_ITEM 2214
|
||||
#define IDS_VIEWCONTENT_ITEM 2215
|
||||
#define IDS_VIEWICONS1_ITEM 2216
|
||||
#define IDS_VIEWICONS2_ITEM 2217
|
||||
#define IDS_VIEWICONS3_ITEM 2218
|
||||
#define IDS_VIEWICONS4_ITEM 2219
|
||||
#define IDS_OPEN_ITEM 2220
|
||||
#define IDS_SORYBY_ITEM 2221
|
||||
#define IDS_GROUPBY_ITEM 2222
|
||||
#define IDS_CUSTOM_ITEM 2223
|
||||
#define IDS_SHOWSTATUSBAR 2224
|
||||
#define IDS_SHOWSTATUSBAR_TIP 2225
|
||||
#define IDS_SHOW_ZONE 2226
|
||||
#define IDS_SHOW_ZONE_TIP 2227
|
||||
#define IDS_SHARE_HIDDEN 2228
|
||||
#define IDS_SHARE_HIDDEN_TIP 2229
|
||||
#define IDS_NAVPANE_ITEM 2230
|
||||
#define IDS_NAVPANE_TIP 2231
|
||||
#define IDS_DETAILSPANE_ITEM 2232
|
||||
#define IDS_DETAILSPANE_TIP 2233
|
||||
#define IDS_PREVIEWPANE_ITEM 2234
|
||||
#define IDS_PREVIEWPANE_TIP 2235
|
||||
#define IDS_SHOW_EXTENSIONS 2236
|
||||
#define IDS_SHOW_EXTENSIONS_TIP 2237
|
||||
#define IDS_HIDDEN_FILES 2238
|
||||
#define IDS_HIDDEN_FILES_TIP 2239
|
||||
#define IDS_SYSTEM_FILES 2240
|
||||
#define IDS_SYSTEM_FILES_TIP 2241
|
||||
#define IDS_ZIP_ITEM 2242
|
||||
#define IDS_ZIP_TIP 2243
|
||||
#define IDS_STATUS_FONT 2244
|
||||
#define IDS_STATUS_FONT_TIP 2245
|
||||
#define IDS_FOLDEROPTIONS 2246
|
||||
#define IDS_FOLDEROPTIONS_TIP 2247
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 227
|
||||
#define _APS_NEXT_COMMAND_VALUE 32769
|
||||
#define _APS_NEXT_CONTROL_VALUE 262
|
||||
#define _APS_NEXT_SYMED_VALUE 106
|
||||
#endif
|
||||
#endif
|
||||
6
Src/ClassicExplorer/stdafx.cpp
Normal file
6
Src/ClassicExplorer/stdafx.cpp
Normal file
@@ -0,0 +1,6 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// ClassicExplorer.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
37
Src/ClassicExplorer/stdafx.h
Normal file
37
Src/ClassicExplorer/stdafx.h
Normal file
@@ -0,0 +1,37 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently,
|
||||
// but are changed infrequently
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "targetver.h"
|
||||
|
||||
#define STRICT_TYPED_ITEMIDS
|
||||
|
||||
#define _ATL_APARTMENT_THREADED
|
||||
#define _ATL_NO_AUTOMATIC_NAMESPACE
|
||||
|
||||
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
|
||||
|
||||
#include "resource.h"
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlctl.h>
|
||||
#include <atlstr.h>
|
||||
|
||||
using namespace ATL;
|
||||
|
||||
#include <shobjidl.h>
|
||||
#include <exdispid.h>
|
||||
#include <shlguid.h>
|
||||
#include <shlobj.h>
|
||||
|
||||
#ifdef BUILD_SETUP
|
||||
#define INI_PATH L""
|
||||
#define DOC_PATH L""
|
||||
#else
|
||||
#define INI_PATH L"..\\"
|
||||
#define DOC_PATH L"..\\..\\Docs\\Help\\"
|
||||
#endif
|
||||
|
||||
#include "StringUtils.h"
|
||||
24
Src/ClassicExplorer/targetver.h
Normal file
24
Src/ClassicExplorer/targetver.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
// The following macros define the minimum required platform. The minimum required platform
|
||||
// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run
|
||||
// your application. The macros work by enabling all features available on platform versions up to and
|
||||
// including the version specified.
|
||||
|
||||
// Modify the following defines if you have to target a platform prior to the ones specified below.
|
||||
// Refer to MSDN for the latest info on corresponding values for different platforms.
|
||||
#ifndef WINVER // Specifies that the minimum required platform is Windows 7.
|
||||
#define WINVER 0x0602 // Change this to the appropriate value to target other versions of Windows.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows 7.
|
||||
#define _WIN32_WINNT 0x0602 // Change this to the appropriate value to target other versions of Windows.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98.
|
||||
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0.
|
||||
#define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE.
|
||||
#endif
|
||||
BIN
Src/ClassicExplorer/up.ico
Normal file
BIN
Src/ClassicExplorer/up.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.7 KiB |
BIN
Src/ClassicExplorer/up2Disabled.ico
Normal file
BIN
Src/ClassicExplorer/up2Disabled.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
BIN
Src/ClassicExplorer/up2Hot.ico
Normal file
BIN
Src/ClassicExplorer/up2Hot.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
BIN
Src/ClassicExplorer/up2Normal.ico
Normal file
BIN
Src/ClassicExplorer/up2Normal.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
BIN
Src/ClassicExplorer/up2Pressed.ico
Normal file
BIN
Src/ClassicExplorer/up2Pressed.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
BIN
Src/ClassicExplorer/upDisabled.ico
Normal file
BIN
Src/ClassicExplorer/upDisabled.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.7 KiB |
Reference in New Issue
Block a user