diff --git a/Src/ClassicExplorer/ClassicExplorer.vcxproj b/Src/ClassicExplorer/ClassicExplorer.vcxproj
index db48382..0587bfe 100644
--- a/Src/ClassicExplorer/ClassicExplorer.vcxproj
+++ b/Src/ClassicExplorer/ClassicExplorer.vcxproj
@@ -165,6 +165,8 @@
Level3
EditAndContinue
true
+ true
+ stdcpp17
_DEBUG;%(PreprocessorDefinitions)
@@ -199,6 +201,8 @@
Level3
ProgramDatabase
true
+ true
+ stdcpp17
_DEBUG;%(PreprocessorDefinitions)
@@ -232,6 +236,8 @@
Level3
ProgramDatabase
true
+ true
+ stdcpp17
NDEBUG;%(PreprocessorDefinitions)
@@ -266,6 +272,8 @@
Level3
ProgramDatabase
true
+ true
+ stdcpp17
NDEBUG;%(PreprocessorDefinitions)
@@ -302,6 +310,8 @@
true
ProgramDatabase
true
+ true
+ stdcpp17
NDEBUG;%(PreprocessorDefinitions)
@@ -336,6 +346,8 @@
true
ProgramDatabase
true
+ true
+ stdcpp17
NDEBUG;%(PreprocessorDefinitions)
diff --git a/Src/ClassicExplorer/ClassicExplorerSettings/ClassicExplorerSettings.vcxproj b/Src/ClassicExplorer/ClassicExplorerSettings/ClassicExplorerSettings.vcxproj
index 959f765..36f0b2f 100644
--- a/Src/ClassicExplorer/ClassicExplorerSettings/ClassicExplorerSettings.vcxproj
+++ b/Src/ClassicExplorer/ClassicExplorerSettings/ClassicExplorerSettings.vcxproj
@@ -84,6 +84,8 @@
true
EditAndContinue
true
+ true
+ stdcpp17
_DEBUG;%(PreprocessorDefinitions)
@@ -105,6 +107,8 @@
true
ProgramDatabase
true
+ true
+ stdcpp17
NDEBUG;%(PreprocessorDefinitions)
@@ -128,6 +132,8 @@
true
ProgramDatabase
true
+ true
+ stdcpp17
NDEBUG;%(PreprocessorDefinitions)
diff --git a/Src/ClassicExplorer/ExplorerBHO.cpp b/Src/ClassicExplorer/ExplorerBHO.cpp
index f51d053..7f78b7d 100644
--- a/Src/ClassicExplorer/ExplorerBHO.cpp
+++ b/Src/ClassicExplorer/ExplorerBHO.cpp
@@ -88,7 +88,7 @@ LRESULT CALLBACK CExplorerBHO::SubclassTreeProc( HWND hWnd, UINT uMsg, WPARAM wP
CComPtr pView;
if (pThis->m_pBrowser && SUCCEEDED(pThis->m_pBrowser->QueryActiveShellView(&pView)))
{
- CComQIPtr pView2=pView;
+ CComQIPtr pView2(pView);
CComPtr pFolder;
CAbsolutePidl pidl2;
@@ -319,7 +319,7 @@ bool CExplorerBHO::GetStatusText( wchar_t *buf, int size, const wchar_t *oldText
CComPtr pView;
if (m_pBrowser && SUCCEEDED(m_pBrowser->QueryActiveShellView(&pView)))
{
- CComQIPtr pView2=pView;
+ CComQIPtr pView2(pView);
CComPtr pFolder;
if (pView2 && SUCCEEDED(pView2->GetFolder(IID_IPersistFolder2,(void**)&pFolder)))
@@ -332,7 +332,7 @@ bool CExplorerBHO::GetStatusText( wchar_t *buf, int size, const wchar_t *oldText
PITEMID_CHILD child;
if (SUCCEEDED(pView2->Items(SVGIO_SELECTION,IID_IEnumIDList,(void**)&pEnum)) && pEnum && pEnum->Next(1,&child,NULL)==S_OK)
{
- CComQIPtr pFolder2=pFolder;
+ CComQIPtr pFolder2(pFolder);
if (pFolder2)
{
CComPtr pQueryInfo;
@@ -431,12 +431,12 @@ void CExplorerBHO::GetFileSize( wchar_t *buf, int size )
int time0=GetTickCount();
if (m_pBrowser && SUCCEEDED(m_pBrowser->QueryActiveShellView(&pView)))
{
- CComQIPtr pView2=pView;
+ CComQIPtr pView2(pView);
CComPtr pFolder;
CAbsolutePidl pidl;
if (pView2 && SUCCEEDED(pView2->GetFolder(IID_IPersistFolder2,(void**)&pFolder)) && SUCCEEDED(pFolder->GetCurFolder(&pidl)))
{
- CComQIPtr pFolder2=pFolder;
+ CComQIPtr pFolder2(pFolder);
UINT type=SVGIO_SELECTION;
int count, selCount;
if (SUCCEEDED(pView2->ItemCount(SVGIO_ALLVIEW,&count)))
@@ -1414,7 +1414,7 @@ STDMETHODIMP CExplorerBHO::OnDocumentComplete( IDispatch *pDisp, VARIANT *URL )
m_pBrowser->QueryActiveShellView(&pView);
if (pView)
{
- CComQIPtr pFolderView=pView;
+ CComQIPtr pFolderView(pView);
if (pFolderView)
{
if (GetSettingBool(L"ShowHeaders"))
@@ -1425,7 +1425,7 @@ STDMETHODIMP CExplorerBHO::OnDocumentComplete( IDispatch *pDisp, VARIANT *URL )
// The code to turn on the headers is borrowed from the Explorer7Fixes project under the terms of the MIT license:
// http://github.com/ijprest/Explorer7Fixes - Copyright (c) 2010 Ian Prest
- CComQIPtr pView2=pFolderView;
+ CComQIPtr pView2(pFolderView);
if (pView2)
{
// Turn on the sort header!
@@ -1474,7 +1474,7 @@ STDMETHODIMP CExplorerBHO::OnDocumentComplete( IDispatch *pDisp, VARIANT *URL )
}
if (GetSettingBool(L"HideScrollTip"))
{
- CComQIPtr pOptions=m_pBrowser;
+ CComQIPtr pOptions(m_pBrowser);
if (pOptions)
pOptions->SetFolderViewOptions(FVO_NOSCROLLTIPS,FVO_NOSCROLLTIPS);
}
diff --git a/Src/ClassicExplorer/ExplorerBand.cpp b/Src/ClassicExplorer/ExplorerBand.cpp
index 235a8f6..61759ab 100644
--- a/Src/ClassicExplorer/ExplorerBand.cpp
+++ b/Src/ClassicExplorer/ExplorerBand.cpp
@@ -440,7 +440,7 @@ void CBandWindow::SendEmail( void )
if (FAILED(m_pBrowser->QueryActiveShellView(&pView))) return;
// check if there is anything selected
- CComQIPtr pView2=pView;
+ CComQIPtr pView2(pView);
int count;
if (pView2 && SUCCEEDED(pView2->ItemCount(SVGIO_SELECTION,&count)) && count==0)
return;
@@ -449,7 +449,7 @@ void CBandWindow::SendEmail( void )
CComPtr pDataObj;
if (FAILED(pView->GetItemObject(SVGIO_SELECTION,IID_IDataObject,(void**)&pDataObj)))
return;
- CComQIPtr pAsync=pDataObj;
+ CComQIPtr pAsync(pDataObj);
if (pAsync)
pAsync->SetAsyncMode(FALSE);
@@ -494,7 +494,7 @@ void CBandWindow::SendToZip( void )
if (FAILED(m_pBrowser->QueryActiveShellView(&pView))) return;
// check if there is anything selected
- CComQIPtr pView2=pView;
+ CComQIPtr pView2(pView);
CComPtr pFolder;
if (FAILED(pView2->GetFolder(IID_IShellFolder,(void**)&pFolder)) || !pFolder) return;
@@ -507,7 +507,7 @@ void CBandWindow::SendToZip( void )
CComPtr pDataObj;
if (FAILED(pView->GetItemObject(SVGIO_SELECTION,IID_IDataObject,(void**)&pDataObj)))
return;
- CComQIPtr pAsync=pDataObj;
+ CComQIPtr pAsync(pDataObj);
if (pAsync)
pAsync->SetAsyncMode(FALSE);
@@ -515,7 +515,7 @@ void CBandWindow::SendToZip( void )
CComPtr pDropTarget;
if (SUCCEEDED(CoCreateInstance(CLSID_SendToZip,NULL,CLSCTX_ALL,IID_IDropTarget,(void **)&pDropTarget)))
{
- CComQIPtr pDropWithSite=pDropTarget;
+ CComQIPtr pDropWithSite(pDropTarget);
if (pDropWithSite)
{
CComObject *pHelper;
@@ -568,7 +568,7 @@ void CBandWindow::NewFolder( void )
{
CComPtr pView;
if (FAILED(m_pBrowser->QueryActiveShellView(&pView))) return;
- CComQIPtr pView2=pView;
+ CComQIPtr pView2(pView);
if (!pView2) return;
{
@@ -705,7 +705,7 @@ void CBandWindow::ExecuteCommandFile( const wchar_t *pText )
CComPtr pView;
if (SUCCEEDED(m_pBrowser->QueryActiveShellView(&pView)))
{
- CComQIPtr pView2=pView;
+ CComQIPtr pView2(pView);
if (!pView2) return;
CComPtr pFolder;
if (FAILED(pView2->GetFolder(IID_IShellFolder,(void**)&pFolder)) || !pFolder) return;
@@ -785,7 +785,7 @@ void CBandWindow::ExecuteCustomCommand( const wchar_t *pCommand )
{
CComPtr pFolder;
CAbsolutePidl pidl;
- CComQIPtr pView2=pView;
+ CComQIPtr pView2(pView);
if (pView2 && SUCCEEDED(pView2->GetFolder(IID_IPersistFolder2,(void**)&pFolder)) && SUCCEEDED(pFolder->GetCurFolder(&pidl)))
{
// get current path
@@ -900,13 +900,13 @@ void CBandWindow::ExecuteCustomCommand( const wchar_t *pCommand )
}
else if (_wcsicmp(exe,L"sortby")==0)
{
- CComQIPtr pView2=pView;
+ CComQIPtr pView2(pView);
if (pView2)
ViewByProperty(pView2,params,false);
}
else if (_wcsicmp(exe,L"groupby")==0)
{
- CComQIPtr pView2=pView;
+ CComQIPtr pView2(pView);
if (pView2)
ViewByProperty(pView2,params,true);
}
@@ -1128,7 +1128,7 @@ LRESULT CBandWindow::OnCommand( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& b
CComPtr pView;
if (SUCCEEDED(m_pBrowser->QueryActiveShellView(&pView)))
{
- CComQIPtr pView2=pView;
+ CComQIPtr pView2(pView);
if (pView2) pView2->DoRename();
}
return TRUE;
@@ -1283,7 +1283,7 @@ LRESULT CBandWindow::OnCommand( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& b
if (FAILED(m_pBrowser->QueryActiveShellView(&pView)))
return TRUE;
- CComQIPtr pView2=pView;
+ CComQIPtr pView2(pView);
if (!pView2) return TRUE;
// ID_DESELECT
@@ -1730,7 +1730,7 @@ void CBandWindow::UpdateToolbar( void )
m_pBrowser->QueryActiveShellView(&pView);
if (pView)
{
- CComQIPtr pView2=pView;
+ CComQIPtr pView2(pView);
if (pView2)
{
CComPtr pFolder;
diff --git a/Src/ClassicIE/ClassicIE.vcxproj b/Src/ClassicIE/ClassicIE.vcxproj
index da7821e..da0b3c1 100644
--- a/Src/ClassicIE/ClassicIE.vcxproj
+++ b/Src/ClassicIE/ClassicIE.vcxproj
@@ -149,6 +149,8 @@
Level3
EditAndContinue
true
+ true
+ stdcpp17
shlwapi.lib;comctl32.lib;psapi.lib;%(AdditionalDependencies)
@@ -168,6 +170,8 @@
Level3
ProgramDatabase
true
+ true
+ stdcpp17
shlwapi.lib;comctl32.lib;psapi.lib;%(AdditionalDependencies)
@@ -186,6 +190,8 @@
Level3
ProgramDatabase
true
+ true
+ stdcpp17
shlwapi.lib;comctl32.lib;psapi.lib;%(AdditionalDependencies)
@@ -206,6 +212,8 @@
Level3
ProgramDatabase
true
+ true
+ stdcpp17
shlwapi.lib;comctl32.lib;psapi.lib;%(AdditionalDependencies)
@@ -226,6 +234,8 @@
Level3
ProgramDatabase
true
+ true
+ stdcpp17
shlwapi.lib;comctl32.lib;psapi.lib;%(AdditionalDependencies)
@@ -246,6 +256,8 @@
Level3
ProgramDatabase
true
+ true
+ stdcpp17
shlwapi.lib;comctl32.lib;psapi.lib;%(AdditionalDependencies)
diff --git a/Src/ClassicIE/ClassicIEDLL/ClassicIEDLL.vcxproj b/Src/ClassicIE/ClassicIEDLL/ClassicIEDLL.vcxproj
index 1f5654b..bde3ba4 100644
--- a/Src/ClassicIE/ClassicIEDLL/ClassicIEDLL.vcxproj
+++ b/Src/ClassicIE/ClassicIEDLL/ClassicIEDLL.vcxproj
@@ -158,6 +158,8 @@
Use
Level3
EditAndContinue
+ true
+ stdcpp17
_DEBUG;%(PreprocessorDefinitions)
@@ -191,6 +193,8 @@
Use
Level3
ProgramDatabase
+ true
+ stdcpp17
_DEBUG;%(PreprocessorDefinitions)
@@ -223,6 +227,8 @@
Use
Level3
ProgramDatabase
+ true
+ stdcpp17
NDEBUG;%(PreprocessorDefinitions)
@@ -256,6 +262,8 @@
Use
Level3
ProgramDatabase
+ true
+ stdcpp17
NDEBUG;%(PreprocessorDefinitions)
@@ -290,6 +298,8 @@
Use
Level3
ProgramDatabase
+ true
+ stdcpp17
NDEBUG;%(PreprocessorDefinitions)
@@ -322,6 +332,8 @@
Use
Level3
ProgramDatabase
+ true
+ stdcpp17
NDEBUG;%(PreprocessorDefinitions)
diff --git a/Src/Lib/FileHelper.cpp b/Src/Lib/FileHelper.cpp
index 262ab94..2d928f8 100644
--- a/Src/Lib/FileHelper.cpp
+++ b/Src/Lib/FileHelper.cpp
@@ -16,7 +16,7 @@ bool CreateFakeFolder( const wchar_t *source, const wchar_t *fname )
HRESULT hr=pLink.CoCreateInstance(CLSID_ShellLink);
if (FAILED(hr)) return false;
pLink->SetPath(source);
- CComQIPtr pFile=pLink;
+ CComQIPtr pFile(pLink);
if (!pFile) return false;
hr=pFile->Save(path,TRUE);
if (FAILED(hr)) return false;
diff --git a/Src/Lib/LanguageSettingsHelper.cpp b/Src/Lib/LanguageSettingsHelper.cpp
index f45ac54..bb3d43c 100644
--- a/Src/Lib/LanguageSettingsHelper.cpp
+++ b/Src/Lib/LanguageSettingsHelper.cpp
@@ -344,7 +344,7 @@ LRESULT CLanguageSettingsDlg::OnInitDialog( UINT uMsg, WPARAM wParam, LPARAM lPa
m_Tooltip.Create(TOOLTIPS_CLASS,m_hWnd,NULL,NULL,WS_POPUP|TTS_NOPREFIX);
TOOLINFO tool={sizeof(tool),TTF_SUBCLASS|TTF_IDISHWND,m_hWnd,'CLSH'};
tool.uId=(UINT_PTR)list.m_hWnd;
- tool.lpszText=L"";
+ tool.lpszText=(LPWSTR)L"";
m_Tooltip.SendMessage(TTM_ADDTOOL,0,(LPARAM)&tool);
return TRUE;
@@ -378,7 +378,7 @@ LRESULT CLanguageSettingsDlg::OnCheckUpdates( WORD wNotifyCode, WORD wID, HWND h
CWindow list=GetDlgItem(IDC_LISTLANGUAGE);
for (int idx=0;idx<(int)m_LanguageIDs.size();idx++)
{
- const wchar_t *name=idx>0?m_LanguageIDs[idx].name:L"";
+ const wchar_t *name=idx>0?m_LanguageIDs[idx].name.GetString():L"";
if (_wcsicmp(language,name)==0)
{
ListView_SetItemState(list,idx,LVIS_SELECTED|LVIS_FOCUSED,LVIS_SELECTED|LVIS_FOCUSED);
@@ -403,7 +403,7 @@ LRESULT CLanguageSettingsDlg::OnSelChange( int idCtrl, LPNMHDR pnmh, BOOL& bHand
int idx=ListView_GetNextItem(list,-1,LVNI_SELECTED);
if (idx<0) return 0;
- const wchar_t *name=idx>0?m_LanguageIDs[idx].name:L"";
+ const wchar_t *name=idx>0?m_LanguageIDs[idx].name.GetString():L"";
CSettingsLockWrite lock;
CComVariant val(name);
if (m_pSetting->value!=val)
@@ -499,7 +499,7 @@ void CLanguageSettingsDlg::SetGroup( CSetting *pGroup )
CWindow list=GetDlgItem(IDC_LISTLANGUAGE);
for (int idx=0;idx<(int)m_LanguageIDs.size();idx++)
{
- const wchar_t *name=idx>0?m_LanguageIDs[idx].name:L"";
+ const wchar_t *name=idx>0?m_LanguageIDs[idx].name.GetString():L"";
if (_wcsicmp(language,name)==0)
{
ListView_SetItemState(list,idx,LVIS_SELECTED|LVIS_FOCUSED,LVIS_SELECTED|LVIS_FOCUSED);
diff --git a/Src/Lib/Lib.vcxproj b/Src/Lib/Lib.vcxproj
index ad7469f..6bb16b1 100644
--- a/Src/Lib/Lib.vcxproj
+++ b/Src/Lib/Lib.vcxproj
@@ -93,6 +93,8 @@
Level3
EditAndContinue
true
+ true
+ stdcpp17
@@ -105,6 +107,8 @@
Level3
ProgramDatabase
true
+ true
+ stdcpp17
@@ -118,6 +122,8 @@
true
ProgramDatabase
true
+ true
+ stdcpp17
MachineX86
@@ -134,6 +140,8 @@
true
ProgramDatabase
true
+ true
+ stdcpp17
diff --git a/Src/Lib/Settings.cpp b/Src/Lib/Settings.cpp
index 5c7bc7a..7dbcc94 100644
--- a/Src/Lib/Settings.cpp
+++ b/Src/Lib/Settings.cpp
@@ -732,7 +732,7 @@ CString CSettingsManager::LoadSettingsXml( const wchar_t *fname )
DWORD ver=0;
{
CComVariant value;
- CComQIPtr element=node;
+ CComQIPtr element(node);
if (!element || element->getAttribute(CComBSTR(L"component"),&value)!=S_OK || value.vt!=VT_BSTR)
return CString(L"XML parsing error: The tag 'Settings' is missing the 'component' attribute.");
if (_wcsicmp(value.bstrVal,m_CompName)!=0)
@@ -797,7 +797,7 @@ CString CSettingsManager::LoadSettingsXml( const wchar_t *fname )
}
else
{
- CComQIPtr element=child;
+ CComQIPtr element(child);
if (element)
{
CComVariant value;
diff --git a/Src/Lib/SettingsUIHelper.cpp b/Src/Lib/SettingsUIHelper.cpp
index 426c1ee..63a211b 100644
--- a/Src/Lib/SettingsUIHelper.cpp
+++ b/Src/Lib/SettingsUIHelper.cpp
@@ -1223,7 +1223,7 @@ bool BrowseLinkHelper( HWND parent, wchar_t *text )
CComPtr pDialog;
if (FAILED(pDialog.CoCreateInstance(CLSID_FileOpenDialog,NULL,CLSCTX_INPROC_SERVER)))
return false;
- CComQIPtr pCustomize=pDialog;
+ CComQIPtr pCustomize(pDialog);
if (!pCustomize)
return false;
diff --git a/Src/Lib/SettingsUIHelper.h b/Src/Lib/SettingsUIHelper.h
index a3f88e0..cd37bcc 100644
--- a/Src/Lib/SettingsUIHelper.h
+++ b/Src/Lib/SettingsUIHelper.h
@@ -34,16 +34,16 @@ public:
void Create( HWND hWndParent, DLGTEMPLATE *pTemplate )
{
- ATLASSUME(m_hWnd == NULL);
- if (!m_thunk.Init(NULL,NULL))
+ ATLASSUME(this->m_hWnd == NULL);
+ if (!this->m_thunk.Init(NULL,NULL))
{
SetLastError(ERROR_OUTOFMEMORY);
return;
}
- _AtlWinModule.AddCreateWndData(&m_thunk.cd,(CDialogImplBaseT*)this);
+ _AtlWinModule.AddCreateWndData(&this->m_thunk.cd,(CDialogImplBaseT*)this);
HWND hWnd=::CreateDialogIndirect(_AtlBaseModule.GetResourceInstance(),pTemplate,hWndParent,T::StartDialogProc);
- ATLASSUME(m_hWnd==hWnd);
+ ATLASSUME(this->m_hWnd==hWnd);
}
protected:
@@ -110,13 +110,13 @@ protected:
pThis->GetWindowRect(&rc);
m_WindowSize.cx=rc.right-rc.left;
m_WindowSize.cy=rc.bottom-rc.top;
- for (std::vector::iterator it=m_Controls.begin();it!=m_Controls.end();++it)
+ for (auto& it : m_Controls)
{
- it->hwnd=pThis->GetDlgItem(it->id);
- Assert(it->hwnd);
- if (!it->hwnd) continue;
- ::GetWindowRect(it->hwnd,&it->rect0);
- ::MapWindowPoints(NULL,m_hWnd,(POINT*)&it->rect0,2);
+ it.hwnd=pThis->GetDlgItem(it.id);
+ Assert(it.hwnd);
+ if (!it.hwnd) continue;
+ ::GetWindowRect(it.hwnd,&it.rect0);
+ ::MapWindowPoints(NULL,this->m_hWnd,(POINT*)&it.rect0,2);
}
}
@@ -129,22 +129,22 @@ protected:
int dy=rc.bottom-m_ClientSize.cy;
int dx2=dx/2;
int dy2=dy/2;
- for (std::vector::iterator it=m_Controls.begin();it!=m_Controls.end();++it)
+ for (const auto& it : m_Controls)
{
- if (!it->hwnd) continue;
- int x1=it->rect0.left;
- int y1=it->rect0.top;
- int x2=it->rect0.right;
- int y2=it->rect0.bottom;
- if (it->flags&MOVE_LEFT) x1+=dx;
- else if (it->flags&MOVE_LEFT2) x1+=dx2;
- if (it->flags&MOVE_TOP) y1+=dy;
- else if (it->flags&MOVE_TOP2) y1+=dy2;
- if (it->flags&MOVE_RIGHT) x2+=dx;
- else if (it->flags&MOVE_RIGHT2) x2+=dx2;
- if (it->flags&MOVE_BOTTOM) y2+=dy;
- else if (it->flags&MOVE_BOTTOM2) y2+=dy2;
- ::SetWindowPos(it->hwnd,NULL,x1,y1,x2-x1,y2-y1,SWP_NOZORDER|SWP_NOCOPYBITS);
+ if (!it.hwnd) continue;
+ int x1=it.rect0.left;
+ int y1=it.rect0.top;
+ int x2=it.rect0.right;
+ int y2=it.rect0.bottom;
+ if (it.flags&MOVE_LEFT) x1+=dx;
+ else if (it.flags&MOVE_LEFT2) x1+=dx2;
+ if (it.flags&MOVE_TOP) y1+=dy;
+ else if (it.flags&MOVE_TOP2) y1+=dy2;
+ if (it.flags&MOVE_RIGHT) x2+=dx;
+ else if (it.flags&MOVE_RIGHT2) x2+=dx2;
+ if (it.flags&MOVE_BOTTOM) y2+=dy;
+ else if (it.flags&MOVE_BOTTOM2) y2+=dy2;
+ ::SetWindowPos(it.hwnd,NULL,x1,y1,x2-x1,y2-y1,SWP_NOZORDER|SWP_NOCOPYBITS);
}
if (m_Gripper.m_hWnd)
{
@@ -170,7 +170,7 @@ protected:
void GetStoreRect( RECT &rc )
{
- GetWindowRect(&rc);
+ this->GetWindowRect(&rc);
rc.right-=rc.left+m_WindowSize.cx;
rc.bottom-=rc.top+m_WindowSize.cy;
}
@@ -178,7 +178,7 @@ protected:
void GetPlacementRect( RECT &rc )
{
WINDOWPLACEMENT placement;
- GetWindowPlacement(&placement);
+ this->GetWindowPlacement(&placement);
rc=placement.rcNormalPosition;
rc.right-=rc.left+m_WindowSize.cx;
rc.bottom-=rc.top+m_WindowSize.cy;
@@ -186,8 +186,8 @@ protected:
void SetStoreRect( const RECT &rc )
{
- SetWindowPos(NULL,rc.left,rc.top,m_WindowSize.cx+rc.right,m_WindowSize.cy+rc.bottom,SWP_NOZORDER|SWP_NOCOPYBITS);
- SendMessage(DM_REPOSITION);
+ this->SetWindowPos(NULL,rc.left,rc.top,m_WindowSize.cx+rc.right,m_WindowSize.cy+rc.bottom,SWP_NOZORDER|SWP_NOCOPYBITS);
+ this->SendMessage(DM_REPOSITION);
}
private:
diff --git a/Src/Lib/StringSet.h b/Src/Lib/StringSet.h
index 86fcd7b..c0c3f2d 100644
--- a/Src/Lib/StringSet.h
+++ b/Src/Lib/StringSet.h
@@ -19,5 +19,5 @@ public:
private:
HINSTANCE m_hInstance;
- static BOOL CALLBACK CStringSet::EnumResNameProc( HMODULE hModule, LPCTSTR lpszType, LPTSTR lpszName, LONG_PTR lParam );
+ static BOOL CALLBACK EnumResNameProc( HMODULE hModule, LPCTSTR lpszType, LPTSTR lpszName, LONG_PTR lParam );
};
diff --git a/Src/Setup/Setup.vcxproj b/Src/Setup/Setup.vcxproj
index 2f08d49..a27abe2 100644
--- a/Src/Setup/Setup.vcxproj
+++ b/Src/Setup/Setup.vcxproj
@@ -62,6 +62,8 @@
Level3
EditAndContinue
true
+ true
+ stdcpp17
_DEBUG;%(PreprocessorDefinitions)
@@ -83,6 +85,8 @@
Level3
ProgramDatabase
true
+ true
+ stdcpp17
NDEBUG;%(PreprocessorDefinitions)
diff --git a/Src/Setup/SetupHelper/SetupHelper.vcxproj b/Src/Setup/SetupHelper/SetupHelper.vcxproj
index f29de17..a847eb7 100644
--- a/Src/Setup/SetupHelper/SetupHelper.vcxproj
+++ b/Src/Setup/SetupHelper/SetupHelper.vcxproj
@@ -60,6 +60,8 @@
Level3
true
EditAndContinue
+ true
+ stdcpp17
true
@@ -78,6 +80,8 @@
Level3
true
ProgramDatabase
+ true
+ stdcpp17
true
diff --git a/Src/Setup/Utility/MetroColorViewer.cpp b/Src/Setup/Utility/MetroColorViewer.cpp
index 4b46dc1..cafe28f 100644
--- a/Src/Setup/Utility/MetroColorViewer.cpp
+++ b/Src/Setup/Utility/MetroColorViewer.cpp
@@ -156,19 +156,19 @@ LRESULT CMetroColorViewer::OnInitDialog( UINT uMsg, WPARAM wParam, LPARAM lParam
HWND list=GetDlgItem(IDC_LIST1);
{
- LVCOLUMN column={LVCF_WIDTH|LVCF_TEXT,0,380,L"Name"};
+ LVCOLUMN column={LVCF_WIDTH|LVCF_TEXT,0,380,(LPWSTR)L"Name"};
ListView_InsertColumn(list,0,&column);
}
{
- LVCOLUMN column={LVCF_WIDTH|LVCF_TEXT,0,50,L"#"};
+ LVCOLUMN column={LVCF_WIDTH|LVCF_TEXT,0,50,(LPWSTR)L"#"};
ListView_InsertColumn(list,1,&column);
}
{
- LVCOLUMN column={LVCF_WIDTH|LVCF_TEXT,0,100,L"Code"};
+ LVCOLUMN column={LVCF_WIDTH|LVCF_TEXT,0,100,(LPWSTR)L"Code"};
ListView_InsertColumn(list,2,&column);
}
{
- LVCOLUMN column={LVCF_WIDTH|LVCF_TEXT,0,100,L"Color"};
+ LVCOLUMN column={LVCF_WIDTH|LVCF_TEXT,0,100,(LPWSTR)L"Color"};
ListView_InsertColumn(list,3,&column);
}
int order[]={1,0,2,3};
diff --git a/Src/Setup/Utility/SaveLogFile.cpp b/Src/Setup/Utility/SaveLogFile.cpp
index ab3320c..00b6cdb 100644
--- a/Src/Setup/Utility/SaveLogFile.cpp
+++ b/Src/Setup/Utility/SaveLogFile.cpp
@@ -215,7 +215,7 @@ static void WriteFolder( FILE *f, const wchar_t *path, int tabs, bool bRecursive
wchar_t args[256];
if (FAILED(pLink->GetArguments(args,_countof(args))))
args[0]=0;
- CComQIPtr pStore=pLink;
+ CComQIPtr pStore(pLink);
CString appid;
if (pStore)
{
@@ -647,8 +647,8 @@ static void WriteLogFile( FILE *f )
{
CComString pName;
pProgram->GetDisplayName(SIGDN_NORMALDISPLAY,&pName);
- CString name=pName;
- CComQIPtr pProgram2=pProgram;
+ CString name(pName);
+ CComQIPtr pProgram2(pProgram);
if (pProgram2)
{
CComString pVersion;
diff --git a/Src/Setup/Utility/Utility.vcxproj b/Src/Setup/Utility/Utility.vcxproj
index c63bc65..0fa1a17 100644
--- a/Src/Setup/Utility/Utility.vcxproj
+++ b/Src/Setup/Utility/Utility.vcxproj
@@ -98,6 +98,8 @@
NotUsing
Level3
EditAndContinue
+ true
+ stdcpp17
comctl32.lib;uxtheme.lib;dwmapi.lib;winmm.lib;htmlhelp.lib;psapi.lib;version.lib;Secur32.lib;Netapi32.lib;%(AdditionalDependencies)
@@ -116,6 +118,8 @@
NotUsing
Level3
ProgramDatabase
+ true
+ stdcpp17
_UNICODE;UNICODE;_WIN64;%(PreprocessorDefinitions)
@@ -137,6 +141,8 @@
NotUsing
Level3
ProgramDatabase
+ true
+ stdcpp17
comctl32.lib;uxtheme.lib;dwmapi.lib;winmm.lib;htmlhelp.lib;psapi.lib;version.lib;Secur32.lib;Netapi32.lib;%(AdditionalDependencies)
@@ -157,6 +163,8 @@
NotUsing
Level3
ProgramDatabase
+ true
+ stdcpp17
_UNICODE;UNICODE;_WIN64;%(PreprocessorDefinitions)
diff --git a/Src/StartMenu/Legacy.cpp b/Src/StartMenu/Legacy.cpp
index b8fa294..1d6abde 100644
--- a/Src/StartMenu/Legacy.cpp
+++ b/Src/StartMenu/Legacy.cpp
@@ -1,6 +1,6 @@
#include "stdafx.h"
#include
-namespace fs = std::experimental::filesystem;
+namespace fs = std::filesystem;
static void CopyRegKey(HKEY root, const wchar_t* srcKey, const wchar_t* dstKey)
{
diff --git a/Src/StartMenu/StartMenu.vcxproj b/Src/StartMenu/StartMenu.vcxproj
index 25438e4..c2b0584 100644
--- a/Src/StartMenu/StartMenu.vcxproj
+++ b/Src/StartMenu/StartMenu.vcxproj
@@ -143,6 +143,8 @@
Level3
EditAndContinue
true
+ true
+ stdcpp17
_DEBUG;%(PreprocessorDefinitions)
@@ -164,6 +166,8 @@
Level3
ProgramDatabase
true
+ true
+ stdcpp17
_DEBUG;%(PreprocessorDefinitions)
@@ -184,6 +188,8 @@
Level3
ProgramDatabase
true
+ true
+ stdcpp17
NDEBUG;%(PreprocessorDefinitions)
@@ -206,6 +212,8 @@
Level3
ProgramDatabase
true
+ true
+ stdcpp17
NDEBUG;%(PreprocessorDefinitions)
@@ -229,6 +237,8 @@
true
ProgramDatabase
true
+ true
+ stdcpp17
NDEBUG;%(PreprocessorDefinitions)
@@ -252,6 +262,8 @@
true
ProgramDatabase
true
+ true
+ stdcpp17
NDEBUG;%(PreprocessorDefinitions)
diff --git a/Src/StartMenu/StartMenuDLL/DragDrop.cpp b/Src/StartMenu/StartMenuDLL/DragDrop.cpp
index 156f4ee..5e3f688 100644
--- a/Src/StartMenu/StartMenuDLL/DragDrop.cpp
+++ b/Src/StartMenu/StartMenuDLL/DragDrop.cpp
@@ -320,7 +320,7 @@ bool CMenuContainer::DragOut( int index, bool bApp )
// force synchronous operation
{
- CComQIPtr pAsync=pDataObj;
+ CComQIPtr pAsync(pDataObj);
if (pAsync)
pAsync->SetAsyncMode(FALSE);
}
diff --git a/Src/StartMenu/StartMenuDLL/JumpLists.cpp b/Src/StartMenu/StartMenuDLL/JumpLists.cpp
index 9197a5c..e03a0ca 100644
--- a/Src/StartMenu/StartMenuDLL/JumpLists.cpp
+++ b/Src/StartMenu/StartMenuDLL/JumpLists.cpp
@@ -270,7 +270,7 @@ static void AddJumpItem( CJumpGroup &group, IUnknown *pUnknown, std::vector pStore=pLink;
+ CComQIPtr pStore(pLink);
if (pStore)
{
PROPVARIANT val;
@@ -309,7 +309,7 @@ static void AddJumpItem( CJumpGroup &group, IUnknown *pUnknown, std::vector pStore=pLink;
+ CComQIPtr pStore(pLink);
if (pStore)
{
CString args=GetPropertyStoreString(pStore,PKEY_Link_Arguments);
@@ -374,12 +374,12 @@ bool GetJumplist( const wchar_t *appid, CJumpList &list, int maxCount, int maxHe
AddJumpCollection(group,pPinnedList,ignoreItems,ignoreLinks);
for (std::vector::const_iterator it=group.items.begin();it!=group.items.end();++it)
{
- CComQIPtr pShellItem=it->pItem;
+ CComQIPtr pShellItem(it->pItem);
if (pShellItem)
ignoreItems.push_back(pShellItem);
else
{
- CComQIPtr pLink=it->pItem;
+ CComQIPtr pLink(it->pItem);
if (pLink)
{
unsigned int hash=CalcLinkHash(pLink);
@@ -528,7 +528,7 @@ bool ExecuteJumpItem( const CItemManager::ItemInfo *pAppInfo, const CJumpItem &i
appid=pAppInfo->GetAppid();
}
LOG_MENU(LOG_OPEN,L"Execute Item: name=%s, appid=%s",item.name,appid);*/
- CComQIPtr pItem=item.pItem;
+ CComQIPtr pItem(item.pItem);
if (!pItem)
return false;
/* CComString pName;
@@ -618,7 +618,7 @@ bool ExecuteJumpItem( const CItemManager::ItemInfo *pAppInfo, const CJumpItem &i
if (item.type==CJumpItem::TYPE_LINK)
{
// invoke the link through its context menu
- CComQIPtr pMenu=item.pItem;
+ CComQIPtr pMenu(item.pItem);
if (!pMenu) return false;
HRESULT hr;
HMENU menu=CreatePopupMenu();
diff --git a/Src/StartMenu/StartMenuDLL/MenuCommands.cpp b/Src/StartMenu/StartMenuDLL/MenuCommands.cpp
index 534392a..b3f542a 100644
--- a/Src/StartMenu/StartMenuDLL/MenuCommands.cpp
+++ b/Src/StartMenu/StartMenuDLL/MenuCommands.cpp
@@ -814,7 +814,7 @@ static bool ExecuteSysCommand( TMenuID menuCommand )
memset(&processInfo,0,sizeof(processInfo));
wchar_t exe[_MAX_PATH]=L"%windir%\\system32\\shutdown.exe";
DoEnvironmentSubst(exe,_countof(exe));
- if (CreateProcess(exe,L"shutdown.exe /r /o /t 0",NULL,NULL,FALSE,CREATE_NO_WINDOW,NULL,NULL,&startupInfo,&processInfo))
+ if (CreateProcess(exe,(LPWSTR)L"shutdown.exe /r /o /t 0",NULL,NULL,FALSE,CREATE_NO_WINDOW,NULL,NULL,&startupInfo,&processInfo))
{
CloseHandle(processInfo.hThread);
CloseHandle(processInfo.hProcess);
@@ -1072,7 +1072,7 @@ static HRESULT CreatePinLink( PCIDLIST_ABSOLUTE sourcePidl, const wchar_t *name,
if (FAILED(hr)) return hr;
}
- CComQIPtr pFile=pLink;
+ CComQIPtr pFile(pLink);
if (!pFile) return E_FAIL;
hr=pFile->Save(finalPath,TRUE);
}
@@ -1080,9 +1080,9 @@ static HRESULT CreatePinLink( PCIDLIST_ABSOLUTE sourcePidl, const wchar_t *name,
// reopen the link and set the "no new" property. without reopening the original properties are lost
CComPtr pLink;
hr=pLink.CoCreateInstance(CLSID_ShellLink);
- CComQIPtr pFile=pLink;
+ CComQIPtr pFile(pLink);
hr=pFile->Load(finalPath,STGM_READWRITE);
- CComQIPtr pStore=pLink;
+ CComQIPtr pStore(pLink);
if (pStore)
{
PROPVARIANT val;
@@ -1559,7 +1559,7 @@ void CMenuContainer::ActivateItem( int index, TActivateType type, const POINT *p
if (bQueryMenu)
{
SHCreateItemFromIDList(pItemPidl1,IID_IShellItem,(void**)&pItem);
- CComQIPtr pItem2=pItem;
+ CComQIPtr pItem2(pItem);
if (pItem2 &&
((item.categoryHash&CSearchManager::CATEGORY_MASK)!=CSearchManager::CATEGORY_ITEM ||
(GetSettingInt(L"CompatibilityFixes")&COMPATIBILITY_UPDATE_ITEMS))) // don't update search items because we don't have the right bind context for them
@@ -2698,10 +2698,10 @@ void CMenuContainer::ActivateItem( int index, TActivateType type, const POINT *p
StrRetToStr(&str,newPidl,&pPath);
CComPtr pLink;
pLink.CoCreateInstance(CLSID_ShellLink);
- CComQIPtr pFile=pLink;
+ CComQIPtr pFile(pLink);
if (pFile && SUCCEEDED(pFile->Load(pPath,STGM_READWRITE)))
{
- CComQIPtr pStore=pLink;
+ CComQIPtr pStore(pLink);
if (pStore)
{
PROPVARIANT val;
diff --git a/Src/StartMenu/StartMenuDLL/MenuContainer.cpp b/Src/StartMenu/StartMenuDLL/MenuContainer.cpp
index 3fe32e9..61a9dbb 100644
--- a/Src/StartMenu/StartMenuDLL/MenuContainer.cpp
+++ b/Src/StartMenu/StartMenuDLL/MenuContainer.cpp
@@ -2202,7 +2202,7 @@ void CMenuContainer::AddJumpListItems( std::vector