From 16de25a8b0ada039c44c46e8cd55f10d230f545a Mon Sep 17 00:00:00 2001 From: ge0rdi Date: Sun, 29 Jul 2018 21:39:35 +0200 Subject: [PATCH] Use C++17 by default Plus C++ standard conformance fixes. --- Src/ClassicExplorer/ClassicExplorer.vcxproj | 12 ++++ .../ClassicExplorerSettings.vcxproj | 6 ++ Src/ClassicExplorer/ExplorerBHO.cpp | 16 ++--- Src/ClassicExplorer/ExplorerBand.cpp | 26 ++++----- Src/ClassicIE/ClassicIE.vcxproj | 12 ++++ .../ClassicIEDLL/ClassicIEDLL.vcxproj | 12 ++++ Src/Lib/FileHelper.cpp | 2 +- Src/Lib/LanguageSettingsHelper.cpp | 8 +-- Src/Lib/Lib.vcxproj | 8 +++ Src/Lib/Settings.cpp | 4 +- Src/Lib/SettingsUIHelper.cpp | 2 +- Src/Lib/SettingsUIHelper.h | 58 +++++++++---------- Src/Lib/StringSet.h | 2 +- Src/Setup/Setup.vcxproj | 4 ++ Src/Setup/SetupHelper/SetupHelper.vcxproj | 4 ++ Src/Setup/Utility/MetroColorViewer.cpp | 8 +-- Src/Setup/Utility/SaveLogFile.cpp | 6 +- Src/Setup/Utility/Utility.vcxproj | 8 +++ Src/StartMenu/Legacy.cpp | 2 +- Src/StartMenu/StartMenu.vcxproj | 12 ++++ Src/StartMenu/StartMenuDLL/DragDrop.cpp | 2 +- Src/StartMenu/StartMenuDLL/JumpLists.cpp | 12 ++-- Src/StartMenu/StartMenuDLL/MenuCommands.cpp | 14 ++--- Src/StartMenu/StartMenuDLL/MenuContainer.cpp | 10 ++-- Src/StartMenu/StartMenuDLL/SearchManager.cpp | 4 +- Src/StartMenu/StartMenuDLL/SettingsUI.cpp | 4 +- Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp | 2 +- .../StartMenuDLL/StartMenuDLL.vcxproj | 14 ++++- .../StartMenuHelper/StartMenuExt.cpp | 6 +- .../StartMenuHelper/StartMenuHelper.cpp | 2 +- .../StartMenuHelper/StartMenuHelper.vcxproj | 12 ++++ Src/Update/Update.cpp | 2 +- Src/Update/Update.vcxproj | 4 ++ 33 files changed, 203 insertions(+), 97 deletions(-) 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 &items ) if (jumpItem.type==CJumpItem::TYPE_LINK) { item.SetName(jumpItem.name,false); - CComQIPtr pLink=jumpItem.pItem; + CComQIPtr pLink(jumpItem.pItem); if (pLink) { pLink->GetIDList(&item.pItem1); @@ -2215,7 +2215,7 @@ void CMenuContainer::AddJumpListItems( std::vector &items ) else if (jumpItem.type==CJumpItem::TYPE_ITEM) { item.SetName(jumpItem.name,false); - CComQIPtr pItem=jumpItem.pItem; + CComQIPtr pItem(jumpItem.pItem); if (pItem) SHGetIDListFromObject(pItem,&item.pItem1); } @@ -2335,7 +2335,7 @@ void CMenuContainer::InitItems( void ) CComPtr pLink; if (SUCCEEDED(pLink.CoCreateInstance(CLSID_ShellLink))) { - CComQIPtr pFile=pLink; + CComQIPtr pFile(pLink); if (pFile) { // go through the items until we find s_MaxRecentDocuments documents @@ -6640,7 +6640,7 @@ bool CMenuContainer::GetDescription( int index, wchar_t *text, int size ) } if (jumpItem.type==CJumpItem::TYPE_ITEM) { - CComQIPtr pItem=jumpItem.pItem; + CComQIPtr pItem(jumpItem.pItem); if (pItem) { { @@ -6665,7 +6665,7 @@ bool CMenuContainer::GetDescription( int index, wchar_t *text, int size ) } else if (jumpItem.type==CJumpItem::TYPE_LINK) { - CComQIPtr pLink=jumpItem.pItem; + CComQIPtr pLink(jumpItem.pItem); if (pLink) { if (SUCCEEDED(pLink->GetDescription(text,size)) && text[0]) diff --git a/Src/StartMenu/StartMenuDLL/SearchManager.cpp b/Src/StartMenu/StartMenuDLL/SearchManager.cpp index f8c0157..a275a4e 100644 --- a/Src/StartMenu/StartMenuDLL/SearchManager.cpp +++ b/Src/StartMenu/StartMenuDLL/SearchManager.cpp @@ -543,7 +543,7 @@ bool CSearchManager::SearchScope::ParseSearchConnector( const wchar_t *fname ) return false; if (_wcsnicmp(url,L"file:",5)==0) return false; // ignore files - CString url2=url; + CString url2(url); StringUpper(url2); roots.push_back(url2); return true; @@ -1003,7 +1003,7 @@ void CSearchManager::SearchThread( void ) CComPtr pBindCtx0; CreateBindCtx(0,&pBindCtx0); if (!pBindCtx0) continue; - pBindCtx0->RegisterObjectParam(STR_PARSE_WITH_PROPERTIES,pStore); + pBindCtx0->RegisterObjectParam((LPOLESTR)STR_PARSE_WITH_PROPERTIES,pStore); #ifdef LAUNDER_SEARCH_RESULTS CComPtr pSearchFactory; diff --git a/Src/StartMenu/StartMenuDLL/SettingsUI.cpp b/Src/StartMenu/StartMenuDLL/SettingsUI.cpp index 5a41b20..2b334b3 100644 --- a/Src/StartMenu/StartMenuDLL/SettingsUI.cpp +++ b/Src/StartMenu/StartMenuDLL/SettingsUI.cpp @@ -849,7 +849,7 @@ LRESULT CSkinSettingsDlg::OnSelEndOK( WORD wNotifyCode, WORD wID, HWND hWndCtl, m_SkinIndex=(int)SendDlgItemMessage(IDC_COMBOSKIN,CB_GETCURSEL); { CSettingsLockWrite lock; - const wchar_t *strNew=m_SkinIndex==0?L"":m_SkinNames[m_SkinIndex]; + const wchar_t *strNew=m_SkinIndex==0?L"":m_SkinNames[m_SkinIndex].GetString(); const wchar_t *strOld=m_pSetting[0].value.vt==VT_BSTR?m_pSetting[0].value.bstrVal:L"???"; if (wcscmp(strNew,strOld)!=0) SetSettingsDirty(); @@ -3340,7 +3340,7 @@ LRESULT CCustomMenuDlg7::OnInitDialog( UINT uMsg, WPARAM wParam, LPARAM lParam, TOOLINFO tool={sizeof(tool),TTF_SUBCLASS|TTF_IDISHWND,m_hWnd,'CLSH'}; tool.uId=(UINT_PTR)m_List.m_hWnd; - tool.lpszText=L""; + tool.lpszText=(LPWSTR)L""; ::SendMessage(ListView_GetToolTips(m_List),TTM_ADDTOOL,0,(LPARAM)&tool); return TRUE; diff --git a/Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp b/Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp index 80333f6..b10caba 100644 --- a/Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp +++ b/Src/StartMenu/StartMenuDLL/StartMenuDLL.cpp @@ -588,7 +588,7 @@ void EnableStartTooltip( bool bEnable ) else { TOOLINFO info=g_StartButtonTool; - info.lpszText=L""; + info.lpszText=(LPWSTR)L""; SendMessage(g_Tooltip,TTM_UPDATETIPTEXT,0,(LPARAM)&info); } } diff --git a/Src/StartMenu/StartMenuDLL/StartMenuDLL.vcxproj b/Src/StartMenu/StartMenuDLL/StartMenuDLL.vcxproj index aa54807..3aae1c7 100644 --- a/Src/StartMenu/StartMenuDLL/StartMenuDLL.vcxproj +++ b/Src/StartMenu/StartMenuDLL/StartMenuDLL.vcxproj @@ -143,6 +143,8 @@ Level3 EditAndContinue true + true + stdcpp17 _DEBUG;%(PreprocessorDefinitions) @@ -166,6 +168,8 @@ Level3 ProgramDatabase true + true + stdcpp17 _DEBUG;%(PreprocessorDefinitions) @@ -188,6 +192,8 @@ Level3 ProgramDatabase true + true + stdcpp17 NDEBUG;%(PreprocessorDefinitions) @@ -212,6 +218,8 @@ Level3 ProgramDatabase true + true + stdcpp17 NDEBUG;%(PreprocessorDefinitions) @@ -237,6 +245,8 @@ true ProgramDatabase true + true + stdcpp17 NDEBUG;%(PreprocessorDefinitions) @@ -262,6 +272,8 @@ true ProgramDatabase true + true + stdcpp17 NDEBUG;%(PreprocessorDefinitions) @@ -356,4 +368,4 @@ - + \ No newline at end of file diff --git a/Src/StartMenu/StartMenuHelper/StartMenuExt.cpp b/Src/StartMenu/StartMenuHelper/StartMenuExt.cpp index 8e57da5..10a3b30 100644 --- a/Src/StartMenu/StartMenuHelper/StartMenuExt.cpp +++ b/Src/StartMenu/StartMenuHelper/StartMenuExt.cpp @@ -38,7 +38,7 @@ static HRESULT CreateLink( const wchar_t *source, LPITEMIDLIST sourcePidl, const if (dir) pLink->SetWorkingDirectory(dir); - CComQIPtr pFile=pLink; + CComQIPtr pFile(pLink); if (!pFile) return E_FAIL; hr=pFile->Save(fname,TRUE); } @@ -46,9 +46,9 @@ static HRESULT CreateLink( const wchar_t *source, LPITEMIDLIST sourcePidl, const // 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(fname,STGM_READWRITE); - CComQIPtr pStore=pLink; + CComQIPtr pStore(pLink); if (pStore) { PROPVARIANT val; diff --git a/Src/StartMenu/StartMenuHelper/StartMenuHelper.cpp b/Src/StartMenu/StartMenuHelper/StartMenuHelper.cpp index d41aa95..8086f6f 100644 --- a/Src/StartMenu/StartMenuHelper/StartMenuHelper.cpp +++ b/Src/StartMenu/StartMenuHelper/StartMenuHelper.cpp @@ -185,7 +185,7 @@ static void StartStartMenu( void ) } PathAppend(path,L"StartMenu.exe"); LogToFile(STARTUP_LOG,L"StartMenuHelper: starting \"%s\" -startup",path); - if (CreateProcess(path,L"StartMenu.exe -startup",NULL,NULL,TRUE,0,NULL,NULL,&startupInfo,&processInfo)) + if (CreateProcess(path,(LPWSTR)L"StartMenu.exe -startup",NULL,NULL,TRUE,0,NULL,NULL,&startupInfo,&processInfo)) { CloseHandle(processInfo.hProcess); CloseHandle(processInfo.hThread); diff --git a/Src/StartMenu/StartMenuHelper/StartMenuHelper.vcxproj b/Src/StartMenu/StartMenuHelper/StartMenuHelper.vcxproj index a899f02..19849a1 100644 --- a/Src/StartMenu/StartMenuHelper/StartMenuHelper.vcxproj +++ b/Src/StartMenu/StartMenuHelper/StartMenuHelper.vcxproj @@ -164,6 +164,8 @@ Level3 EditAndContinue true + true + stdcpp17 _DEBUG;%(PreprocessorDefinitions) @@ -197,6 +199,8 @@ Level3 ProgramDatabase true + true + stdcpp17 _DEBUG;%(PreprocessorDefinitions) @@ -229,6 +233,8 @@ Level3 ProgramDatabase true + true + stdcpp17 NDEBUG;%(PreprocessorDefinitions) @@ -262,6 +268,8 @@ Level3 ProgramDatabase true + true + stdcpp17 NDEBUG;%(PreprocessorDefinitions) @@ -296,6 +304,8 @@ Level3 ProgramDatabase true + true + stdcpp17 NDEBUG;%(PreprocessorDefinitions) @@ -328,6 +338,8 @@ Level3 ProgramDatabase true + true + stdcpp17 NDEBUG;%(PreprocessorDefinitions) diff --git a/Src/Update/Update.cpp b/Src/Update/Update.cpp index d1fccb5..6e229ba 100644 --- a/Src/Update/Update.cpp +++ b/Src/Update/Update.cpp @@ -388,7 +388,7 @@ void CUpdateDlg::UpdateUI( void ) } else { - SetDlgItemText(IDC_STATICLATEST,(m_Data.newVersion==0)?LoadStringEx(IDS_UPDATE_FAIL):L""); + SetDlgItemText(IDC_STATICLATEST,(m_Data.newVersion==0)?LoadStringEx(IDS_UPDATE_FAIL).GetString():L""); SetDlgItemText(IDC_EDITTEXT,L""); GetDlgItem(IDC_EDITTEXT).ShowWindow(SW_HIDE); GetDlgItem(IDC_BUTTONDOWNLOAD).ShowWindow(SW_HIDE); diff --git a/Src/Update/Update.vcxproj b/Src/Update/Update.vcxproj index a35c564..a4cf6e1 100644 --- a/Src/Update/Update.vcxproj +++ b/Src/Update/Update.vcxproj @@ -63,6 +63,8 @@ NotUsing Level3 EditAndContinue + true + stdcpp17 $(IntDir);..\Lib;%(AdditionalIncludeDirectories) @@ -85,6 +87,8 @@ Level3 true ProgramDatabase + true + stdcpp17 $(IntDir);..\Lib;%(AdditionalIncludeDirectories)