Skip to content

Commit a9c6084

Browse files
committed
#define _ATL_ALL_WARNINGS
#define VC_EXTRALEAN #define NOMINMAX #define WIN32_LEAN_AND_MEAN (if it's possible)
1 parent c2d4fa3 commit a9c6084

File tree

18 files changed

+62
-13
lines changed

18 files changed

+62
-13
lines changed

Src/ClassicExplorer/ClassicExplorerSettings/ClassicExplorerSettings.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Open-Shell (c) 2017-2018, The Open-Shell Team
33
// Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author
44

5+
#define WIN32_LEAN_AND_MEAN
6+
#define VC_EXTRALEAN
7+
#define NOMINMAX
58
#include <windows.h>
69
#include <commctrl.h>
710
#include <shlwapi.h>

Src/ClassicExplorer/stdafx.h

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
#define _ATL_NO_AUTOMATIC_NAMESPACE
1313
#define _ATL_MODULES // compatibility with /permissive-
1414
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
15+
#define VC_EXTRALEAN
16+
#define NOMINMAX
17+
#define _ATL_ALL_WARNINGS
1518

1619
#include "resource.h"
1720
#include <atlbase.h>

Src/ClassicIE/ClassicIE.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
#define STRICT_TYPED_ITEMIDS
66
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
7+
#define WIN32_LEAN_AND_MEAN
8+
#define VC_EXTRALEAN
9+
#define NOMINMAX
10+
#define _ATL_ALL_WARNINGS
711
#include <windows.h>
812
#include <commctrl.h>
913
#include <shlwapi.h>

Src/ClassicIE/ClassicIEDLL/stdafx.h

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
#define _ATL_NO_AUTOMATIC_NAMESPACE
1616
#define _ATL_MODULES // compatibility with /permissive-
1717
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
18+
#define VC_EXTRALEAN
19+
#define WIN32_LEAN_AND_MEAN
20+
#define NOMINMAX
21+
#define _ATL_ALL_WARNINGS
22+
1823

1924
#include "resource.h"
2025
#include <atlbase.h>

Src/Lib/StringUtils.h

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
#include <stdarg.h>
4242

4343
#if defined(_WIN32) || defined(_WIN64)
44+
#define VC_EXTRALEAN
45+
#define NOMINMAX
4446
#include <windows.h>
4547
#endif
4648

Src/Lib/stdafx.h

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
#include "targetver.h"
99

1010
#define STRICT_TYPED_ITEMIDS
11+
#define VC_EXTRALEAN
12+
#define NOMINMAX
13+
#define _ATL_ALL_WARNINGS
1114
// Windows Header Files:
1215
#include <windows.h>
1316
#include <commctrl.h>

Src/Setup/Setup.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
// Open-Shell (c) 2017-2018, The Open-Shell Team
33
// Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author
44

5-
#define _WIN32_WINNT 0x0600
5+
#define VC_EXTRALEAN
6+
#define NOMINMAX
7+
#define _ATL_ALL_WARNINGS
68
#include <windows.h>
79
#include <shlwapi.h>
810
#include <stdio.h>

Src/Setup/SetupHelper/SetupHelper.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
// Classic Shell (c) 2009-2017, Ivo Beltchev
2-
// Open-Shell (c) 2017-2018, The Open-Shell Team
2+
// Open-Shell (c) 2017-2024, The Open-Shell Team
33
// Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author
44

55
#define STRICT_TYPED_ITEMIDS
66
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
7+
#define VC_EXTRALEAN
8+
#define NOMINMAX
9+
#define _ATL_ALL_WARNINGS
710
#include <windows.h>
811
#include <atlstr.h>
912
#include "ResourceHelper.h"

Src/Setup/Utility/SaveLogFile.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
#define STRICT_TYPED_ITEMIDS
66
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
7+
#define _ATL_ALL_WARNINGS
8+
#define VC_EXTRALEAN
9+
#define NOMINMAX
710
#include <windows.h>
811
#include <stdio.h>
912
#include <atlstr.h>

Src/Setup/Utility/Utility.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
// Classic Shell (c) 2009-2017, Ivo Beltchev
2-
// Open-Shell (c) 2017-2018, The Open-Shell Team
2+
// Open-Shell (c) 2017-2024, The Open-Shell Team
33
// Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author
44

55
#define STRICT_TYPED_ITEMIDS
66
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
7+
#define VC_EXTRALEAN
8+
#define NOMINMAX
9+
#define _ATL_ALL_WARNINGS
710
#include <windows.h>
811
#include <stdio.h>
912
#include <vector>

Src/StartMenu/StartMenuDLL/DragDrop.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -722,9 +722,9 @@ HRESULT STDMETHODCALLTYPE CMenuContainer::Drop( IDataObject *pDataObj, DWORD grf
722722

723723
int folderIndex=0;
724724
if (before>=0)
725-
folderIndex=m_Items[min(before,(int)m_Items.size()-1)].priority>1?1:0;
725+
folderIndex=m_Items[std::min(before,(int)m_Items.size()-1)].priority>1?1:0;
726726

727-
if (s_pDragSource==this && !s_bDragFromTree && s_bDragMovable && (*pdwEffect&DROPEFFECT_MOVE) && m_DragIndex!=m_ProgramTreeIndex && m_Items[m_DragIndex].priority==(m_Items[min(before,(int)m_Items.size()-1)].priority&2))
727+
if (s_pDragSource==this && !s_bDragFromTree && s_bDragMovable && (*pdwEffect&DROPEFFECT_MOVE) && m_DragIndex!=m_ProgramTreeIndex && m_Items[m_DragIndex].priority==(m_Items[std::min(before,(int)m_Items.size()-1)].priority&2))
728728
{
729729
if (before==m_DragIndex || before==m_DragIndex+1)
730730
return S_OK;

Src/StartMenu/StartMenuDLL/MenuContainer.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -5989,7 +5989,7 @@ LRESULT CMenuContainer::OnKeyDown( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL
59895989
ytop-=m_ScrollOffset;
59905990
ybottom-=m_ScrollOffset;
59915991
}
5992-
int d=min(abs(ytop-y0),abs(ybottom-y0));
5992+
int d=std::min(abs(ytop-y0),abs(ybottom-y0));
59935993
if (dist>d)
59945994
{
59955995
index=i;
@@ -6056,7 +6056,7 @@ LRESULT CMenuContainer::OnKeyDown( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL
60566056
ytop-=m_ScrollOffset;
60576057
ybottom-=m_ScrollOffset;
60586058
}
6059-
int d=min(abs(ytop-y0),abs(ybottom-y0));
6059+
int d= std::min(abs(ytop-y0),abs(ybottom-y0));
60606060
if (dist>d)
60616061
{
60626062
index=i;
@@ -7517,16 +7517,16 @@ POINT CMenuContainer::CalculateCorner( void )
75177517

75187518
POINT corner;
75197519
if (m_Options&CONTAINER_LEFT)
7520-
corner.x=max(s_MainMenuLimits.left,s_StartRect.left)+margin.left;
7520+
corner.x= std::max(s_MainMenuLimits.left,s_StartRect.left)+margin.left;
75217521
else
7522-
corner.x=min(s_MainMenuLimits.right,s_StartRect.right)+margin.right;
7522+
corner.x= std::min(s_MainMenuLimits.right,s_StartRect.right)+margin.right;
75237523

75247524
if (m_Options&CONTAINER_TOP)
75257525
{
75267526
if (s_bBehindTaskbar)
7527-
corner.y=max(s_MainMenuLimits.top,s_StartRect.top)+margin.top;
7527+
corner.y= std::max(s_MainMenuLimits.top,s_StartRect.top)+margin.top;
75287528
else
7529-
corner.y=max(s_MainMenuLimits.top,s_StartRect.top);
7529+
corner.y= std::max(s_MainMenuLimits.top,s_StartRect.top);
75307530
}
75317531
else
75327532
corner.y=s_MainMenuLimits.bottom+margin.bottom;

Src/StartMenu/StartMenuDLL/stdafx.h

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include "targetver.h"
99

1010
#define STRICT_TYPED_ITEMIDS
11+
#define VC_EXTRALEAN
12+
#define NOMINMAX
1113
// Windows Header Files:
1214
#include <windows.h>
1315
#include <commctrl.h>
@@ -16,6 +18,7 @@
1618

1719
#define _ATL_MODULES // compatibility with /permissive-
1820
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
21+
#define _ATL_ALL_WARNINGS
1922

2023
#include <atlbase.h>
2124
#include <atltypes.h>

Src/StartMenu/StartMenuHelper/stdafx.h

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
#define _ATL_NO_AUTOMATIC_NAMESPACE
1515
#define _ATL_MODULES // compatibility with /permissive-
1616
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
17+
#define VC_EXTRALEAN
18+
#define NOMINMAX
19+
#define _ATL_ALL_WARNINGS
1720

1821
#include "resource.h"
1922
#include <atlbase.h>

Src/StartMenu/stdafx.h

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
#include "targetver.h"
99

1010
#define STRICT_TYPED_ITEMIDS
11+
#define WIN32_LEAN_AND_MEAN
12+
#define VC_EXTRALEAN
13+
#define NOMINMAX
14+
#define _ATL_ALL_WARNINGS
1115
// Windows Header Files:
1216
#include <windows.h>
1317
#include <commctrl.h>

Src/Update/DesktopToasts/DesktopNotificationManagerCompat.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ******************************************************************
22
// Copyright (c) Microsoft. All rights reserved.
33
// This code is licensed under the MIT License (MIT).
4-
// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
4+
// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
55
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
66
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
77
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
@@ -13,6 +13,9 @@
1313
#pragma once
1414
#include <string>
1515
#include <memory>
16+
#define WIN32_LEAN_AND_MEAN
17+
#define VC_EXTRALEAN
18+
#define NOMINMAX
1619
#include <Windows.h>
1720
#include <windows.ui.notifications.h>
1821
#include <wrl.h>

Src/Update/DesktopToasts/dllmain.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// dllmain.cpp : Defines the entry point for the DLL application.
22
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
3+
#define VC_EXTRALEAN
4+
#define NOMINMAX
35
#include <windows.h>
46
#include <NotificationActivationCallback.h>
57
#include <windows.ui.notifications.h>

Src/Update/Update.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
// Classic Shell (c) 2009-2017, Ivo Beltchev
2-
// Open-Shell (c) 2017-2018, The Open-Shell Team
2+
// Open-Shell (c) 2017-2024, The Open-Shell Team
33
// Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author
44

55
#define STRICT_TYPED_ITEMIDS
66
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
7+
#define _ATL_ALL_WARNINGS
8+
#define VC_EXTRALEAN
9+
#define NOMINMAX
710
#include <windows.h>
811
#include <atlbase.h>
912
#include <atlwin.h>

0 commit comments

Comments
 (0)