43 Commits

Author SHA1 Message Date
ge0rdi
61d05b49c5 Improve search logging 2020-09-01 19:28:04 +02:00
ge0rdi
9752afbebc ModernSettings: Use smart pointers 2020-09-01 19:28:04 +02:00
ge0rdi
e210b4a65a CAbsolutePidl: Allow copy from PCIDLIST_ABSOLUTE 2020-09-01 19:28:04 +02:00
ge0rdi
6581868336 ModernSettings: Add support for more settings
Based on `HostId`:
* {7E0522FC-1AC4-41CA-AFD0-3610417A9C41}
  execute `shell:::{PageId}`
* {12B1697E-D3A0-4DBC-B568-CCF64A3F934D}
  execute command in `DeepLink`
2020-09-01 19:28:04 +02:00
ge0rdi
7ee668e474 Installer: Fix URLs
Fixes #404
2020-09-01 19:28:04 +02:00
ge0rdi
62b949679b Respect Use multiple columns setting for all folder items
Currently it was used only in some cases (like Programs/Apps folder).
It will be more consistent to respect the setting for all folder
items.

Fixes #436.
2020-09-01 19:28:04 +02:00
ge0rdi
6242e8d9b9 Settings: Use images in PNG format
It makes StartmenuDLL.dll ~830kB smaller.
2020-09-01 19:28:04 +02:00
ge0rdi
ee59bb76de Setup: Don't add symbols for unused update.exe 2020-09-01 19:28:04 +02:00
ge0rdi
3eb134a280 Setup: Store symbols in symstore compatible way
This way they can be directly extracted to symbol server cache.
So any tool that uses _NT_SYMBOL_PATH will be able to use them
automatically.
2020-09-01 19:28:04 +02:00
ge0rdi
257023209b Update README.md
- Few text adjustments
- Minor formatting changes
2020-09-01 19:18:48 +02:00
ge0rdi
0da20180ac Search modern settings using our new shell folder
Use our modern settings shell folder (`shell:::{82E749ED-B971-4550-BAF7-06AA2BF7E836}`)
to search (enumerate) modern settings.

Fixes #57
2020-08-29 14:03:59 +02:00
ge0rdi
1f57c782e5 Modern settings shell folder
Adds virtual shell folder that contains items representing modern settings parsed from
`%windir%\ImmersiveControlPanel\Settings\AllSystemSettings_{253E530E-387D-4BC2-959D-E6F86122E5F2}.xml`.

It can be accessed via `shell:::{82E749ED-B971-4550-BAF7-06AA2BF7E836}` (in explorer).

Item in folder will open given setting page in `Settings` application.
2020-08-29 14:03:59 +02:00
ge0rdi
1f6e06fc85 Use proper flag in LoadMetroIcon 2020-08-29 14:03:59 +02:00
ge0rdi
ed3675ca7f Remove non-working update component from installation
We can add it later once it will be ready and working.
2020-08-18 15:28:09 +02:00
ge0rdi
695e419722 Setup: Use high version when doing local build
This way the build can be installed over existing older installation.
2020-08-14 18:05:56 +02:00
ge0rdi
3bceac1515 ProgramsTree: Fix theme usage
Obtain theme data for proper window.

Fixes #415
2020-08-12 14:16:14 +02:00
rkagerer
473f7e1445 Null check in PremultiplyBitmap()
Blind attempt to eliminate a crash which seems to occur when PremultiplyBitmap() is called after LoadImage() fails.
I'm hoping this might fix the issue reported here: https://github.com/Open-Shell/Open-Shell-Menu/issues/400
2020-07-13 12:14:22 +02:00
ale5000
fcf95a3ea6 Readme: Fix folder for translations 2020-06-15 21:15:39 +02:00
ge0rdi
cc02e38aef StartMenuHelper: Add shell extension to desktop packaged applications
This will allow `Pin to start` for desktop applications downloaded from
Microsoft Store (such as Windows Terminal).
2020-06-07 07:21:19 +02:00
ge0rdi
9c119c6e29 StartMenuHelper: Simplify shell extension registration 2020-06-07 07:21:19 +02:00
ge0rdi
9e297866ed Register server with per-user redirection
Some projects do register COM server in Debug/Release sonfigurations.
We should do it with per-user redirection so that there is no need to
run elevated Visual Studio.

This has no effect on COM server registering in installed Opne-Shell.
It is related only to local development.
2020-06-07 07:21:18 +02:00
ge0rdi
261929f4c3 Don't use obsolete /Gm switch
`cl : command line warning D9035: option 'Gm' has been deprecated and will be removed in a future release`
2020-06-07 07:21:17 +02:00
ge0rdi
9976e134ca Fix 'Invert Metro icon color' option for grayscale icons
When `Invert Metro icon color` is enabled `Open-Shell` needs to
distinguish full color icons from monochromatic ones.

Color icons are displayed normally. Monochromatic ones are displayed
inverted (original background becomes transparent and foreground will
get Metro accent color).

Metro icon is loaded from Metro app resources (usually PNG image) as
bitmap with premultiplied alpha channel.
This causes monochromatic image to essentially become grayscale (because
RGB values are multiplied with alpha channel value).

Function `DetectGrayscaleImage` is used to distinguish such images.

Unfortunatelly if original image is grayscale (such as new Windows
Terminal icon) it is recognized as monochromatic and thus inverted.

To prevent this we will take into account also alpha channel in
`DetectGrayscaleImage`.

In monochromatic images alpha channel value will be the same as the rest of
channel values.
For color images alpha channel value will be different than other
channel values.

Fixes #364.
2020-06-07 06:47:03 +02:00
ge0rdi
1b410e5a80 Fix compilation with VS16.6 2020-06-07 06:47:03 +02:00
ge0rdi
9ebe53fdbf Fix issue with confirmation dialog being blocked
Delete confirmation dialog may be (partially) hidden behing start menu.
As a result the dialog may be not accessible because start menu(s) are
displayed as top-most windows.

Thus when executing menu command we will make menu(s) non-topmost. So that
other windows can be drawn on top of menu(s).

Fixes #257
2020-02-08 11:23:05 +01:00
coddec
5f59aab40a fix typo classic shell -> Open-Shell 2020-01-29 18:22:08 +11:00
coddec
4f46134f10 Add Temporary Translation/Language Solution 2020-01-29 15:41:23 +11:00
Kaleb Klein
519f4afe17 ignore vscode generated files
Added generated files/folders in gitignore from vscode
2019-12-05 10:27:59 +01:00
Kaleb Klein
30ffce6939 Change homepage url in settings
Changed the homepage text and link on the settings dialog to link to the Open-Shell home page.
2019-12-05 10:27:59 +01:00
ge0rdi
fe47f841e7 Don't close menu(s) on certain operations
In several cases we don't want menu(s) to close when an action on menu was
done. For example on drag-n-drop or menu item deletion (where confirmation
dialog is shown).

In such situations `s_bPreventClosing` was set to true (and then back to
false when closing was allowed again).
Though original code honored this variable only in certain situations and
typically (at least on Win10) menus were hidden/closed despite of it.

This patch changes the behavior and menus(s) are not closed when
`s_bPreventClosing` is set to true.
Basically now menu(s) stay visible until there is an action that changes
active window.

Following functionality was also removed because it is not needed now:

* CMenuContainer::HideTemp
* COwnerWindow::OnClear
  WM_CLEAR was sent to the window only by already removed `HideTemp`
2019-10-26 20:29:23 +02:00
ge0rdi
f33cd60b84 Use VS2019 2019-10-01 19:07:03 +02:00
ge0rdi
431e2b522d Update issue templates 2019-09-28 19:22:49 +02:00
ge0rdi
d1ba5daead Update issue templates 2019-09-28 19:20:56 +02:00
bovirus
6fe4b6467f Update ExplorerL10N.ini italian translation (#217) 2019-09-04 11:00:19 -04:00
bovirus
89a1a14b2c Update StartMenuL10N.ini (Italian) (#218) 2019-09-04 10:58:13 -04:00
coddec
3ea331332c Update README.md
Add download button as requested by some users.
2019-08-26 12:04:17 +10:00
ge0rdi
38c155cc95 Add support for silent OS upgrade task (#176)
`Open-Shell` needs to adjust itself after OS upgrade. It seems that
`StartMenuHelper` registration is lost after such upgrade:

http://www.classicshell.net/forum/viewtopic.php?f=7&t=8082#p34821

To fix this registration, administrator rights are required (means user
interaction, UAC).

While this is acceptable in consumer environment, it is typically not
desired in business environment where users typically doesn't have
administrator rights.

This patch allows to run `Open-Shell` in silent upgrade mode that will:
* check if OS version changed (otherwise end immediately)
* perform OS upgrade tasks without any user interraction

Such mode can be then used to create scheduled task that will run this
silent upgrade check on every boot with system rights:

`schtasks /Create /RU "NT AUTHORITY\SYSTEM" /SC ONSTART /TN "Open-Shell OS updgrade check" /TR "%ProgramFiles%\Open-Shell\StartMenu.exe -upgrade -silent"`

 #167
2019-06-09 20:27:49 +02:00
ge0rdi
b4d2be18fe Fix Lock button hiding
Commit 1a5f62a added possibility to hide Lock/Sleep/Hibernate buttons if
they were disabled in system power settings.

Unfortunately this didn't work for Lock button.

To fix the behavior we have to add lock command to `g_StdOptions` array
and then all the checks introduced in 1a5f62a will apply properly.

 #173
2019-06-09 13:40:49 +02:00
Andy
1a5f62ace2 Code to check registry for Power Button user choice. (#174)
Fixes #173
2019-06-06 15:10:16 +02:00
Zvonimir Bužanić
935c6fc73a Links updated
Changed links to github for Update.cpp and Update.rc.
2019-03-02 21:34:29 +01:00
ge0rdi
947fded387 ClassicExplorer: Use proper theme color to display full path
Fixes #147.
2019-02-27 06:51:00 +01:00
SebastianoPistore
e6bd16e2d4 Fix ITA trans (#104)
* Fix ITA translation

Fixed Italian translation; Updated header

* Fix ITA trans
2019-01-29 12:22:48 -05:00
Xenhat
4806744c94 Fix skins copyright issue (#105) (#113) 2018-11-23 23:06:45 -05:00
91 changed files with 2249 additions and 493 deletions

31
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,31 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Version:**
- Open-Shell: [e.g. 4.4.131]
- OS: [e.g. Windows 10 1903]
**Additional context**
Add any other context about the problem here.

View File

@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: Enhancement/Feature Request
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

4
.gitignore vendored
View File

@@ -4,6 +4,10 @@
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# ignore vscode stuff
.vscode/
.ionide/
# User-specific files
*.suo
*.user

Binary file not shown.

View File

@@ -1,4 +1,4 @@
; This file contains all localized text for Classic Explorer. There is one section per language.
; This file contains all localized text for Open-Shell. There is one section per language.
; Every section contains text lines in the form of <key> = <string>.
; Which section is used depends on the current OS setting. If a key is missing from the language section
; it will be searched in the [default] section. In some cases more than one language can be used.
@@ -1156,23 +1156,23 @@ Copy.More = Altro...
Copy.CopyHere = &Copia qui
Copy.MoveHere = &Sposta qui
Copy.Title = Conferma sostituzione file
Copy.Subtitle = La cartella contiene già un file di nome "%s".
Copy.SubtitleRO = La cartella contiene già un file di sola lettura di nome "%s".
Copy.SubtitleSys = La cartella contiene già un file di sistema di nome "%s".
Copy.Prompt1 = Sostituire il file esistente
Copy.Subtitle = La cartella contiene già un file "%s".
Copy.SubtitleRO = La cartella contiene già un file di sola lettura "%s".
Copy.SubtitleSys = La cartella contiene già un file di sistema "%s".
Copy.Prompt1 = Vuoi sostituire il file esistente
Copy.Prompt2 = con questo file?
Copy.Yes = &Sì
Copy.No = &No
Copy.YesAll = Sì t&utti
Folder.Title = Conferma sostituzione cartella
Folder.Prompt = Continuare?
Toolbar.GoUp = Livello superiore
Folder.Prompt = Vuoi continuare?
Toolbar.GoUp = Cartella superiore
Toolbar.Cut = Taglia
Toolbar.Copy = Copia
Toolbar.Paste = Incolla
Toolbar.PasteShortcut = Incolla collegamento
Toolbar.Delete = Elimina
Toolbar.Email = Invia per posta elettronica gli elementi selezionati
Toolbar.Email = Invia gli elementi selezionati via email
Toolbar.Properties = Proprietà
Toolbar.NewFolder = Nuova cartella
Toolbar.ZipFolder = Nuova cartella compressa
@@ -1195,9 +1195,9 @@ Toolbar.SelectAll = Seleziona tutto
Toolbar.CustomizeFolder = Personalizza cartella
Toolbar.MapDrive = Connetti unità di rete
Toolbar.DisconnectDrive = Disconnetti unità di rete
Toolbar.NavigationPane = Riquadro di spostamento
Toolbar.NavigationPane = Riquadro spostamento
Toolbar.DetailsPane = Riquadro dettagli
Toolbar.PreviewPane = Riquadro di anteprima
Toolbar.PreviewPane = Riquadro anteprima
Toolbar.CopyTo = Copia in
Toolbar.MoveTo = Sposta in
Toolbar.Deselect = Deseleziona tutto
@@ -1205,10 +1205,10 @@ Toolbar.InvertSelection = Inverti selezione
Toolbar.FolderOptions = Opzioni cartella
Toolbar.ShowHiddenFiles = Cartelle e file nascosti
Toolbar.ShowSystemFiles = File di sistema
Toolbar.ShowExtensions = Estensioni nomi file
Status.FreeSpace = %s (Spazio disponibile: %s)
Toolbar.ShowExtensions = Visualizza estensioni file
Status.FreeSpace = %s (spazio disponibile: %s)
Status.Item = %s elemento
Status.Items = Elementi: %s
Status.Items = %s elementi
Status.ItemSelected = %s elemento selezionato
Status.ItemsSelected = %s elementi selezionati

View File

@@ -1,4 +1,4 @@
; This file contains all localized text for Open-Shell Menu. There is one section per language.
; This file contains all localized text for Open-Shell Menu. There is one section per language.
; Every section contains text lines in the form of <key> = <string>.
; Which section is used depends on the current OS setting. If a key is missing from the language section
; it will be searched in the [default] section. In some cases more than one language can be used.
@@ -2479,7 +2479,7 @@ Menu.Search = Ce&rca
Menu.SearchBox = Cerca
Menu.SearchPrograms = Cerca programmi e file
Menu.SearchInternet = Cerca in Internet
Menu.Searching = Ricerca in corso...
Menu.Searching = Ricerca...
Menu.NoMatch = Nessun elemento corrisponde ai criteri di ricerca.
Menu.MoreResults = Ulteriori risultati
Menu.Help = &Guida e supporto tecnico
@@ -2502,10 +2502,10 @@ Menu.PCSettings = Impostazioni PC
Menu.Security = Protezione di Windows
Menu.Network = Connessioni di &rete
Menu.Printers = &Stampanti
Menu.Taskbar = &Barra delle applicazioni e menu Start
Menu.Taskbar = &Barra applicazioni e menu Start
Menu.SearchFiles = &File o cartelle...
Menu.SearchPrinter = &Per stampante
Menu.SearchComputers = Per &Computer
Menu.SearchComputers = Per &computer
Menu.UserFilesTip = Contiene cartelle per documenti, immagini, musica e altri file dell'utente.
Menu.UserDocumentsTip = Contiene lettere, rapporti e altri documenti e file.
Menu.UserPicturesTip = Contiene foto digitali, immagini e file di grafica.
@@ -2527,8 +2527,8 @@ Menu.HelpTip = Trovare argomenti della Guida, esercitazioni, risoluzione problem
Menu.ProgramsTip = Apre l'elenco dei programmi.
Menu.SearchFilesTip = Cercare documenti, musica, immagini, posta elettronica e altro.
Menu.GamesTip = Consente di giocare e gestire i giochi installati nel computer.
Menu.SecurityTip = Avvia le opzioni di Sicurezza di Windows per modificare la password, cambiare utente o avviare Gestione attività.
Menu.SearchComputersTip = Cerca computer sulla rete
Menu.SecurityTip = Avvia programmi per modifica opzioni di sicurezza di Windows per cambiare la password, cambiare utente o avviare Gestione attività.
Menu.SearchComputersTip = Cerca computer nella rete
Menu.SearchPrintersTip = Cerca stampante
Menu.AdminToolsTip = Configura le impostazioni amministrative del computer.
Menu.ShutdownTip = Chiude tutti i programmi aperti, arresta Windows e spegne il computer.
@@ -2536,7 +2536,7 @@ Menu.RestartTip = Chiude tutti i programmi aperti e riavvia Windows.
Menu.SleepTip = Mantiene la sessione in memoria e imposta la modalità basso consumo che consente di riprendere rapidamente il lavoro.
Menu.HibernateTip = Salva la sessione e spegne il computer. Quando si riaccende il computer, la sessione verrà ripristinata.
Menu.LogOffTip = Chiude i programmi e disconnette l'utente.
Menu.DisconnectTip = Disconnette la sessione. È possibile riconnettersi a questa sessione al prossimo accesso.
Menu.DisconnectTip = Disconnette dalla sessione. È possibile riconnettersi a questa sessione al prossimo accesso.
Menu.LockTip = Blocca il computer.
Menu.UndockTip = Consente di rimuovere il computer portatile o il notebook dall'alloggiamento di espansione.
Menu.SwitchUserTip = Consente di cambiare utente senza chiudere i programmi.
@@ -2553,7 +2553,7 @@ Menu.MenuSettings = Impostazioni
Menu.MenuHelp = Guida
Menu.MenuExit = Esci
Menu.LogoffTitle = Disconnessione da Windows
Menu.LogoffPrompt = Disconnettersi?
Menu.LogoffPrompt = Vuoi disconnetterti?
Menu.LogoffYes = &Disconnetti
Menu.LogoffNo = &No
Menu.RenameTitle = Rinomina
@@ -2570,7 +2570,7 @@ Menu.ActionOpen = Apri
Menu.ActionClose = Chiudi
Menu.ActionExecute = Esegui
Menu.RemoveList = &Rimuovi da questo elenco
Menu.RemoveAll = Cancella elenco Ogge&tti recenti
Menu.RemoveAll = Azzera elenco ogge&tti recenti
Menu.Explorer = Esplora risorse
Menu.Start = Start
Menu.StartScreen = Schermata Start
@@ -2582,7 +2582,7 @@ Menu.MonitorOff = Spegne lo schermo
Menu.RemoveHighlight = Rimuovi elemento di rilievo
Menu.Uninstall = &Disinstalla
Menu.UninstallTitle = Disinstalla
Menu.UninstallPrompt = Disinstallare %s?
Menu.UninstallPrompt = Vuoi disinstallare %s?
Search.CategorySettings = Impostazioni
Search.CategoryPCSettings = Impostazioni PC
Search.CategoryPrograms = Programmi

View File

@@ -4,26 +4,30 @@
[![GitHub Release](https://img.shields.io/github/release/Open-Shell/Open-Shell-Menu.svg)](https://github.com/Open-Shell/Open-Shell-Menu/releases) [![GitHub Pre-Release](https://img.shields.io/github/release/Open-Shell/Open-Shell-Menu/all.svg)](https://github.com/Open-Shell/Open-Shell-Menu/releases) [![Build status](https://ci.appveyor.com/api/projects/status/2wj5x5qoypfjj0tr/branch/master?svg=true)](https://ci.appveyor.com/project/passionate-coder/open-shell-menu/branch/master) [![GitQ](https://gitq.com/badge.svg)](https://gitq.com/passionate-coder/Classic-Start) [![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/open-shell/Lobby)
[Home Page](https://open-shell.github.io/Open-Shell-Menu)
[Discussion room](https://gitter.im/Open-Shell)
[Latest nightly build](https://ci.appveyor.com/project/passionate-coder/open-shell-menu/branch/master/artifacts)
[Home Page](https://open-shell.github.io/Open-Shell-Menu)
[Discussion room](https://gitter.im/Open-Shell)
[Latest nightly build](https://ci.appveyor.com/project/passionate-coder/open-shell-menu/branch/master/artifacts)
### Features
- Classic style Start Menu for Windows 7, 8, 8.1, 10
- Toolbar for Windows Explorer
- Classic copy UI (Windows 7 only)
- Show file size in Explorer status bar
- Title bar and status bar for Internet Explorer
### Download
If you just want to use it or looking for setup file, click here to download:
[![GitHub All Releases](https://img.shields.io/github/downloads/Open-Shell/Open-Shell-Menu/total?style=for-the-badge)](https://github.com/Open-Shell/Open-Shell-Menu/releases)
### Temporary Translation/Language Solution
1. Download [language DLL](https://coddec.github.io/Classic-Shell/www.classicshell.net/translations/index.html)
2. Place it either in the Open-Shell's __install folder__ or in the `%ALLUSERSPROFILE%\OpenShell\Languages` folder
---
*For archival reasons, we have a mirror of `www.classicshell.net` [here](https://coddec.github.io/Classic-Shell/www.classicshell.net/).*
[How To Skin a Start Menu](https://coddec.github.io/Classic-Shell/www.classicshell.net/tutorials/skintutorial.html)
[Classic Shell - Custom Start Buttons](https://coddec.github.io/Classic-Shell/www.classicshell.net/tutorials/buttontutorial.html)
[How To Skin a Start Menu](https://coddec.github.io/Classic-Shell/www.classicshell.net/tutorials/skintutorial.html)
[Classic Shell - Custom Start Buttons](https://coddec.github.io/Classic-Shell/www.classicshell.net/tutorials/buttontutorial.html)
[Report a bug/issue or submit a feature request](https://github.com/Open-Shell/Open-Shell-Menu/issues)

View File

@@ -30,46 +30,46 @@
<ProjectGuid>{9AF324B7-F786-4D85-B2E1-6E51720F874E}</ProjectGuid>
<RootNamespace>ClassicExplorer</RootNamespace>
<Keyword>AtlProj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</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>
<PlatformToolset>v142</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>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Setup|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</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>
<PlatformToolset>v142</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>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
@@ -158,7 +158,6 @@
<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>
@@ -178,6 +177,7 @@
<ModuleDefinitionFile>.\$(TargetName).def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<PerUserRedirection>true</PerUserRedirection>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -194,7 +194,6 @@
<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>
@@ -214,6 +213,7 @@
<ModuleDefinitionFile>.\$(TargetName).def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<PerUserRedirection>true</PerUserRedirection>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -251,6 +251,7 @@
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<PerUserRedirection>true</PerUserRedirection>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -287,6 +288,7 @@
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<PerUserRedirection>true</PerUserRedirection>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'">

View File

@@ -18,26 +18,26 @@
<ProjectGuid>{E93271C8-0252-4A08-8227-1978C64C2D34}</ProjectGuid>
<RootNamespace>ClassicExplorerSettings</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</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>
<PlatformToolset>v142</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>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
@@ -77,7 +77,6 @@
<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>

View File

@@ -792,8 +792,8 @@ LRESULT CALLBACK CExplorerBHO::SubclassBreadcrumbProc( HWND hWnd, UINT uMsg, WPA
BOOL dwm;
if (theme && SUCCEEDED(DwmIsCompositionEnabled(&dwm)) && dwm)
{
DTTOPTS opts={sizeof(opts),DTT_COMPOSITED|DTT_TEXTCOLOR};
opts.crText=GetSysColor(COLOR_WINDOWTEXT);
DTTOPTS opts={sizeof(opts),DTT_COMPOSITED|DTT_COLORPROP};
opts.iColorPropId = COLOR_WINDOWTEXT;
DrawThemeTextEx(theme,hdcPaint,0,0,pThis->m_CurPath,-1,DT_NOPREFIX|DT_VCENTER|DT_SINGLELINE,&rc,&opts);
}
else

View File

@@ -30,46 +30,46 @@
<ProjectGuid>{65D5C193-E807-4094-AE19-19E6A310A312}</ProjectGuid>
<RootNamespace>ClassicIE</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</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>
<PlatformToolset>v142</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>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Setup|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
@@ -142,7 +142,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
@@ -163,7 +162,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>

View File

@@ -30,46 +30,46 @@
<ProjectGuid>{BC0E6E7C-08C1-4F12-A754-4608E5A22FA8}</ProjectGuid>
<RootNamespace>ClassicIEDLL</RootNamespace>
<Keyword>AtlProj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</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>
<PlatformToolset>v142</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>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Setup|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</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>
<PlatformToolset>v142</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>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
@@ -152,7 +152,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_USRDLL;CLASSICIEDLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -171,6 +170,7 @@
<ModuleDefinitionFile>.\$(TargetName).def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<PerUserRedirection>true</PerUserRedirection>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -187,7 +187,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_USRDLL;CLASSICIEDLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -206,6 +205,7 @@
<ModuleDefinitionFile>.\$(TargetName).def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<PerUserRedirection>true</PerUserRedirection>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -242,6 +242,7 @@
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<PerUserRedirection>true</PerUserRedirection>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -277,6 +278,7 @@
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<PerUserRedirection>true</PerUserRedirection>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'">

View File

@@ -14,6 +14,7 @@ public:
CAbsolutePidl( const CAbsolutePidl &pidl ) { m_Pidl=pidl?ILCloneFull(pidl):NULL; }
~CAbsolutePidl( void ) { Clear(); }
void operator=( const CAbsolutePidl &pidl ) { Clone(pidl); }
void operator=( PCIDLIST_ABSOLUTE pidl ) { Clone(pidl); }
void Clear( void ) { if (m_Pidl) ILFree(m_Pidl); m_Pidl=NULL; }
operator PIDLIST_ABSOLUTE( void ) const { return m_Pidl; }
@@ -21,7 +22,7 @@ public:
void Swap( CAbsolutePidl &pidl ) { PIDLIST_ABSOLUTE q=pidl.m_Pidl; pidl.m_Pidl=m_Pidl; m_Pidl=q; }
void Attach( PIDLIST_ABSOLUTE pidl ) { Clear(); m_Pidl=pidl; }
PIDLIST_ABSOLUTE Detach( void ) { PIDLIST_ABSOLUTE pidl=m_Pidl; m_Pidl=NULL; return pidl; }
void Clone( PIDLIST_ABSOLUTE pidl ) { Clear(); m_Pidl=pidl?ILCloneFull(pidl):NULL; }
void Clone( PCIDLIST_ABSOLUTE pidl ) { Clear(); m_Pidl=pidl?ILCloneFull(pidl):NULL; }
private:
PIDLIST_ABSOLUTE m_Pidl;

View File

@@ -71,7 +71,7 @@ BEGIN
CONTROL "Show all settings",IDC_CHECKALL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,154,7,79,12
CONTROL "<a>Help...</a>",IDC_LINKHELP,"SysLink",WS_TABSTOP,348,9,26,10,WS_EX_TRANSPARENT
CONTROL "",IDC_TABSETTINGS,"SysTabControl32",TCS_MULTILINE | TCS_FOCUSNEVER,7,20,367,169
CONTROL "<a>www.classicshell.net</a>",IDC_LINKWEB,"SysLink",WS_TABSTOP,7,195,66,10,WS_EX_TRANSPARENT
CONTROL "<a>Open-Shell Homepage</a>",IDC_LINKWEB,"SysLink",WS_TABSTOP,7,195,75,10,WS_EX_TRANSPARENT
CONTROL "Name of translator goes <a href=""http://www.yoursite.com"">here</a>",IDC_SYSLINKLOC,
"SysLink",NOT WS_VISIBLE | WS_TABSTOP,80,195,111,10
PUSHBUTTON "&Backup",IDC_BUTTONBACKUP,200,192,60,14,WS_GROUP
@@ -277,7 +277,7 @@ BEGIN
IDS_BMP_TITLE "Select Image File"
IDS_SEARCH_PROMPT "Search Settings"
IDS_SETTING_SEARCH "Search Results"
IDS_WEBSITE_TIP "Visit Open-Shell on the web - http://www.classicshell.net"
IDS_WEBSITE_TIP "Visit Open-Shell on the web - https://open-shell.github.io/Open-Shell-Menu"
IDS_LOCATE_SETTING "Locate setting"
IDS_LANGUAGE_UPDATED "The language %s is up to date."
IDS_LANGUAGE_MISSING "Update for language %s is not available."

View File

@@ -22,32 +22,32 @@
<ProjectGuid>{D42FE717-485B-492D-884A-1999F6D51154}</ProjectGuid>
<RootNamespace>Lib</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>

View File

@@ -332,6 +332,7 @@ HBITMAP BitmapFromIcon( HICON hIcon, int iconSize, unsigned int **pBits, bool bD
// Premultiplies a DIB section by the alpha channel and a given color
void PremultiplyBitmap( HBITMAP hBitmap, COLORREF rgb )
{
if (hBitmap == NULL) return;
BITMAP info;
GetObject(hBitmap,sizeof(info),&info);
int n=info.bmWidth*info.bmHeight;

View File

@@ -1810,7 +1810,7 @@ LRESULT CSettingsDlg::OnHelp( int idCtrl, LPNMHDR pnmh, BOOL& bHandled )
LRESULT CSettingsDlg::OnWeb( int idCtrl, LPNMHDR pnmh, BOOL& bHandled )
{
ShellExecute(m_hWnd,NULL,L"http://www.classicshell.net",NULL,NULL,SW_SHOWNORMAL);
ShellExecute(m_hWnd,NULL,L"https://open-shell.github.io/Open-Shell-Menu",NULL,NULL,SW_SHOWNORMAL);
return 0;
}

Binary file not shown.

View File

@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2010
# Visual Studio Version 16
VisualStudioVersion = 16.0.29324.140
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Skins", "Skins", "{409484D8-C0DB-4991-AF03-124128EDEF98}"
EndProject

View File

@@ -3,9 +3,7 @@ REM ***** Collect PDBs
echo -- Creating symbols package
set CS_SYMBOLS_NAME=OpenShellPDB_%CS_VERSION_STR%.7z
cd Output
7z a -mx9 ..\Final\%CS_SYMBOLS_NAME% PDB32 PDB64 > nul
cd ..
7z a -mx9 .\Final\%CS_SYMBOLS_NAME% .\Output\symbols\* > nul
if defined APPVEYOR (
appveyor PushArtifact Final\%CS_SYMBOLS_NAME%

View File

@@ -1,12 +1,10 @@
if exist Output rd /Q /S Output
md Output
md Output\x64
md Output\PDB32
md Output\PDB64
echo -- Compiling
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do set MSBuildDir=%%i\MSBuild\15.0\Bin\
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do set MSBuildDir=%%i\MSBuild\Current\Bin\
REM ********* Build 64-bit solution
echo --- 64bit
@@ -39,7 +37,6 @@ copy /B ..\ClassicIE\Setup\ClassicIEDLL_32.dll Output > nul
copy /B ..\ClassicIE\Setup\ClassicIE_32.exe Output > nul
copy /B ..\StartMenu\Setup\StartMenu.exe Output > nul
copy /B ..\StartMenu\Setup\StartMenuDLL.dll Output > nul
copy /B ..\Update\Release\Update.exe Output > nul
copy /B ..\StartMenu\StartMenuHelper\Setup\StartMenuHelper32.dll Output > nul
copy /B ..\Setup\SetupHelper\Release\SetupHelper.exe Output > nul
@@ -67,6 +64,8 @@ copy /B "..\StartMenu\Skins\Metallic.skin7" Output > nul
REM ********* Collect debug info
md Output\PDB32
md Output\PDB64
REM Explorer 32
copy /B ..\ClassicExplorer\Setup\ClassicExplorer32.pdb Output\PDB32 > nul
@@ -97,8 +96,6 @@ copy /B ..\StartMenu\Setup\StartMenuDLL.pdb Output\PDB32 > nul
copy /B Output\StartMenuDLL.dll Output\PDB32 > nul
copy /B ..\StartMenu\StartMenuHelper\Setup\StartMenuHelper32.pdb Output\PDB32 > nul
copy /B Output\StartMenuHelper32.dll Output\PDB32 > nul
copy /B ..\Update\Release\Update.pdb Output\PDB32 > nul
copy /B Output\Update.exe Output\PDB32 > nul
REM Menu 64
copy /B ..\StartMenu\Setup64\StartMenu.pdb Output\PDB64 > nul
@@ -126,6 +123,18 @@ if exist %PDBSTR_PATH% (
)
)
REM ********* Prepare symbols
set SYMSTORE_PATH="C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symstore.exe"
%SYMSTORE_PATH% add /r /f Output\PDB32 /s Output\symbols /t OpenShell -:NOREFS > nul
%SYMSTORE_PATH% add /r /f Output\PDB64 /s Output\symbols /t OpenShell -:NOREFS > nul
rd /Q /S Output\symbols\000Admin > nul
del Output\symbols\pingme.txt > nul
rd /Q /S Output\PDB32
rd /Q /S Output\PDB64
REM ********* Build ADMX
echo --- ADMX
if exist Output\PolicyDefinitions.zip (

View File

@@ -65,7 +65,7 @@ Utility\Release\Utility.exe crcmsi Temp
REM ********* Build bootstrapper
echo --- Bootstrapper
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do set MSBuildDir=%%i\MSBuild\15.0\Bin\
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do set MSBuildDir=%%i\MSBuild\Current\Bin\
"%MSBuildDir%MSBuild.exe" Setup.sln /m /t:Rebuild /p:Configuration="Release" /p:Platform="Win32" /verbosity:quiet /nologo
@if ERRORLEVEL 1 exit /b 1

View File

@@ -14,18 +14,18 @@
<ProjectGuid>{A4A4D3B1-24E7-401E-A37C-72141D7603DC}</ProjectGuid>
<RootNamespace>Setup</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -55,7 +55,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>

View File

@@ -103,10 +103,6 @@
<ComponentRef Id="IESettingsLink" />
<Condition Level="1">IE_BUILD&gt;=90000</Condition>
</Feature>
<Feature Id="Update" Level="1" Title="!(loc.UpdateTitle)" ConfigurableDirectory="APPLICATIONFOLDER" AllowAdvertise="no" Description="!(loc.UpdateDesc)">
<ComponentRef Id="Update.exe" />
<ComponentRef Id="UpdateSettingsLink" />
</Feature>
</Feature>
<UI>
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
@@ -388,8 +384,8 @@
<Control Type="Icon" Id="Icon1" Width="12" Height="12" X="7" Y="203" Hidden="yes" Text="web.ico">
<Condition Action="show">NOT Installed</Condition>
</Control>
<Control Type="Hyperlink" Id="Link1" Width="131" Height="10" X="22" Y="204" Hidden="yes" ToolTip="https://github.com/Open-Shell/Open-Shell-Menu">
<Text><![CDATA[<a href="https://github.com/Open-Shell/Open-Shell-Menu">!(loc.WebLink)</a>]]></Text>
<Control Type="Hyperlink" Id="Link1" Width="131" Height="10" X="22" Y="204" Hidden="yes" ToolTip="https://open-shell.github.io/Open-Shell-Menu">
<Text><![CDATA[<a href="https://open-shell.github.io/Open-Shell-Menu">!(loc.WebLink)</a>]]></Text>
<Condition Action="show">NOT Installed</Condition>
</Control>
</Dialog>
@@ -473,9 +469,6 @@
<Component Id="StartMenuHelperL10N.ini" Guid="144CE4DC-0C77-4793-B79A-A32E48A90E64" Win64="$(var.CS_WIN64)">
<File Id="StartMenuHelperL10N.ini" KeyPath="yes" Source="..\StartMenu\StartMenuHelper\StartMenuHelperL10N.ini" Vital="yes" />
</Component>
<Component Id="Update.exe" Guid="FB6C213F-B670-4888-8B2C-12E807E335A7" Win64="$(var.CS_WIN64)">
<File Id="Update" KeyPath="yes" Source="Output\Update.exe" Checksum="yes" Vital="yes" />
</Component>
<Component Id="PolicyDefinitions.zip" Guid="580A15D0-4023-471d-9D82-9D63FBA42B5D" Win64="$(var.CS_WIN64)">
<File Id="PolicyDefinitions.zip" KeyPath="yes" Source="Output\PolicyDefinitions.zip" Vital="yes" />
</Component>
@@ -563,11 +556,6 @@
<CreateFolder />
<Condition>START_MENU_FOLDER=1</Condition>
</Component>
<Component Id="UpdateSettingsLink" Guid="10B5A082-6C92-4EA7-AFF8-21AE3D2D7FE0">
<Shortcut Id="UpdateSettingsLink" Name="!(loc.UpdateItem)" Advertise="no" Description="!(loc.UpdateSettingsDesc)" Target="[APPLICATIONFOLDER]Update.exe" WorkingDirectory="APPLICATIONFOLDER" />
<CreateFolder />
<Condition>START_MENU_FOLDER=1</Condition>
</Component>
<Component Id="ExplorerSettingsLink" Guid="6EC027F2-115D-4110-8189-DDAFC78169EC">
<Shortcut Id="ExplorerSettingsLink" Name="!(loc.ExplorerItem)" Advertise="no" Description="!(loc.ExplorerSettingsDesc)" Target="[APPLICATIONFOLDER]ClassicExplorerSettings.exe" WorkingDirectory="APPLICATIONFOLDER">
<ShortcutProperty Key="System.AppUserModel.ID" Value="OpenShell.ClassicExplorer.Settings" />
@@ -607,9 +595,9 @@
<Property Id="ApplicationFolderName" Value="Open-Shell" />
<Property Id="WixAppFolder" Value="WixPerMachineFolder" />
<Property Id="ALLUSERS" Value="1" />
<Property Id="ARPHELPLINK" Value="http://www.classicshell.net/forum/" />
<Property Id="ARPHELPLINK" Value="https://github.com/Open-Shell/Open-Shell-Menu/issues" />
<Property Id="ARPSIZE" Value="9000" />
<Property Id="ARPURLINFOABOUT" Value="http://www.classicshell.net/" />
<Property Id="ARPURLINFOABOUT" Value="https://open-shell.github.io/Open-Shell-Menu" />
<Property Id="ARPNOMODIFY" Value="1" />
<Property Id="ARPNOREPAIR" Value="1" />
<Property Id="START_MENU_FOLDER" Value="1" />

View File

@@ -14,18 +14,18 @@
<ProjectGuid>{E1017135-9916-4B11-9AC5-1EC0BD8F8CD6}</ProjectGuid>
<RootNamespace>SetupHelper</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -53,7 +53,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>

View File

@@ -50,62 +50,62 @@
<ProjectGuid>{F92A5473-F9E0-412F-923C-6632A66D13C1}</ProjectGuid>
<RootNamespace>UpdateBin</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='update_4.3.1|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='update_4.3.0|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='update_4.2.7|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='update_4.2.6|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='update_4.2.5|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='update_4.2.4|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='update_4.2.3|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='update_4.2.2|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='update_4.2.1|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='update_4.2.0|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='update_4.1.0|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -503,4 +503,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@@ -13,6 +13,7 @@
#include <atlctl.h>
#include <atlstr.h>
#include <atltypes.h>
#include <string>
#include "ResourceHelper.h"
#include "ComHelper.h"
#include "StringUtils.h"
@@ -452,6 +453,32 @@ static void SaveReportFile( void )
}
}
static void RemoveShellExtKey(const wchar_t* progID)
{
static const auto ShellExtName = L"StartMenuExt";
auto contextMenuHandlers = std::wstring(progID) + L"\\ShellEx\\ContextMenuHandlers";
auto startMenuExt = contextMenuHandlers + L"\\" + ShellExtName;
HKEY hkey = NULL;
if (RegOpenKeyEx(HKEY_CLASSES_ROOT, startMenuExt.c_str(), 0, KEY_READ | KEY_WOW64_64KEY, &hkey) == ERROR_SUCCESS)
{
RegCloseKey(hkey);
LogMessage(-1, L"Deleting registry key HKEY_CLASSES_ROOT\\%s", startMenuExt.c_str());
auto error = RegCreateKeyEx(HKEY_CLASSES_ROOT, contextMenuHandlers.c_str(), NULL, NULL, REG_OPTION_BACKUP_RESTORE, KEY_WRITE | DELETE | KEY_WOW64_64KEY, NULL, &hkey, NULL);
if (error == ERROR_SUCCESS)
{
error = RegDeleteTree2(hkey, ShellExtName);
if (error != ERROR_SUCCESS && error != ERROR_FILE_NOT_FOUND)
LogMessage(error, L"Failed to delete registry key HKEY_CLASSES_ROOT\\%s.", startMenuExt.c_str());
RegCloseKey(hkey);
}
else if (error != ERROR_FILE_NOT_FOUND)
{
LogMessage(error, L"Failed to open registry key HKEY_CLASSES_ROOT\\%s for writing.", contextMenuHandlers.c_str());
}
}
}
static bool RemoveRegistryKeys( bool bPin )
{
HKEY hkey=NULL;
@@ -488,40 +515,11 @@ static bool RemoveRegistryKeys( bool bPin )
}
}
hkey=NULL;
if (bPin)
{
if (RegOpenKeyEx(HKEY_CLASSES_ROOT,L"Launcher.ImmersiveApplication\\ShellEx\\ContextMenuHandlers\\StartMenuExt",0,KEY_READ|KEY_WOW64_64KEY,&hkey)==ERROR_SUCCESS)
{
RegCloseKey(hkey);
LogMessage(-1,L"Deleting registry key HKEY_CLASSES_ROOT\\Launcher.ImmersiveApplication\\ShellEx\\ContextMenuHandlers\\StartMenuExt");
error=RegCreateKeyEx(HKEY_CLASSES_ROOT,L"Launcher.ImmersiveApplication\\ShellEx\\ContextMenuHandlers",NULL,NULL,REG_OPTION_BACKUP_RESTORE,KEY_WRITE|DELETE|KEY_WOW64_64KEY,NULL,&hkey,NULL);
if (error==ERROR_SUCCESS)
{
error=RegDeleteTree2(hkey,L"StartMenuExt");
if (error!=ERROR_SUCCESS && error!=ERROR_FILE_NOT_FOUND)
LogMessage(error,L"Failed to delete registry key HKEY_CLASSES_ROOT\\Launcher.ImmersiveApplication\\ShellEx\\ContextMenuHandlers\\StartMenuExt.");
RegCloseKey(hkey);
}
else if (error!=ERROR_FILE_NOT_FOUND)
LogMessage(error,L"Failed to open registry key HKEY_CLASSES_ROOT\\Launcher.ImmersiveApplication\\ShellEx\\ContextMenuHandlers for writing.");
}
if (RegOpenKeyEx(HKEY_CLASSES_ROOT,L"Launcher.SystemSettings\\ShellEx\\ContextMenuHandlers\\StartMenuExt",0,KEY_READ|KEY_WOW64_64KEY,&hkey)==ERROR_SUCCESS)
{
RegCloseKey(hkey);
LogMessage(-1,L"Deleting registry key HKEY_CLASSES_ROOT\\Launcher.SystemSettings\\ShellEx\\ContextMenuHandlers\\StartMenuExt");
error=RegCreateKeyEx(HKEY_CLASSES_ROOT,L"Launcher.SystemSettings\\ShellEx\\ContextMenuHandlers",NULL,NULL,REG_OPTION_BACKUP_RESTORE,KEY_WRITE|DELETE|KEY_WOW64_64KEY,NULL,&hkey,NULL);
if (error==ERROR_SUCCESS)
{
error=RegDeleteTree2(hkey,L"StartMenuExt");
if (error!=ERROR_SUCCESS && error!=ERROR_FILE_NOT_FOUND)
LogMessage(error,L"Failed to delete registry key HKEY_CLASSES_ROOT\\Launcher.SystemSettings\\ShellEx\\ContextMenuHandlers\\StartMenuExt.");
RegCloseKey(hkey);
}
else if (error!=ERROR_FILE_NOT_FOUND)
LogMessage(error,L"Failed to open registry key HKEY_CLASSES_ROOT\\Launcher.SystemSettings\\ShellEx\\ContextMenuHandlers for writing.");
}
RemoveShellExtKey(L"Launcher.ImmersiveApplication");
RemoveShellExtKey(L"Launcher.DesktopPackagedApplication");
RemoveShellExtKey(L"Launcher.SystemSettings");
}
return true;

View File

@@ -22,32 +22,32 @@
<ProjectGuid>{DAE66C9B-05DC-4ACE-97DA-2547B490BBFF}</ProjectGuid>
<RootNamespace>Utility</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</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>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
@@ -92,7 +92,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
@@ -112,7 +111,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>

View File

@@ -7,7 +7,7 @@ rem Clean repository and build fresh. Will erase current changes so disabled by
rem git clean -dfx
rem Default version
set CS_VERSION=4.4.110
set CS_VERSION=4.4.1000
if defined APPVEYOR_BUILD_VERSION (
set CS_VERSION=%APPVEYOR_BUILD_VERSION%

View File

@@ -9,7 +9,7 @@ rem Clean repository and build fresh. Will erase current changes so disabled by
rem git clean -dfx
rem Default version
set CS_VERSION=4.3.2
set CS_VERSION=4.4.1000
if defined APPVEYOR_BUILD_VERSION (
set CS_VERSION=%APPVEYOR_BUILD_VERSION%

View File

@@ -10,12 +10,12 @@
<ProjectGuid>{0A60FD06-3A81-4651-A869-9850DBC115EA}</ProjectGuid>
<RootNamespace>enUS</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Resource|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

View File

@@ -10,12 +10,12 @@
<ProjectGuid>{9EC23CA9-384A-4EEB-979E-69879DC1A78C}</ProjectGuid>
<RootNamespace>ClassicSkin</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Resource|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -62,4 +62,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@@ -10,12 +10,12 @@
<ProjectGuid>{31C016FB-9EA1-4AF5-987A-37210C04DA06}</ProjectGuid>
<RootNamespace>ClassicSkin7</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Resource|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -63,4 +63,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@@ -10,12 +10,12 @@
<ProjectGuid>{066C9721-26D5-4C4D-868E-50C2BA0A8196}</ProjectGuid>
<RootNamespace>FullGlass</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Resource|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -75,4 +75,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@@ -10,12 +10,12 @@
<ProjectGuid>{CA5BFC96-428D-42F5-9F7D-CDDE048A357C}</ProjectGuid>
<RootNamespace>Metallic7</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Resource|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -85,4 +85,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@@ -10,12 +10,12 @@
<ProjectGuid>{63BAF573-170B-4FA0-AEE3-16E04F3E9DF5}</ProjectGuid>
<RootNamespace>Metro</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Resource|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -74,4 +74,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@@ -10,12 +10,12 @@
<ProjectGuid>{598AB4AC-008E-4501-90B3-C5213834C1DA}</ProjectGuid>
<RootNamespace>Metro7</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Resource|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -82,4 +82,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@@ -10,12 +10,12 @@
<ProjectGuid>{7BD26CB3-5280-48FD-9A86-C13E321018D5}</ProjectGuid>
<RootNamespace>Midnight7</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Resource|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -95,4 +95,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@@ -10,12 +10,12 @@
<ProjectGuid>{66D1EAA4-65D1-45CC-9989-E616FC0575EB}</ProjectGuid>
<RootNamespace>SmokedGlass</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Resource|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -69,4 +69,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@@ -10,12 +10,12 @@
<ProjectGuid>{EA65FDDD-CB77-417F-8BB4-2F3ECB5B3E75}</ProjectGuid>
<RootNamespace>Win7Aero</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Resource|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -78,4 +78,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@@ -10,12 +10,12 @@
<ProjectGuid>{A2CCDE9F-17CE-461E-8BD9-00261B8855A6}</ProjectGuid>
<RootNamespace>Win7Aero7</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Resource|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -87,4 +87,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@@ -10,12 +10,12 @@
<ProjectGuid>{404821C5-4EE4-4908-A759-5EF6DAC14AB6}</ProjectGuid>
<RootNamespace>Win7Basic</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Resource|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -78,4 +78,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@@ -10,12 +10,12 @@
<ProjectGuid>{ED74EBA9-1BCB-4B8F-9AE1-DC63B3C24A94}</ProjectGuid>
<RootNamespace>Win8</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Resource|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -84,4 +84,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@@ -10,12 +10,12 @@
<ProjectGuid>{5C875214-0E3A-4CF0-BC0C-BFF6FAA4C089}</ProjectGuid>
<RootNamespace>Win87</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Resource|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -85,4 +85,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@@ -10,12 +10,12 @@
<ProjectGuid>{81EB6336-366C-47DD-82CF-FF6C36CCD2B5}</ProjectGuid>
<RootNamespace>WinXP</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Resource|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -83,4 +83,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@@ -274,6 +274,97 @@ public:
//const wchar_t *g_AppId=L"Microsoft.BingWeather_8wekyb3d8bbwe!App";
const wchar_t *g_AppId=L"microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.calendar";
static DWORD g_winVer = GetVersionEx(GetModuleHandle(L"user32.dll"));
bool WasOsUpgrade()
{
CRegKey regKey;
if (regKey.Open(HKEY_LOCAL_MACHINE, L"Software\\OpenShell\\OpenShell", KEY_READ | KEY_WOW64_64KEY) == ERROR_SUCCESS)
{
DWORD ver;
if (regKey.QueryDWORDValue(L"WinVersion", ver) == ERROR_SUCCESS)
{
if (ver < g_winVer)
return true;
}
}
return false;
}
// starts new instance of StartMenu.exe with "-upgrade" command line parameter
// UAC dialog is shown to ensure it will run with administrator privileges
void RunOsUpgradeTaskAsAdmin()
{
#ifdef _WIN64
wchar_t path[_MAX_PATH] = L"%windir%\\System32\\StartMenuHelper64.dll";
#else
wchar_t path[_MAX_PATH] = L"%windir%\\System32\\StartMenuHelper32.dll";
#endif
DoEnvironmentSubst(path, _countof(path));
if (GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES)
{
GetModuleFileName(NULL, path, _countof(path));
CoInitialize(NULL);
ShellExecute(NULL, L"runas", path, L"-upgrade", NULL, SW_SHOWNORMAL);
CoUninitialize();
}
}
DWORD PerformOsUpgradeTask(bool silent)
{
CRegKey regKey;
DWORD error = regKey.Open(HKEY_LOCAL_MACHINE, L"Software\\OpenShell\\OpenShell", KEY_WRITE | KEY_WOW64_64KEY);
const wchar_t *nl = error == ERROR_SUCCESS ? L"\r\n\r\n" : L"\r\n";
if (error == ERROR_SUCCESS)
{
regKey.SetDWORDValue(L"WinVersion", g_winVer);
// run regsvr32 StartMenuHelper
#ifdef _WIN64
wchar_t cmdLine[_MAX_PATH] = L"regsvr32 /s \"%windir%\\System32\\StartMenuHelper64.dll\"";
#else
wchar_t cmdLine[_MAX_PATH] = L"regsvr32 /s \"%windir%\\System32\\StartMenuHelper32.dll\"";
#endif
DoEnvironmentSubst(cmdLine, _countof(cmdLine));
wchar_t exe[_MAX_PATH] = L"%windir%\\System32\\regsvr32.exe";
DoEnvironmentSubst(exe, _countof(exe));
STARTUPINFO startupInfo = { sizeof(startupInfo) };
PROCESS_INFORMATION processInfo;
memset(&processInfo, 0, sizeof(processInfo));
if (CreateProcess(exe, cmdLine, NULL, NULL, FALSE, 0, NULL, NULL, &startupInfo, &processInfo))
{
CloseHandle(processInfo.hThread);
WaitForSingleObject(processInfo.hProcess, INFINITE);
GetExitCodeProcess(processInfo.hProcess, &error);
CloseHandle(processInfo.hProcess);
}
else
{
error = GetLastError();
}
}
if (!silent)
{
if (error)
{
wchar_t msg[1024];
int len = Sprintf(msg, _countof(msg), L"%s%s", DllLoadStringEx(IDS_UPGRADE_ERROR), nl);
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, error, 0, msg + len, _countof(msg) - len, NULL);
MessageBox(NULL, msg, DllLoadStringEx(IDS_APP_TITLE), MB_OK | MB_ICONERROR);
}
else
{
MessageBox(NULL, DllLoadStringEx(IDS_UPGRADE_SUCCESS), DllLoadStringEx(IDS_APP_TITLE), MB_OK | MB_ICONINFORMATION);
}
}
return error;
}
int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpstrCmdLine, int nCmdShow )
{
/* CoInitialize(NULL);
@@ -340,8 +431,8 @@ int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpstrC
ImportLegacyData();
DllLogToFile(STARTUP_LOG,L"StartMenu: start '%s'",lpstrCmdLine);
DWORD winVer=GetVersionEx(GetModuleHandle(L"user32.dll"));
if (wcsstr(lpstrCmdLine,L"-startup") || (wcsstr(lpstrCmdLine,L"-autorun") && HIWORD(winVer)<WIN_VER_WIN8))
if (wcsstr(lpstrCmdLine,L"-startup") || (wcsstr(lpstrCmdLine,L"-autorun") && HIWORD(g_winVer)<WIN_VER_WIN8))
{
WaitDllInitThread();
if (!DllGetSettingBool(L"AutoStart"))
@@ -360,31 +451,11 @@ int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpstrC
else if (wcsstr(lpstrCmdLine,L"-autorun")) // on Win8+
{
WaitDllInitThread();
CRegKey regKey;
if (regKey.Open(HKEY_LOCAL_MACHINE,L"Software\\OpenShell\\OpenShell",KEY_READ|KEY_WOW64_64KEY)==ERROR_SUCCESS)
if (WasOsUpgrade())
{
DWORD ver1;
if (regKey.QueryDWORDValue(L"WinVersion",ver1)==ERROR_SUCCESS)
{
if (ver1<winVer)
{
// this is an upgrade
MessageBox(NULL,DllLoadStringEx(IDS_UPGRADE_WIN),DllLoadStringEx(IDS_APP_TITLE),MB_OK);
#ifdef _WIN64
wchar_t path[_MAX_PATH]=L"%windir%\\System32\\StartMenuHelper64.dll";
#else
wchar_t path[_MAX_PATH]=L"%windir%\\System32\\StartMenuHelper32.dll";
#endif
DoEnvironmentSubst(path,_countof(path));
if (GetFileAttributes(path)!=INVALID_FILE_ATTRIBUTES)
{
GetModuleFileName(NULL,path,_countof(path));
CoInitialize(NULL);
ShellExecute(NULL,L"runas",path,L"-upgrade",NULL,SW_SHOWNORMAL);
CoUninitialize();
}
}
}
// this is an upgrade
MessageBox(NULL, DllLoadStringEx(IDS_UPGRADE_WIN), DllLoadStringEx(IDS_APP_TITLE), MB_OK);
RunOsUpgradeTaskAsAdmin();
}
if (!DllGetSettingBool(L"AutoStart"))
{
@@ -399,49 +470,14 @@ int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpstrC
if (wcsstr(lpstrCmdLine,L"-upgrade"))
{
WaitDllInitThread();
CRegKey regKey;
DWORD error=regKey.Open(HKEY_LOCAL_MACHINE,L"Software\\OpenShell\\OpenShell",KEY_WRITE|KEY_WOW64_64KEY);
const wchar_t *nl=error==ERROR_SUCCESS?L"\r\n\r\n":L"\r\n";
if (error==ERROR_SUCCESS)
{
regKey.SetDWORDValue(L"WinVersion",winVer);
// run regsvr32 StartMenuHelper
#ifdef _WIN64
wchar_t cmdLine[_MAX_PATH]=L"regsvr32 /s \"%windir%\\System32\\StartMenuHelper64.dll\"";
#else
wchar_t cmdLine[_MAX_PATH]=L"regsvr32 /s \"%windir%\\System32\\StartMenuHelper32.dll\"";
#endif
DoEnvironmentSubst(cmdLine,_countof(cmdLine));
wchar_t exe[_MAX_PATH]=L"%windir%\\System32\\regsvr32.exe";
DoEnvironmentSubst(exe,_countof(exe));
STARTUPINFO startupInfo={sizeof(startupInfo)};
PROCESS_INFORMATION processInfo;
memset(&processInfo,0,sizeof(processInfo));
if (CreateProcess(exe,cmdLine,NULL,NULL,FALSE,0,NULL,NULL,&startupInfo,&processInfo))
{
CloseHandle(processInfo.hThread);
WaitForSingleObject(processInfo.hProcess,INFINITE);
GetExitCodeProcess(processInfo.hProcess,&error);
CloseHandle(processInfo.hProcess);
}
else
error=GetLastError();
}
if (error)
if (WasOsUpgrade())
{
wchar_t msg[1024];
int len=Sprintf(msg,_countof(msg),L"%s%s",DllLoadStringEx(IDS_UPGRADE_ERROR),nl);
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS,NULL,error,0,msg+len,_countof(msg)-len,NULL);
MessageBox(NULL,msg,DllLoadStringEx(IDS_APP_TITLE),MB_OK|MB_ICONERROR);
const bool silent = wcsstr(lpstrCmdLine, L"-silent") != nullptr;
return PerformOsUpgradeTask(silent);
}
else
{
MessageBox(NULL,DllLoadStringEx(IDS_UPGRADE_SUCCESS),DllLoadStringEx(IDS_APP_TITLE),MB_OK|MB_ICONINFORMATION);
}
return error;
return 0;
}
const wchar_t *pCmd=wcsstr(lpstrCmdLine,L"-cmd ");

View File

@@ -30,46 +30,46 @@
<ProjectGuid>{87D5FE20-AF86-458A-9AA3-3131EB06179B}</ProjectGuid>
<RootNamespace>StartMenu</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</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>
<PlatformToolset>v142</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>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Setup|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
@@ -136,7 +136,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -159,7 +158,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>

View File

@@ -182,7 +182,7 @@ HRESULT STDMETHODCALLTYPE CMenuAccessible::accSelect( long flagsSelect, VARIANT
int index=varChild.lVal-1;
if (index<0 || index>=(int)m_pOwner->m_Items.size())
return S_FALSE;
m_pOwner->ActivateItem(index,CMenuContainer::ACTIVATE_SELECT,NULL,false);
m_pOwner->ActivateItem(index,CMenuContainer::ACTIVATE_SELECT,NULL);
}
return S_OK;
}

View File

@@ -248,7 +248,6 @@ bool CMenuContainer::DragOutApps( const CItemManager::ItemInfo *pInfo )
s_bDragFromTree=false;
if (!m_bDestroyed)
KillTimer(TIMER_DRAG);
HideTemp(false);
s_bPreventClosing=false;
if (s_bDragClosed)
@@ -343,7 +342,6 @@ bool CMenuContainer::DragOut( int index, bool bApp )
if (!m_bDestroyed)
KillTimer(TIMER_DRAG);
s_bDragMovable=false;
HideTemp(false);
s_bPreventClosing=false;
if (s_bDragClosed)
@@ -854,21 +852,29 @@ HRESULT STDMETHODCALLTYPE CMenuContainer::Drop( IDataObject *pDataObj, DWORD grf
CComQIPtr<IDataObjectAsyncCapability> pAsync=pDataObj;
if (pAsync)
pAsync->SetAsyncMode(FALSE);
for (std::vector<CMenuContainer*>::iterator it=s_Menus.begin();it!=s_Menus.end();++it)
if (!(*it)->m_bDestroyed)
(*it)->EnableWindow(FALSE); // disable all menus
for (auto& it : s_Menus)
{
if (!it->m_bDestroyed)
{
it->EnableWindow(FALSE); // disable all menus
it->SetWindowPos(HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
}
}
bool bAllPrograms=s_bAllPrograms;
if (bAllPrograms) ::EnableWindow(g_TopWin7Menu,FALSE);
bool bOld=s_bPreventClosing;
s_bPreventClosing=true;
AddRef();
pTarget->Drop(pDataObj,grfKeyState,pt,pdwEffect);
if (!bOld)
HideTemp(false);
s_bPreventClosing=bOld;
for (std::vector<CMenuContainer*>::iterator it=s_Menus.begin();it!=s_Menus.end();++it)
if (!(*it)->m_bDestroyed)
(*it)->EnableWindow(TRUE); // enable all menus
for (auto& it : s_Menus)
{
if (!it->m_bDestroyed)
{
it->EnableWindow(TRUE); // enable all menus
it->SetWindowPos(HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
}
}
if (bAllPrograms) ::EnableWindow(g_TopWin7Menu,TRUE);
}
else

View File

@@ -142,10 +142,11 @@ static bool DetectGrayscaleImage( const unsigned int *bits, int stride, int widt
for (int x=0;x<width;x++)
{
unsigned int pixel=bits[x];
int a=(pixel>>24)&255;
int r=(pixel>>16)&255;
int g=(pixel>>8)&255;
int b=(pixel)&255;
if (abs(r-g)>2 || abs(r-b)>2 || abs(g-b)>2)
if (abs(a-r)>2 || abs(r-g)>2 || abs(r-b)>2 || abs(g-b)>2)
return false; // found colored pixel
if (!(pixel&0xFF000000))
transparent++;
@@ -2441,7 +2442,7 @@ void CItemManager::LoadMetroIcon( IShellItem *pItem, int &refreshFlags, const Ic
StoreInCache(hash,L"",NULL,hLargeBitmap,NULL,INFO_LARGE_ICON,smallIcon,largeIcon,extraLargeIcon,false,true);
}
}
if ((refreshFlags&INFO_SMALL_ICON) && SetResContextTargetSize(pResContext,EXTRA_LARGE_ICON_SIZE-delta))
if ((refreshFlags&INFO_EXTRA_LARGE_ICON) && SetResContextTargetSize(pResContext,EXTRA_LARGE_ICON_SIZE-delta))
{
CComString pLocation;
if (SUCCEEDED(pResMap->GetFilePath(iconName,&pLocation)))

View File

@@ -402,7 +402,7 @@ void CMenuContainer::OpenSubMenu( int index, TActivateType type, bool bShift )
if (m_Options&CONTAINER_NOEXTENSIONS)
options|=CONTAINER_NOEXTENSIONS;
if (item.id==MENU_PROGRAMS || item.id==MENU_APPS || (m_Options&CONTAINER_MULTICOL_REC))
if (item.id==MENU_PROGRAMS || item.id==MENU_APPS || item.bFolder || (m_Options&CONTAINER_MULTICOL_REC))
options|=CONTAINER_MULTICOL_REC;
if ((options&CONTAINER_MULTICOL_REC) && !bShift)
options|=CONTAINER_MULTICOLUMN;
@@ -2192,11 +2192,15 @@ void CMenuContainer::ActivateItem( int index, TActivateType type, const POINT *p
if (res==CMD_PINSETTING)
{
CSearchManager::TItemCategory cat=(CSearchManager::TItemCategory)(item.categoryHash&CSearchManager::CATEGORY_MASK);
if (cat==CSearchManager::CATEGORY_SETTING)
CreatePinLink(pItemPidl1,item.name,NULL,0);
else if (cat==CSearchManager::CATEGORY_METROSETTING)
CreatePinLink(pItemPidl1,item.name,L"%windir%\\ImmersiveControlPanel\\systemsettings.exe",0);
CString iconPath;
if (item.pItemInfo)
{
CItemManager::RWLock lock(&g_ItemManager, false, CItemManager::RWLOCK_ITEMS);
if (_wcsicmp(PathFindExtension(item.pItemInfo->GetPath()), L".settingcontent-ms") == 0)
iconPath = L"%windir%\\ImmersiveControlPanel\\systemsettings.exe";
}
CreatePinLink(pItemPidl1, item.name, iconPath.IsEmpty() ? nullptr : iconPath.GetString(), 0);
m_bRefreshItems=true;
}
@@ -2396,7 +2400,6 @@ void CMenuContainer::ActivateItem( int index, TActivateType type, const POINT *p
}
}
DestroyMenu(menu2);
HideTemp(false);
s_bPreventClosing=false;
PITEMID_CHILD newPidl=NULL;
@@ -2485,7 +2488,6 @@ void CMenuContainer::ActivateItem( int index, TActivateType type, const POINT *p
Invalidate();
if (m_HotItem<0) SetHotItem(index);
}
HideTemp(false);
s_bPreventClosing=false;
}
SetContextItem(-1);
@@ -2742,7 +2744,6 @@ void CMenuContainer::ActivateItem( int index, TActivateType type, const POINT *p
else
SetFocus();
}
HideTemp(false);
s_bPreventClosing=false;
s_HotPos=GetMessagePos();
res=CMD_RENAME;
@@ -2802,10 +2803,12 @@ void CMenuContainer::ActivateItem( int index, TActivateType type, const POINT *p
if (bRefresh || bRefreshMain)
info.fMask|=CMIC_MASK_NOASYNC; // wait for delete/link commands to finish so we can refresh the menu
if ((type!=ACTIVATE_MENU && type!=ACTIVATE_DELETE) || GetWinVersion()<WIN_VER_WIN8)
s_bPreventClosing=true;
for (std::vector<CMenuContainer*>::iterator it=s_Menus.begin();it!=s_Menus.end();++it)
(*it)->EnableWindow(FALSE); // disable all menus
s_bPreventClosing=true;
for (auto& it : s_Menus)
{
it->EnableWindow(FALSE); // disable all menus
it->SetWindowPos(HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
}
bool bAllPrograms=s_bAllPrograms;
if (bAllPrograms) ::EnableWindow(g_TopWin7Menu,FALSE);
info.hwnd=g_OwnerWindow;
@@ -2850,9 +2853,14 @@ void CMenuContainer::ActivateItem( int index, TActivateType type, const POINT *p
}
}
}
for (std::vector<CMenuContainer*>::iterator it=s_Menus.begin();it!=s_Menus.end();++it)
if (!(*it)->m_bDestroyed)
(*it)->EnableWindow(TRUE); // enable all menus
for (auto& it : s_Menus)
{
if (!it->m_bDestroyed)
{
it->EnableWindow(TRUE); // enable all menus
it->SetWindowPos(HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
}
}
if (bAllPrograms) ::EnableWindow(g_TopWin7Menu,TRUE);
if (bRefreshMain && m_bSubMenu)
{
@@ -2880,7 +2888,6 @@ void CMenuContainer::ActivateItem( int index, TActivateType type, const POINT *p
else
SetFocus();
}
HideTemp(false);
s_bPreventClosing=false;
if (!bKeepOpen && !bRefresh && !bRefreshMain)

View File

@@ -83,6 +83,7 @@ static StdMenuOption g_StdOptions[]=
{MENU_USERPICTURES,MENU_ENABLED}, // check policy
{MENU_SLEEP,MENU_ENABLED}, // check power caps
{MENU_HIBERNATE,MENU_ENABLED}, // check power caps
{MENU_LOCK,MENU_ENABLED}, // check power settings
{MENU_SWITCHUSER,MENU_ENABLED}, // check group policy
{MENU_APPS,MENU_ENABLED}, // enable on Win8+
{MENU_PCSETTINGS,MENU_ENABLED}, // enable on Win8+
@@ -2655,17 +2656,11 @@ int CMenuContainer::AddSearchItems( const std::vector<SearchItem> &items, const
if (!categoryName.IsEmpty())
{
MenuItem item(MENU_SEARCH_CATEGORY);
if (categoryHash==CSearchManager::CATEGORY_PROGRAM || categoryHash==CSearchManager::CATEGORY_SETTING)
{
item.name.Format(L"%s (%d)",categoryName,originalCount);
}
else
{
item.name=categoryName;
item.bSplit=(s_Skin.More_bitmap_Size.cx>0);
}
item.name.Format(L"%s (%d)",categoryName,originalCount);
item.nameHash=CalcFNVHash(categoryName);
item.categoryHash=categoryHash;
if (categoryHash!=CSearchManager::CATEGORY_PROGRAM || categoryHash!=CSearchManager::CATEGORY_SETTING)
item.bSplit=(s_Skin.More_bitmap_Size.cx>0);
m_Items.push_back(item);
}
}
@@ -2723,7 +2718,7 @@ bool CMenuContainer::InitSearchItems( void )
unsigned int runCategoryHash=0;
CString runCommand;
CComString runExe;
if (!bAutoComlpete && !s_bNoRun && s_SearchResults.programs.empty() && s_SearchResults.settings.empty())
if (!bAutoComlpete && !s_bNoRun && s_SearchResults.programs.empty() && s_SearchResults.settings.empty() && s_SearchResults.metrosettings.empty())
{
if (s_bWin7Style)
m_SearchBox.GetWindowText(runCommand);
@@ -2786,6 +2781,12 @@ bool CMenuContainer::InitSearchItems( void )
if (m_SearchCategoryHash==CSearchManager::CATEGORY_SETTING)
selectedCount=(int)s_SearchResults.settings.size();
}
if (!s_SearchResults.metrosettings.empty())
{
counts.push_back((int)s_SearchResults.metrosettings.size());
if (m_SearchCategoryHash==CSearchManager::CATEGORY_METROSETTING)
selectedCount=(int)s_SearchResults.metrosettings.size();
}
for (std::list<CSearchManager::SearchCategory>::const_iterator it=s_SearchResults.indexed.begin();it!=s_SearchResults.indexed.end();++it)
{
if (!it->items.empty())
@@ -2828,7 +2829,7 @@ bool CMenuContainer::InitSearchItems( void )
// add categories
std::list<CSearchManager::SearchCategory>::const_iterator it=s_SearchResults.indexed.begin();
for (size_t idx=0;idx<s_SearchResults.indexed.size()+2;idx++)
for (size_t idx=0;idx<s_SearchResults.indexed.size()+3;idx++)
{
items.clear();
unsigned int categoryHash;
@@ -2836,6 +2837,8 @@ bool CMenuContainer::InitSearchItems( void )
categoryHash=CSearchManager::CATEGORY_PROGRAM;
else if (idx==1)
categoryHash=CSearchManager::CATEGORY_SETTING;
else if (idx==2)
categoryHash=CSearchManager::CATEGORY_METROSETTING;
else
categoryHash=it->categoryHash;
@@ -2853,7 +2856,7 @@ bool CMenuContainer::InitSearchItems( void )
}
if (count<=0)
{
if (idx>=2) ++it;
if (idx>=3) ++it;
continue;
}
@@ -2879,6 +2882,16 @@ bool CMenuContainer::InitSearchItems( void )
items.push_back(SearchItem(*it));
name=FindTranslation(L"Search.CategorySettings",L"Settings");
}
else if (idx==2)
{
originalCount=(int)s_SearchResults.metrosettings.size();
if (count>originalCount)
count=originalCount;
items.reserve(count);
for (std::vector<const CItemManager::ItemInfo*>::const_iterator it=s_SearchResults.metrosettings.begin();it!=s_SearchResults.metrosettings.end() && (int)items.size()<count;++it)
items.push_back(SearchItem(*it));
name=FindTranslation(L"Search.CategoryPCSettings", L"Modern Settings");
}
else
{
originalCount=(int)it->items.size();
@@ -6364,11 +6377,6 @@ LRESULT CMenuContainer::OnRefresh( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL
return 0;
}
void CMenuContainer::HideTemp( bool bHide )
{
::PostMessage(g_OwnerWindow,WM_CLEAR,bHide,0);
}
LRESULT CMenuContainer::OnActivate( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled )
{
if (LOWORD(wParam)!=WA_INACTIVE)
@@ -6378,6 +6386,9 @@ LRESULT CMenuContainer::OnActivate( UINT uMsg, WPARAM wParam, LPARAM lParam, BOO
return 0;
}
#ifndef PREVENT_CLOSING
if (s_bPreventClosing)
return 0;
if (lParam)
{
// check if another menu window is being activated
@@ -6388,24 +6399,15 @@ LRESULT CMenuContainer::OnActivate( UINT uMsg, WPARAM wParam, LPARAM lParam, BOO
if ((HWND)lParam==g_OwnerWindow || (HWND)lParam==g_TopWin7Menu)
return 0;
if (s_bPreventClosing && (::GetWindowLong((HWND)lParam,GWL_EXSTYLE)&WS_EX_TOPMOST))
return 0;
}
// a non-top-most window tries to activate while we are still here
if (s_bPreventClosing && (!g_TopWin7Menu || !s_bAllPrograms))
HideTemp(true);
else
{
for (std::vector<CMenuContainer*>::reverse_iterator it=s_Menus.rbegin();it!=s_Menus.rend();++it)
if ((*it)->m_hWnd && !(*it)->m_bDestroyed)
{
(*it)->PostMessage(WM_CLOSE);
(*it)->m_bClosing=true;
}
if (g_TopWin7Menu && s_bAllPrograms) ::PostMessage(g_TopWin7Menu,WM_CLOSE,0,0);
}
for (std::vector<CMenuContainer*>::reverse_iterator it=s_Menus.rbegin();it!=s_Menus.rend();++it)
if ((*it)->m_hWnd && !(*it)->m_bDestroyed)
{
(*it)->PostMessage(WM_CLOSE);
(*it)->m_bClosing=true;
}
if (g_TopWin7Menu && s_bAllPrograms) ::PostMessage(g_TopWin7Menu,WM_CLOSE,0,0);
#endif
return 0;
@@ -7709,27 +7711,57 @@ HWND CMenuContainer::ToggleStartMenu( int taskbarId, bool bKeyboard, bool bAllPr
s_bHasUpdates=(!bRemote || GetSettingBool(L"RemoteShutdown")) && GetSettingBool(L"CheckWinUpdates") && CheckForUpdates();
SYSTEM_POWER_CAPABILITIES powerCaps;
GetPwrCapabilities(&powerCaps);
bool bHibernate=false;
if (powerCaps.HiberFilePresent)
// Check control panel options for power buttons
bool bHibernate = true, bSleep = true, bLock = true;
{
bHibernate=true;
/* disabled for now, use group policy to hide Hibernate
// disable hibernate if hybrid sleep (fast s4) is enabled
SYSTEM_POWER_STATUS status;
if (GetSystemPowerStatus(&status) && (status.ACLineStatus==0 || status.ACLineStatus==1))
CRegKey regKeyButtons;
if (regKeyButtons.Open(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FlyoutMenuSettings", KEY_READ) == ERROR_SUCCESS)
{
GUID *pScheme;
if (PowerGetActiveScheme(NULL,&pScheme)==ERROR_SUCCESS)
{
DWORD index;
if ((status.ACLineStatus==1?PowerReadACValueIndex:PowerReadDCValueIndex)(NULL,pScheme,&GUID_SLEEP_SUBGROUP,&GUID_HIBERNATE_FASTS4_POLICY,&index)==ERROR_SUCCESS && index)
bHibernate=false;
LocalFree(pScheme);
}
}*/
DWORD dwValue = 1;
if (regKeyButtons.QueryDWORDValue(L"ShowHibernateOption", dwValue) == ERROR_SUCCESS)
if (dwValue == 0)
bHibernate = false;
if (regKeyButtons.QueryDWORDValue(L"ShowLockOption", dwValue) == ERROR_SUCCESS)
if (dwValue == 0)
bLock = false;
if (regKeyButtons.QueryDWORDValue(L"ShowSleepOption", dwValue) == ERROR_SUCCESS)
if (dwValue == 0)
bSleep = false;
}
}
if (bHibernate || bSleep)
{
SYSTEM_POWER_CAPABILITIES powerCaps;
GetPwrCapabilities(&powerCaps);
// no sleep capabilities, turn off the sleep option
if (!(powerCaps.SystemS1 || powerCaps.SystemS2 || powerCaps.SystemS3 || powerCaps.AoAc))
{
bSleep = false;
}
// no hibernate capabilities, turn off hibernate option
if (!powerCaps.HiberFilePresent)
{
bHibernate = false;
/* disabled for now, use group policy to hide Hibernate
// disable hibernate if hybrid sleep (fast s4) is enabled
SYSTEM_POWER_STATUS status;
if (GetSystemPowerStatus(&status) && (status.ACLineStatus==0 || status.ACLineStatus==1))
{
GUID *pScheme;
if (PowerGetActiveScheme(NULL,&pScheme)==ERROR_SUCCESS)
{
DWORD index;
if ((status.ACLineStatus==1?PowerReadACValueIndex:PowerReadDCValueIndex)(NULL,pScheme,&GUID_SLEEP_SUBGROUP,&GUID_HIBERNATE_FASTS4_POLICY,&index)==ERROR_SUCCESS && index)
bHibernate=false;
LocalFree(pScheme);
}
}*/
}
}
for (int i=0;i<_countof(g_StdOptions);i++)
@@ -7939,8 +7971,11 @@ HWND CMenuContainer::ToggleStartMenu( int taskbarId, bool bKeyboard, bool bAllPr
g_StdOptions[i].options=MENU_ENABLED|MENU_EXPANDED;
}
break;
case MENU_LOCK:
g_StdOptions[i].options=(bLock)?MENU_ENABLED|MENU_EXPANDED:0;
break;
case MENU_SLEEP:
g_StdOptions[i].options=(!s_bNoClose && (powerCaps.SystemS1 || powerCaps.SystemS2 || powerCaps.SystemS3 || powerCaps.AoAc))?MENU_ENABLED|MENU_EXPANDED:0;
g_StdOptions[i].options=(!s_bNoClose && bSleep)?MENU_ENABLED|MENU_EXPANDED:0;
break;
case MENU_HIBERNATE:
g_StdOptions[i].options=(!s_bNoClose && bHibernate)?MENU_ENABLED|MENU_EXPANDED:0;

View File

@@ -957,7 +957,6 @@ private:
friend LRESULT CALLBACK SubclassTopMenuProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData );
friend HRESULT CreatePinLink( PCIDLIST_ABSOLUTE sourcePidl, const wchar_t *name, const wchar_t *iconPath, int iconIndex );
static void HideTemp( bool bHide );
static void AddMRUShortcut( const wchar_t *path );
static void AddMRUAppId( const wchar_t *appid );
static void DeleteMRUShortcut( const wchar_t *path );

View File

@@ -60,9 +60,9 @@ void CProgramsTree::Create( CMenuContainer *pOwner )
HWND hWnd=CreateWindowEx(0,WC_TREEVIEW,NULL,WS_CHILD|TVS_EDITLABELS|TVS_FULLROWSELECT|(CMenuContainer::s_TipHideTime?TVS_INFOTIP:0)|TVS_NOHSCROLL|TVS_SHOWSELALWAYS|TVS_NONEVENHEIGHT,0,0,0,0,pOwner->m_hWnd,NULL,g_Instance,NULL);
TreeView_SetExtendedStyle(hWnd,TVS_EX_AUTOHSCROLL,TVS_EX_AUTOHSCROLL);
const MenuSkin &skin=CMenuContainer::s_Skin;
m_TreeTheme=OpenThemeData(m_hWnd,L"treeview");
m_TreeTheme=OpenThemeData(hWnd,L"treeview");
if (skin.BHasScrollbar)
m_ScrollTheme=OpenThemeData(m_hWnd,L"scrollbar");
m_ScrollTheme=OpenThemeData(hWnd,L"scrollbar");
const MenuSkin::ItemDrawSettings &settings=skin.ItemSettings[MenuSkin::PROGRAMS_TREE_ITEM];
@@ -1601,8 +1601,6 @@ HRESULT CProgramsTree::Drop( IDataObject *pDataObj, DWORD grfKeyState, POINTL pt
CMenuContainer::s_bPreventClosing=true;
m_pOwner->AddRef();
pTarget->Drop(pDataObj,grfKeyState,pt,pdwEffect);
if (!bOld)
CMenuContainer::HideTemp(false);
CMenuContainer::s_bPreventClosing=bOld;
for (std::vector<CMenuContainer*>::iterator it=CMenuContainer::s_Menus.begin();it!=CMenuContainer::s_Menus.end();++it)
if (!(*it)->m_bDestroyed)

View File

@@ -139,18 +139,25 @@ void CSearchManager::CloseMenu( void )
Lock lock(this,LOCK_DATA);
m_LastRequestId++;
m_LastProgramsRequestId=m_LastRequestId;
if (g_LogCategories&LOG_SEARCH)
if (g_LogCategories & LOG_SEARCH)
{
for (std::vector<SearchItem>::const_iterator it=m_ProgramItems.begin();it!=m_ProgramItems.end();++it)
for (const auto& item : m_ProgramItems)
{
if (it->category==CATEGORY_PROGRAM)
LOG_MENU(LOG_SEARCH,L"Program: '%s', %d",it->name,it->rank);
if (item.category == CATEGORY_PROGRAM)
LOG_MENU(LOG_SEARCH, L"Program: '%s', %d", item.name, item.rank);
}
std::sort(m_SettingsItems.begin(),m_SettingsItems.end());
for (std::vector<SearchItem>::const_iterator it=m_SettingsItems.begin();it!=m_SettingsItems.end();++it)
std::sort(m_SettingsItems.begin(), m_SettingsItems.end());
for (const auto& item : m_SettingsItems)
{
if (it->category==CATEGORY_SETTING)
LOG_MENU(LOG_SEARCH,L"Setting: '%s', %d",it->name,it->rank);
if (item.category == CATEGORY_SETTING)
LOG_MENU(LOG_SEARCH, L"Setting: '%s', %d", item.name, item.rank);
}
for (const auto& item : m_SettingsItems)
{
if (item.category == CATEGORY_METROSETTING)
LOG_MENU(LOG_SEARCH, L"MetroSetting: '%s', %d", item.name, item.rank);
}
}
if (m_bProgramsFound)
@@ -170,6 +177,7 @@ void CSearchManager::CloseMenu( void )
m_SettingsItems.clear();
m_SettingsHash=FNV_HASH0;
m_bSettingsFound=false;
m_bMetroSettingsFound = false;
m_IndexedItems.clear();
m_AutoCompleteItems.clear();
@@ -310,7 +318,9 @@ bool CSearchManager::AddSearchItem( IShellItem *pItem, const wchar_t *name, int
PROPVARIANT val;
PropVariantInit(&val);
pItem2->GetProperty(PKEY_Keywords,&val);
wchar_t keywords[1024];
if (val.vt==VT_EMPTY)
pItem2->GetProperty(PKEY_HighKeywords,&val);
wchar_t keywords[2048];
int len=0;
if (val.vt==VT_BSTR || val.vt==VT_LPWSTR)
{
@@ -334,7 +344,7 @@ bool CSearchManager::AddSearchItem( IShellItem *pItem, const wchar_t *name, int
}
Lock lock(this,LOCK_DATA);
if (category==CATEGORY_PROGRAM || category==CATEGORY_SETTING)
if (category==CATEGORY_PROGRAM || category==CATEGORY_SETTING || category==CATEGORY_METROSETTING)
{
if (searchRequest.requestId<m_LastProgramsRequestId)
return false;
@@ -345,10 +355,10 @@ bool CSearchManager::AddSearchItem( IShellItem *pItem, const wchar_t *name, int
return false;
}
bool res=true;
if (category==CATEGORY_PROGRAM || category==CATEGORY_SETTING)
if (category==CATEGORY_PROGRAM || category==CATEGORY_SETTING || category==CATEGORY_METROSETTING)
{
std::vector<SearchItem> &items=(category==CATEGORY_PROGRAM)?m_ProgramItems:m_SettingsItems;
if (category==CATEGORY_SETTING)
if (category==CATEGORY_SETTING || category==CATEGORY_METROSETTING)
{
// remove duplicate settings
for (std::vector<SearchItem>::const_iterator it=items.begin();it!=items.end();++it)
@@ -381,6 +391,8 @@ bool CSearchManager::AddSearchItem( IShellItem *pItem, const wchar_t *name, int
}
items.push_back(item);
if (item.category==CATEGORY_METROSETTING)
m_bMetroSettingsFound=true;
}
else if (category==CATEGORY_AUTOCOMPLETE)
{
@@ -409,7 +421,7 @@ void CSearchManager::CollectSearchItems( IShellItem *pFolder, int flags, TItemCa
CComPtr<IShellItem> pChild;
while (pChild=NULL,pEnum->Next(1,&pChild,NULL)==S_OK)
{
if (category==CATEGORY_PROGRAM || category==CATEGORY_SETTING)
if (category==CATEGORY_PROGRAM || category==CATEGORY_SETTING || category==CATEGORY_METROSETTING)
{
if (searchRequest.requestId<m_LastProgramsRequestId)
break;
@@ -428,7 +440,7 @@ void CSearchManager::CollectSearchItems( IShellItem *pFolder, int flags, TItemCa
{
// go into subfolders but not archives or links to folders
CollectSearchItems(pChild,flags,category,searchRequest);
if (category==CATEGORY_PROGRAM || category==CATEGORY_SETTING)
if (category==CATEGORY_PROGRAM || category==CATEGORY_SETTING || category==CATEGORY_METROSETTING)
{
if (searchRequest.requestId<m_LastProgramsRequestId)
break;
@@ -670,7 +682,7 @@ void CSearchManager::SearchThread( void )
if (GetWinVersion()>=WIN_VER_WIN8 && searchRequest.bSearchMetroApps)
{
std::vector<MetroLink> links;
GetMetroLinks(links,false);
GetMetroLinks(links,true);
for (std::vector<MetroLink>::const_iterator it=links.begin();it!=links.end();++it)
{
if (GetWinVersion()<WIN_VER_WIN10)
@@ -733,6 +745,14 @@ void CSearchManager::SearchThread( void )
if (searchRequest.requestId<m_LastProgramsRequestId)
continue;
}
if (searchRequest.bSearchMetroSettings)
{
CComPtr<IShellItem> pFolder;
if (SUCCEEDED(SHCreateItemFromParsingName(L"shell:::{82E749ED-B971-4550-BAF7-06AA2BF7E836}",NULL,IID_IShellItem,(void**)&pFolder)))
CollectSearchItems(pFolder,(searchRequest.bSearchKeywords?COLLECT_KEYWORDS:0)|COLLECT_NOREFRESH,CATEGORY_METROSETTING,searchRequest);
if (searchRequest.requestId<m_LastProgramsRequestId)
continue;
}
}
bool bRefresh=false;
{
@@ -780,12 +800,12 @@ void CSearchManager::SearchThread( void )
{
std::list<SearchScope> scopeList;
if (searchRequest.bSearchMetroSettings)
if (searchRequest.bSearchMetroSettings && !m_bMetroSettingsFound)
{
scopeList.push_back(SearchScope());
SearchScope &scope=*scopeList.rbegin();
scope.bFiles=true;
scope.name=FindTranslation(L"Search.CategoryPCSettings",L"Settings");
scope.name=FindTranslation(L"Search.CategoryPCSettings",L"Modern Settings");
scope.categoryHash=CATEGORY_METROSETTING;
scope.roots.push_back(L"FILE:");
}
@@ -1240,7 +1260,7 @@ void CSearchManager::SearchThread( void )
Lock lock(this,LOCK_DATA);
m_IndexedItems.push_back(SearchCategory());
pCategory=&*m_IndexedItems.rbegin();
pCategory->name.Format(L"%s (%d)",it->name,it->resultCount);
pCategory->name=it->name;
pCategory->categoryHash=it->categoryHash;
pCategory->search.Clone(it->search);
}
@@ -1348,6 +1368,7 @@ void CSearchManager::GetSearchResults( SearchResults &results )
{
results.programs.clear();
results.settings.clear();
results.metrosettings.clear();
results.indexed.clear();
results.autocomplete.clear();
results.autoCompletePath.Empty();
@@ -1397,14 +1418,19 @@ void CSearchManager::GetSearchResults( SearchResults &results )
std::vector<SearchItem> &settings=m_bSettingsFound?m_SettingsItems:m_SettingsItemsOld;
for (std::vector<SearchItem>::iterator it=settings.begin();it!=settings.end();++it)
{
int match=(it->category==CATEGORY_SETTING)?it->MatchText(m_SearchText,bSearchSubWord):0;
int match=(it->category==CATEGORY_SETTING || it->category==CATEGORY_METROSETTING)?it->MatchText(m_SearchText,bSearchSubWord):0;
it->rank=(it->rank&0xFFFFFFFE)|(match>>1);
}
std::sort(settings.begin(),settings.end());
for (std::vector<SearchItem>::const_iterator it=settings.begin();it!=settings.end();++it)
{
if (it->category==CATEGORY_SETTING && it->MatchText(m_SearchText,bSearchSubWord))
results.settings.push_back(it->pInfo);
if (it->MatchText(m_SearchText, bSearchSubWord))
{
if (it->category==CATEGORY_SETTING)
results.settings.push_back(it->pInfo);
if (it->category==CATEGORY_METROSETTING)
results.metrosettings.push_back(it->pInfo);
}
}
}
@@ -1423,7 +1449,7 @@ void CSearchManager::GetSearchResults( SearchResults &results )
results.autocomplete.push_back(it->pInfo);
}
}
results.bResults=(!results.programs.empty() || !results.settings.empty() || !results.indexed.empty() || !results.autocomplete.empty());
results.bResults=(!results.programs.empty() || !results.settings.empty() || !results.metrosettings.empty() || !results.indexed.empty() || !results.autocomplete.empty());
results.bSearching=(m_LastCompletedId!=m_LastRequestId);
}

View File

@@ -63,6 +63,7 @@ public:
CString autoCompletePath;
std::vector<const CItemManager::ItemInfo*> programs;
std::vector<const CItemManager::ItemInfo*> settings;
std::vector<const CItemManager::ItemInfo*> metrosettings;
std::vector<const CItemManager::ItemInfo*> autocomplete;
std::list<SearchCategory> indexed;
};
@@ -149,6 +150,7 @@ private:
unsigned int m_SettingsHashOld;
bool m_bProgramsFound;
bool m_bSettingsFound;
bool m_bMetroSettingsFound = false;
std::vector<SearchItem> m_AutoCompleteItems;
std::list<SearchCategory> m_IndexedItems;
std::vector<ItemRank> m_ItemRanks;

View File

@@ -3718,7 +3718,6 @@ protected:
CWindow m_ImageClassic1, m_ImageClassic2, m_ImageWin7;
CWindow m_Tooltip;
CWindow m_ButtonAero, m_ButtonClassic, m_ButtonCustom;
bool m_bLargeBitmaps;
HICON m_hIcon;
CString m_IconPath;
@@ -3737,14 +3736,13 @@ LRESULT CMenuStyleDlg::OnInitDialog( UINT uMsg, WPARAM wParam, LPARAM lParam, BO
HDC hdc=::GetDC(NULL);
int dpi=GetDeviceCaps(hdc,LOGPIXELSY);
::ReleaseDC(NULL,hdc);
m_bLargeBitmaps=dpi>=144;
if (m_bLargeBitmaps)
bool bLargeBitmaps=dpi>=144;
{
HBITMAP bmp=(HBITMAP)LoadImage(g_Instance,MAKEINTRESOURCE(IDB_STYLE_CLASSIC1150),IMAGE_BITMAP,0,0,LR_CREATEDIBSECTION);
HBITMAP bmp=LoadImageResource(g_Instance,MAKEINTRESOURCE(bLargeBitmaps?IDB_STYLE_CLASSIC1150:IDB_STYLE_CLASSIC1),true,true);
m_ImageClassic1.SendMessage(STM_SETIMAGE,IMAGE_BITMAP,(LPARAM)bmp);
bmp=(HBITMAP)LoadImage(g_Instance,MAKEINTRESOURCE(IDB_STYLE_CLASSIC2150),IMAGE_BITMAP,0,0,LR_CREATEDIBSECTION);
bmp=LoadImageResource(g_Instance,MAKEINTRESOURCE(bLargeBitmaps?IDB_STYLE_CLASSIC2150:IDB_STYLE_CLASSIC2),true,true);
m_ImageClassic2.SendMessage(STM_SETIMAGE,IMAGE_BITMAP,(LPARAM)bmp);
bmp=(HBITMAP)LoadImage(g_Instance,MAKEINTRESOURCE(IDB_STYLE_WIN7150),IMAGE_BITMAP,0,0,LR_CREATEDIBSECTION);
bmp=LoadImageResource(g_Instance,MAKEINTRESOURCE(bLargeBitmaps?IDB_STYLE_WIN7150:IDB_STYLE_WIN7),true,true);
m_ImageWin7.SendMessage(STM_SETIMAGE,IMAGE_BITMAP,(LPARAM)bmp);
}
@@ -3779,7 +3777,6 @@ LRESULT CMenuStyleDlg::OnDestroy( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL&
{
if (m_hIcon) DestroyIcon(m_hIcon);
m_hIcon=NULL;
if (m_bLargeBitmaps)
{
HBITMAP bmp=(HBITMAP)m_ImageClassic1.SendMessage(STM_GETIMAGE,IMAGE_BITMAP);
if (bmp) DeleteObject(bmp);

View File

@@ -292,7 +292,6 @@ public:
// message handlers
BEGIN_MSG_MAP( COwnerWindow )
MESSAGE_HANDLER( WM_ACTIVATE, OnActivate )
MESSAGE_HANDLER( WM_CLEAR, OnClear )
MESSAGE_HANDLER( WM_SYSCOLORCHANGE, OnColorChange )
MESSAGE_HANDLER( WM_SETTINGCHANGE, OnSettingChange )
MESSAGE_HANDLER( WM_DISPLAYCHANGE, OnDisplayChange )
@@ -304,7 +303,7 @@ protected:
if (LOWORD(wParam)!=WA_INACTIVE)
return 0;
if (CMenuContainer::s_bPreventClosing && lParam && (::GetWindowLongPtr((HWND)lParam,GWL_EXSTYLE)&WS_EX_TOPMOST))
if (CMenuContainer::s_bPreventClosing)
return 0;
// check if another menu window is being activated
@@ -313,41 +312,13 @@ protected:
if ((*it)->m_hWnd==(HWND)lParam)
return 0;
if (CMenuContainer::s_bPreventClosing)
{
CMenuContainer::HideTemp(true);
}
else
{
for (std::vector<CMenuContainer*>::reverse_iterator it=CMenuContainer::s_Menus.rbegin();it!=CMenuContainer::s_Menus.rend();++it)
if (!(*it)->m_bDestroyed)
(*it)->PostMessage(WM_CLOSE);
}
for (std::vector<CMenuContainer*>::reverse_iterator it=CMenuContainer::s_Menus.rbegin();it!=CMenuContainer::s_Menus.rend();++it)
if (!(*it)->m_bDestroyed)
(*it)->PostMessage(WM_CLOSE);
return 0;
}
LRESULT OnClear( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled )
{
bool bHide=(wParam!=0); // hide or destroy
if (CMenuContainer::s_bTempHidden!=bHide)
{
CMenuContainer::s_bTempHidden=bHide;
if (bHide && CMenuContainer::s_UserPicture.m_hWnd)
CMenuContainer::s_UserPicture.ShowWindow(SW_HIDE);
for (std::vector<CMenuContainer*>::iterator it=CMenuContainer::s_Menus.begin();it!=CMenuContainer::s_Menus.end();++it)
{
if ((*it)->m_hWnd && !(*it)->m_bDestroyed)
{
(*it)->m_bClosing=true;
if (!bHide)
(*it)->PostMessage(WM_CLOSE);
else
(*it)->ShowWindow(SW_HIDE);
}
}
}
return 0;
}
LRESULT OnColorChange( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled )
{

View File

@@ -369,19 +369,20 @@ IDI_START10 ICON "start10.ico"
IDB_ARROWS BITMAP "menu_arrows.bmp"
IDB_ARROWS150 BITMAP "menu_arrows150.bmp"
IDB_SEARCH_ICONS BITMAP "search_icons.bmp"
IDB_STYLE_CLASSIC1 BITMAP "style_classic.bmp"
IDB_STYLE_CLASSIC2 BITMAP "style_vista.bmp"
IDB_STYLE_WIN7 BITMAP "style_7.bmp"
IDB_BTN_CLASSIC BITMAP "btn_classic.bmp"
IDB_STYLE_CLASSIC1150 BITMAP "style_classic150.bmp"
IDB_STYLE_CLASSIC2150 BITMAP "style_vista150.bmp"
IDB_STYLE_WIN7150 BITMAP "style_7150.bmp"
/////////////////////////////////////////////////////////////////////////////
//
// IMAGE
//
IDB_STYLE_CLASSIC1 IMAGE "style_classic.png"
IDB_STYLE_CLASSIC2 IMAGE "style_vista.png"
IDB_STYLE_WIN7 IMAGE "style_7.png"
IDB_STYLE_CLASSIC1150 IMAGE "style_classic150.png"
IDB_STYLE_CLASSIC2150 IMAGE "style_vista150.png"
IDB_STYLE_WIN7150 IMAGE "style_7150.png"
IDB_BUTTON96 IMAGE "button96.png"
IDB_BUTTON120 IMAGE "button120.png"
IDB_BUTTON144 IMAGE "button144.png"

View File

@@ -30,46 +30,46 @@
<ProjectGuid>{85DEECBB-1F9B-4983-9D54-3BF42182B7E7}</ProjectGuid>
<RootNamespace>StartMenuDLL</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</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>
<PlatformToolset>v142</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>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Setup|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</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>
<PlatformToolset>v142</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>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
@@ -136,7 +136,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CLASSICSTARTMENUDLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -161,7 +160,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CLASSICSTARTMENUDLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -0,0 +1,434 @@
// Modern settings helper
// - parse modern settings definitions from %windir%\ImmersiveControlPanel\Settings\AllSystemSettings_{253E530E-387D-4BC2-959D-E6F86122E5F2}.xml
// - store cached data (parsed settings, localized strings) in %LOCALAPPDATA%\OpenShell\ModernSettings.dat
// - provide mapped view over cached data
#include "stdafx.h"
#include "ModernSettings.h"
#include "ResourceHelper.h"
#include <Shlobj.h>
#include <Shlwapi.h>
#include <functional>
#include <iterator>
#include <mutex>
enum class Id : uint32_t
{
Header = 'SMSO',
Undef = 0,
Blob,
FileName,
DeepLink,
Icon,
Glyph,
PageId,
HostId,
GroupId,
SettingId,
Description,
Keywords,
};
#pragma pack(1)
struct FileHdr
{
uint32_t openShellVersion = GetVersionEx(g_Instance);
uint32_t windowsVersion = GetVersionEx(GetModuleHandle(L"user32.dll"));
uint32_t userLanguageId = GetUserDefaultUILanguage();
bool operator==(const FileHdr& other) const
{
return (windowsVersion == other.windowsVersion) &&
(openShellVersion == other.openShellVersion) &&
(userLanguageId == other.userLanguageId);
}
};
struct ItemHdr
{
Id id;
uint32_t size;
const uint8_t* data() const
{
return (const uint8_t*)this + sizeof(*this);
}
const ItemHdr* next() const
{
return (const ItemHdr*)(data() + size);
}
std::wstring_view asString() const
{
std::wstring_view retval((const wchar_t*)data(), size / sizeof(wchar_t));
if (!retval.empty() && retval.back() == 0)
{
retval.remove_suffix(1);
return retval;
}
return {};
}
};
#pragma pack()
class AttributeWriter
{
public:
std::vector<uint8_t> buffer()
{
return std::move(m_buffer);
}
void addBlob(Id id, const void* data, size_t size)
{
ItemHdr hdr{ id, (uint32_t)size };
append(&hdr, sizeof(hdr));
append(data, size);
}
void addString(Id id, const std::wstring& str)
{
if (!str.empty())
addBlob(id, str.data(), (str.size() + 1) * sizeof(str[0]));
}
private:
void append(const void* data, size_t size)
{
m_buffer.insert(m_buffer.end(), (const uint8_t*)data, (const uint8_t*)data + size);
}
std::vector<uint8_t> m_buffer;
};
static void ProcessAttributes(const void* buffer, size_t size, std::function<void(const ItemHdr&)> callback)
{
if (size < sizeof(ItemHdr))
return;
auto item = (const ItemHdr*)buffer;
auto last = (const ItemHdr*)((const uint8_t*)buffer + size);
while (item < last)
{
auto next = item->next();
if (next <= item || next > last)
break;
callback(*item);
item = next;
}
}
///
static std::wstring TranslateIndirectString(const WCHAR* string)
{
std::wstring retval;
retval.resize(1024);
if (SUCCEEDED(::SHLoadIndirectString(string, retval.data(), (UINT)retval.size(), nullptr)))
{
retval.resize(wcslen(retval.data()));
return retval;
}
return {};
}
static std::wstring TranslateIndirectMultiString(const WCHAR* string)
{
std::wstring retval;
std::wstring_view str(string);
// remove '@'
str.remove_prefix(1);
while (!str.empty())
{
auto len = str.find(L'@', 1);
if (len == std::wstring::npos)
len = str.length();
std::wstring tmp(str.substr(0, len));
retval += TranslateIndirectString(tmp.c_str());
str.remove_prefix(len);
}
return retval;
}
static std::wstring GetTranslatedString(CComPtr<IXMLDOMNode>& parent, const WCHAR* name)
{
CComPtr<IXMLDOMNode> node;
if (parent->selectSingleNode(CComBSTR(name), &node) == S_OK)
{
CComBSTR value;
if (node->get_text(&value) == S_OK)
{
if (value[0] == L'@')
{
if (value[1] == L'@')
return TranslateIndirectMultiString(value);
else
return TranslateIndirectString(value);
}
else
{
return (LPWSTR)value;
}
}
}
return {};
}
static void ParseFileName(CComPtr<IXMLDOMNode>& parent, AttributeWriter& writer)
{
writer.addString(Id::FileName, GetTranslatedString(parent, L"Filename"));
}
static void ParseApplicationInformation(CComPtr<IXMLDOMNode>& parent, AttributeWriter& writer)
{
CComPtr<IXMLDOMNode> node;
if (parent->selectSingleNode(CComBSTR(L"ApplicationInformation"), &node) == S_OK)
{
writer.addString(Id::DeepLink, GetTranslatedString(node, L"DeepLink"));
writer.addString(Id::Icon, GetTranslatedString(node, L"Icon"));
writer.addString(Id::Glyph, GetTranslatedString(node, L"Glyph"));
}
}
static void ParseSettingIdentity(CComPtr<IXMLDOMNode>& parent, AttributeWriter& writer)
{
CComPtr<IXMLDOMNode> node;
if (parent->selectSingleNode(CComBSTR(L"SettingIdentity"), &node) == S_OK)
{
writer.addString(Id::PageId, GetTranslatedString(node, L"PageID"));
writer.addString(Id::HostId, GetTranslatedString(node, L"HostID"));
writer.addString(Id::GroupId, GetTranslatedString(node, L"GroupID"));
writer.addString(Id::SettingId, GetTranslatedString(node, L"SettingID"));
}
}
static void ParseSettingInformation(CComPtr<IXMLDOMNode>& parent, AttributeWriter& writer)
{
CComPtr<IXMLDOMNode> node;
if (parent->selectSingleNode(CComBSTR(L"SettingInformation"), &node) == S_OK)
{
auto description = GetTranslatedString(node, L"Description");
if (description.empty())
description = GetTranslatedString(node, L"Name");
writer.addString(Id::Description, description);
auto keywords = GetTranslatedString(node, L"HighKeywords");
keywords += GetTranslatedString(node, L"LowKeywords");
keywords += GetTranslatedString(node, L"Keywords");
writer.addString(Id::Keywords, keywords);
}
}
static std::vector<uint8_t> ParseSetting(CComPtr<IXMLDOMNode>& parent)
{
AttributeWriter writer;
ParseFileName(parent, writer);
ParseApplicationInformation(parent, writer);
ParseSettingIdentity(parent, writer);
ParseSettingInformation(parent, writer);
return writer.buffer();
}
static std::vector<uint8_t> ParseModernSettings()
{
AttributeWriter writer;
CComPtr<IXMLDOMDocument> doc;
if (SUCCEEDED(doc.CoCreateInstance(L"Msxml2.FreeThreadedDOMDocument")))
{
doc->put_async(VARIANT_FALSE);
wchar_t path[MAX_PATH]{};
wcscpy_s(path, LR"(%windir%\ImmersiveControlPanel\Settings\AllSystemSettings_{253E530E-387D-4BC2-959D-E6F86122E5F2}.xml)");
DoEnvironmentSubst(path, _countof(path));
VARIANT_BOOL loaded;
if (SUCCEEDED(doc->load(CComVariant(path), &loaded)) && loaded)
{
CComPtr<IXMLDOMNode> root;
if (doc->selectSingleNode(CComBSTR(L"PCSettings"), &root) == S_OK)
{
FileHdr hdr{};
writer.addBlob(Id::Header, &hdr, sizeof(hdr));
CComPtr<IXMLDOMNode> node;
root->get_firstChild(&node);
while (node)
{
auto buffer = ParseSetting(node);
if (!buffer.empty())
writer.addBlob(Id::Blob, buffer.data(), buffer.size());
CComPtr<IXMLDOMNode> next;
if (FAILED(node->get_nextSibling(&next)))
break;
node = next;
}
}
}
}
return writer.buffer();
}
ModernSettings::ModernSettings(const wchar_t* fname) : m_storage(fname)
{
if (m_storage)
{
bool valid = false;
auto s = m_storage.get();
ProcessAttributes(s.data, s.size, [&](const ItemHdr& item) {
switch (item.id)
{
case Id::Header:
if (item.size >= sizeof(FileHdr))
{
const auto hdr = (const FileHdr*)item.data();
if (FileHdr() == *hdr)
valid = true;
}
break;
case Id::Blob:
if (valid)
{
const Blob blob = { item.data(), item.size };
ModernSettings::Setting s(blob);
if (s)
m_settings.emplace(s.fileName, blob);
}
break;
}
});
}
}
ModernSettings::Setting::Setting(const Blob& blob)
{
ProcessAttributes(blob.data, blob.size, [&](const ItemHdr& item) {
switch (item.id)
{
case Id::FileName:
fileName = item.asString();
break;
case Id::DeepLink:
deepLink = item.asString();
break;
case Id::Glyph:
glyph = item.asString();
break;
case Id::Icon:
icon = item.asString();
break;
case Id::PageId:
pageId = item.asString();
break;
case Id::HostId:
hostId = item.asString();
break;
case Id::GroupId:
groupId = item.asString();
break;
case Id::SettingId:
settingId = item.asString();
break;
case Id::Description:
description = item.asString();;
break;
case Id::Keywords:
keywords = item.asString();
break;
}
});
}
std::vector<std::wstring_view> ModernSettings::enumerate() const
{
std::vector<std::wstring_view> retval;
retval.reserve(m_settings.size());
for (const auto& i : m_settings)
retval.emplace_back(i.first);
return retval;
}
ModernSettings::Setting ModernSettings::get(const std::wstring_view& name) const
{
auto it = m_settings.find(name);
if (it != m_settings.end())
return { (*it).second };
return {};
}
static std::mutex s_lock;
static std::shared_ptr<ModernSettings> s_settings;
std::wstring GetLocalAppData()
{
WCHAR path[MAX_PATH]{};
wcscpy_s(path, L"%LOCALAPPDATA%\\OpenShell");
DoEnvironmentSubst(path, _countof(path));
// make sure directory exists
SHCreateDirectory(nullptr, path);
return { path };
}
std::shared_ptr<ModernSettings> GetModernSettings()
{
std::unique_lock l(s_lock);
if (!s_settings)
{
auto path = GetLocalAppData();
path += L"\\ModernSettings.dat";
// try to open cached settings
s_settings = std::make_shared<ModernSettings>(path.c_str());
if (s_settings->size() == 0)
{
// file doesn't exist or wrong format
s_settings.reset();
// re-parse settings
auto buffer = ParseModernSettings();
if (!buffer.empty())
{
// store to file
{
File f(path.c_str(), GENERIC_WRITE, 0, CREATE_ALWAYS);
if (f)
{
DWORD written;
::WriteFile(f, buffer.data(), (DWORD)buffer.size(), &written, nullptr);
}
}
// and try again
s_settings = std::make_shared<ModernSettings>(path.c_str());
}
}
}
return s_settings;
}

View File

@@ -0,0 +1,139 @@
// Modern settings helper
#pragma once
#include <functional>
#include <map>
#include <string>
#include <vector>
struct Blob
{
const void* data = nullptr;
size_t size = 0;
};
class File
{
public:
File(const WCHAR* fileName, DWORD desiredAccess, DWORD shareMode, DWORD creationDisposition = OPEN_EXISTING, DWORD flagsAndAttributes = FILE_ATTRIBUTE_NORMAL)
{
m_handle = ::CreateFile(fileName, desiredAccess, shareMode, nullptr, creationDisposition, flagsAndAttributes, nullptr);
}
~File()
{
if (m_handle != INVALID_HANDLE_VALUE)
::CloseHandle(m_handle);
}
File(const File&) = delete;
File& operator=(const File&) = delete;
explicit operator bool() const
{
return (m_handle != INVALID_HANDLE_VALUE);
}
operator HANDLE() const
{
return m_handle;
}
uint64_t size() const
{
LARGE_INTEGER li = {};
return ::GetFileSizeEx(m_handle, &li) ? li.QuadPart : (uint64_t)-1;
}
private:
HANDLE m_handle;
};
class MappedFile
{
public:
MappedFile(const WCHAR* fileName) : m_file(fileName, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_DELETE)
{
if (m_file)
{
auto mapping = ::CreateFileMapping(m_file, nullptr, PAGE_READONLY, 0, 0, nullptr);
if (mapping)
{
m_view.data = ::MapViewOfFile(mapping, FILE_MAP_READ, 0, 0, 0);
if (m_view.data)
m_view.size = (size_t)m_file.size();
::CloseHandle(mapping);
}
}
}
~MappedFile()
{
if (m_view.data)
::UnmapViewOfFile(m_view.data);
}
MappedFile(const MappedFile&) = delete;
MappedFile& operator=(const MappedFile&) = delete;
explicit operator bool() const
{
return (m_view.data != nullptr);
}
Blob get() const
{
return m_view;
}
private:
File m_file;
Blob m_view;
};
class ModernSettings
{
public:
ModernSettings(const wchar_t* fname);
size_t size() const
{
return m_settings.size();
}
struct Setting
{
std::wstring_view fileName;
std::wstring_view deepLink;
std::wstring_view icon;
std::wstring_view glyph;
std::wstring_view pageId;
std::wstring_view hostId;
std::wstring_view groupId;
std::wstring_view settingId;
std::wstring_view description;
std::wstring_view keywords;
Setting() = default;
Setting(const Blob& blob);
explicit operator bool() const
{
return !fileName.empty();
}
};
std::vector<std::wstring_view> enumerate() const;
Setting get(const std::wstring_view& name) const;
private:
MappedFile m_storage;
std::map<std::wstring_view, Blob> m_settings;
};
// retrieve actual instance of ModernSettings
std::shared_ptr<ModernSettings> GetModernSettings();

View File

@@ -0,0 +1,211 @@
// Context menu handler for Open-Shell Modern Settings shell folder
// Based on Explorer Data Provider Sample (https://docs.microsoft.com/en-us/windows/win32/shell/samples-explorerdataprovider)
#include "stdafx.h"
#include "ModernSettings.h"
#include "ModernSettingsContextMenu.h"
#include "ComHelper.h"
#define MENUVERB_OPEN 0
struct ICIVERBTOIDMAP
{
LPCWSTR pszCmd; // verbW
LPCSTR pszCmdA; // verbA
UINT idCmd; // hmenu id
};
static const ICIVERBTOIDMAP g_ContextMenuIDMap[] =
{
{ L"open", "open", MENUVERB_OPEN },
{ NULL, NULL, (UINT)-1 }
};
HRESULT _MapICIVerbToCmdID(LPCMINVOKECOMMANDINFO pici, UINT* pid)
{
if (IS_INTRESOURCE(pici->lpVerb))
{
*pid = LOWORD((UINT_PTR)pici->lpVerb);
return S_OK;
}
if (pici->fMask & CMIC_MASK_UNICODE)
{
for (const auto& i : g_ContextMenuIDMap)
{
if (StrCmpIC(((LPCMINVOKECOMMANDINFOEX)pici)->lpVerbW, i.pszCmd) == 0)
{
*pid = i.idCmd;
return S_OK;
}
}
}
else
{
for (const auto& i : g_ContextMenuIDMap)
{
if (StrCmpICA(pici->lpVerb, i.pszCmdA) == 0)
{
*pid = i.idCmd;
return S_OK;
}
}
}
return E_FAIL;
}
static bool ActivateModernSettingPage(const WCHAR* page)
{
CComPtr<IApplicationActivationManager> mgr;
mgr.CoCreateInstance(CLSID_ApplicationActivationManager);
if (mgr)
{
DWORD pid = 0;
return SUCCEEDED(mgr->ActivateApplication(L"windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel", page, AO_NONE, &pid));
}
return false;
}
extern ModernSettings::Setting GetModernSetting(LPCITEMIDLIST pidl);
static HRESULT Execute(const wchar_t* cmd)
{
return (intptr_t)::ShellExecute(nullptr, L"open", cmd, nullptr, nullptr, SW_SHOWNORMAL) > 32 ? S_OK : E_FAIL;
}
static HRESULT OpenItemByPidl(LPCITEMIDLIST pidl)
{
auto child = ILFindLastID(pidl);
auto setting = GetModernSetting(child);
if (!setting)
return E_INVALIDARG;
if (setting.hostId == L"{6E6DDBCB-9C89-434B-A994-D5F22239523B}")
{
if (setting.deepLink.empty())
return E_INVALIDARG;
std::wstring cmd(L"windowsdefender://");
cmd += setting.deepLink;
return Execute(cmd.c_str());
}
if (setting.hostId == L"{7E0522FC-1AC4-41CA-AFD0-3610417A9C41}")
{
if (setting.pageId.empty())
return E_INVALIDARG;
std::wstring cmd(L"shell:::");
cmd += setting.pageId;
return Execute(cmd.c_str());
}
if (setting.hostId == L"{12B1697E-D3A0-4DBC-B568-CCF64A3F934D}")
{
if (setting.deepLink.empty())
return E_INVALIDARG;
std::wstring cmd(setting.deepLink);
if (cmd.compare(0, 8, L"shell:::") == 0)
return Execute(cmd.c_str());
cmd.resize(MAX_PATH);
DoEnvironmentSubst(cmd.data(), (UINT)cmd.size());
STARTUPINFO startupInfo = { sizeof(startupInfo) };
PROCESS_INFORMATION processInfo{};
if (!CreateProcess(nullptr, cmd.data(), nullptr, nullptr, FALSE, 0, nullptr, nullptr, &startupInfo, &processInfo))
return E_FAIL;
CloseHandle(processInfo.hThread);
CloseHandle(processInfo.hProcess);
return S_OK;
}
if (setting.pageId.empty())
return E_INVALIDARG;
std::wstring page;
page += L"page=";
page += setting.pageId;
if (!setting.settingId.empty())
{
page += L"&target=";
page += setting.settingId;
}
else if (!setting.groupId.empty())
{
page += L"&group=";
page += setting.groupId;
}
page += L"&ActivationType=Search";
ActivateModernSettingPage(page.c_str());
return S_OK;
}
// CModernSettingsContextMenu
HRESULT CModernSettingsContextMenu::QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT /* idCmdLast */, UINT /* uFlags */)
{
InsertMenu(hmenu, indexMenu++, MF_BYPOSITION, idCmdFirst + MENUVERB_OPEN, L"Open");
// other verbs could go here...
// indicate that we added one verb.
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, (USHORT)(1));
}
HRESULT CModernSettingsContextMenu::InvokeCommand(LPCMINVOKECOMMANDINFO pici)
{
HRESULT hr = E_INVALIDARG;
UINT uID;
// Is this command for us?
if (SUCCEEDED(_MapICIVerbToCmdID(pici, &uID)))
{
if (uID == MENUVERB_OPEN && m_pdtobj)
{
CAbsolutePidl pidl;
hr = SHGetIDListFromObject(m_pdtobj, &pidl);
if (SUCCEEDED(hr))
hr = OpenItemByPidl(pidl);
}
}
return hr;
}
HRESULT CModernSettingsContextMenu::GetCommandString(UINT_PTR /* idCmd */, UINT /* uType */, UINT* /* pRes */, LPSTR /* pszName */, UINT /* cchMax */)
{
return E_NOTIMPL;
}
HRESULT CModernSettingsContextMenu::Initialize(PCIDLIST_ABSOLUTE /* pidlFolder */, IDataObject* pdtobj, HKEY /* hkeyProgID */)
{
m_pdtobj = pdtobj;
return S_OK;
}
HRESULT CModernSettingsContextMenu::SetSite(IUnknown* punkSite)
{
m_punkSite = punkSite;
return S_OK;
}
HRESULT CModernSettingsContextMenu::GetSite(REFIID riid, void** ppvSite)
{
return m_punkSite ? m_punkSite->QueryInterface(riid, ppvSite) : E_FAIL;
}

View File

@@ -0,0 +1,60 @@
// Context menu handler for Open-Shell Modern Settings shell folder
#pragma once
#include "resource.h"
#include "StartMenuHelper_i.h"
#include <shlobj.h>
// CModernSettingsContextMenu
class ATL_NO_VTABLE CModernSettingsContextMenu :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CModernSettingsContextMenu, &CLSID_ModernSettingsContextMenu>,
public IContextMenu,
public IShellExtInit,
public IObjectWithSite
{
public:
CModernSettingsContextMenu()
{
}
DECLARE_REGISTRY_RESOURCEID(IDR_MODERNSETTINGSCONTEXTMENU)
DECLARE_NOT_AGGREGATABLE(CModernSettingsContextMenu)
BEGIN_COM_MAP(CModernSettingsContextMenu)
COM_INTERFACE_ENTRY(IContextMenu)
COM_INTERFACE_ENTRY(IShellExtInit)
COM_INTERFACE_ENTRY(IObjectWithSite)
END_COM_MAP()
DECLARE_PROTECT_FINAL_CONSTRUCT()
HRESULT FinalConstruct()
{
return S_OK;
}
void FinalRelease()
{
}
// IContextMenu
IFACEMETHODIMP QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);
IFACEMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO lpici);
IFACEMETHODIMP GetCommandString(UINT_PTR idCmd, UINT uType, UINT* pRes, LPSTR pszName, UINT cchMax);
// IShellExtInit
IFACEMETHODIMP Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject* pdtobj, HKEY hkeyProgID);
// IObjectWithSite
IFACEMETHODIMP SetSite(IUnknown* punkSite);
IFACEMETHODIMP GetSite(REFIID riid, void** ppvSite);
private:
CComPtr<IDataObject> m_pdtobj;
CComPtr<IUnknown> m_punkSite;
};
OBJECT_ENTRY_AUTO(__uuidof(ModernSettingsContextMenu), CModernSettingsContextMenu)

View File

@@ -0,0 +1,19 @@
HKCR
{
NoRemove CLSID
{
ForceRemove {5ab14324-c087-42c1-b905-a0bfdb4e9532} = s 'Open-Shell Modern Settings Context Menu'
{
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
}
ShellEx
{
MayChangeDefaultMenu = s ''
{
}
}
}
}
}

View File

@@ -0,0 +1,593 @@
// Open-Shell Modern Settings shell folder
// Provides folder that contains all modern settings
//
// To open the folder press Win+R and type:
// shell:::{82E749ED-B971-4550-BAF7-06AA2BF7E836}
// Based on Explorer Data Provider Sample (https://docs.microsoft.com/en-us/windows/win32/shell/samples-explorerdataprovider)
#include "stdafx.h"
#include "ModernSettings.h"
#include "ModernSettingsShellFolder.h"
#include <propkey.h>
#include <strsafe.h>
#include <Uxtheme.h>
struct ColumnDescription
{
const wchar_t* name;
PROPERTYKEY key;
};
static const ColumnDescription g_columnDescriptions[] =
{
{L"Name", PKEY_ItemNameDisplay},
{L"Keywords", PKEY_Keywords},
{L"Filename", PKEY_FileName},
};
#define MAGIC 'SMSO'
#pragma pack(1)
struct FVITEMID
{
USHORT cb;
DWORD magic;
WORD size;
wchar_t data[1];
};
#pragma pack()
static const FVITEMID* PidlToItem(LPCITEMIDLIST pidl)
{
if (pidl)
{
auto item = (const FVITEMID*)pidl;
if (item->cb && item->magic == MAGIC)
return item;
}
return nullptr;
}
ModernSettings::Setting GetModernSetting(LPCITEMIDLIST pidl)
{
auto item = PidlToItem(pidl);
if (item)
{
auto settings = GetModernSettings();
if (settings)
return settings->get({ item->data, item->size / sizeof(wchar_t) });
}
return {};
}
STDAPI StringToStrRet(PCWSTR pszName, STRRET* pStrRet)
{
pStrRet->uType = STRRET_WSTR;
return SHStrDup(pszName, &pStrRet->pOleStr);
}
// CModernSettingsShellFolderEnumIDList
class ATL_NO_VTABLE CModernSettingsShellFolderEnumIDList :
public CComObjectRoot,
public IEnumIDList
{
public:
BEGIN_COM_MAP(CModernSettingsShellFolderEnumIDList)
COM_INTERFACE_ENTRY(IEnumIDList)
END_COM_MAP()
// IEnumIDList
IFACEMETHODIMP Next(ULONG celt, PITEMID_CHILD* rgelt, ULONG* pceltFetched)
{
ULONG celtFetched = 0;
HRESULT hr = (pceltFetched || celt <= 1) ? S_OK : E_INVALIDARG;
if (SUCCEEDED(hr))
{
ULONG i = 0;
while (SUCCEEDED(hr) && i < celt && m_item < m_items.size())
{
hr = m_parent->CreateChildID(m_items[m_item], &rgelt[i]);
if (SUCCEEDED(hr))
{
celtFetched++;
i++;
}
m_item++;
}
}
if (pceltFetched)
*pceltFetched = celtFetched;
return (celtFetched == celt) ? S_OK : S_FALSE;
}
IFACEMETHODIMP Skip(DWORD celt)
{
m_item += celt;
return S_OK;
}
IFACEMETHODIMP Reset()
{
m_item = 0;
return S_OK;
}
IFACEMETHODIMP Clone(IEnumIDList** ppenum)
{
// this method is rarely used and it's acceptable to not implement it.
*ppenum = NULL;
return E_NOTIMPL;
}
void Initialize(CModernSettingsShellFolder* parent)
{
m_parent = parent;
m_settings = GetModernSettings();
if (m_settings)
m_items = m_settings->enumerate();
}
private:
CComPtr<CModernSettingsShellFolder> m_parent;
std::shared_ptr<ModernSettings> m_settings;
std::vector<std::wstring_view> m_items;
DWORD m_item = 0;
};
// Extract icon
static void BitmapDataToStraightAlpha(void* bits, UINT width, UINT height)
{
RGBQUAD* data = (RGBQUAD*)bits;
for (UINT y = 0; y < height; y++)
{
for (UINT x = 0; x < width; x++)
{
auto alpha = data->rgbReserved;
if (alpha)
{
data->rgbBlue = (BYTE)((DWORD)data->rgbBlue * 255 / alpha);
data->rgbGreen = (BYTE)((DWORD)data->rgbGreen * 255 / alpha);
data->rgbRed = (BYTE)((DWORD)data->rgbRed * 255 / alpha);
}
data++;
}
}
}
HICON IconFromGlyph(UINT glyph, UINT size)
{
ICONINFO info{};
info.fIcon = TRUE;
info.hbmMask = CreateBitmap(size, size, 1, 1, nullptr);
BITMAPINFO bi{};
bi.bmiHeader.biSize = sizeof(bi.bmiHeader);
bi.bmiHeader.biWidth = size;
bi.bmiHeader.biHeight = -((LONG)size);
bi.bmiHeader.biPlanes = 1;
bi.bmiHeader.biBitCount = 32;
void* bits = nullptr;
info.hbmColor = CreateDIBSection(nullptr, &bi, 0, &bits, nullptr, 0);
HDC dc = CreateCompatibleDC(nullptr);
SelectObject(dc, info.hbmColor);
HFONT font = CreateFontW(size, 0, 0, 0, 400, 0, 0, 0, 1, 0, 0, 0, 0, L"Segoe MDL2 Assets");
SelectObject(dc, font);
RECT rc{};
rc.right = size;
rc.bottom = size;
auto theme = OpenThemeData(nullptr, L"CompositedWindow::Window");
DTTOPTS opts{};
opts.dwSize = sizeof(opts);
opts.dwFlags = DTT_TEXTCOLOR | DTT_COMPOSITED;
opts.crText = 0x00FFFFFF;
DrawThemeTextEx(theme, dc, 0, 0, (LPCWSTR)&glyph, 1, DT_CENTER | DT_VCENTER | DT_SINGLELINE, &rc, &opts);
CloseThemeData(theme);
DeleteObject(font);
DeleteDC(dc);
BitmapDataToStraightAlpha(bits, size, size);
HICON retval = CreateIconIndirect(&info);
DeleteObject(info.hbmColor);
DeleteObject(info.hbmMask);
return retval;
}
class ATL_NO_VTABLE GlyphExtractIcon :
public CComObjectRoot,
public IExtractIconW
{
public:
BEGIN_COM_MAP(GlyphExtractIcon)
COM_INTERFACE_ENTRY(IExtractIconW)
END_COM_MAP()
void SetGlyph(USHORT glyph)
{
m_glyph = glyph;
}
// IExtractIconW methods
IFACEMETHODIMP GetIconLocation(UINT uFlags, _Out_writes_(cchMax) PWSTR pszIconFile, UINT cchMax, _Out_ int* piIndex, _Out_ UINT* pwFlags)
{
StringCchCopy(pszIconFile, cchMax, L"OpenShell-ModernSettingIcon");
*piIndex = m_glyph;
*pwFlags = GIL_NOTFILENAME;
return S_OK;
}
IFACEMETHODIMP Extract(_In_ PCWSTR pszFile, UINT nIconIndex, _Out_opt_ HICON* phiconLarge, _Out_opt_ HICON* phiconSmall, UINT nIconSize)
{
if (phiconLarge)
*phiconLarge = IconFromGlyph(nIconIndex, LOWORD(nIconSize));
if (phiconSmall)
*phiconSmall = IconFromGlyph(nIconIndex, HIWORD(nIconSize));
return S_OK;
}
private:
USHORT m_glyph = 0;
};
// CModernSettingsShellFolder
// IShellFolder methods
// Translates a display name into an item identifier list.
HRESULT CModernSettingsShellFolder::ParseDisplayName(HWND hwnd, IBindCtx* pbc, PWSTR pszName, ULONG* pchEaten, PIDLIST_RELATIVE* ppidl, ULONG* pdwAttributes)
{
return E_INVALIDARG;
}
// Allows a client to determine the contents of a folder by
// creating an item identifier enumeration object and returning
// its IEnumIDList interface. The methods supported by that
// interface can then be used to enumerate the folder's contents.
HRESULT CModernSettingsShellFolder::EnumObjects(HWND /* hwnd */, DWORD grfFlags, IEnumIDList** ppenumIDList)
{
CComObject<CModernSettingsShellFolderEnumIDList>* enumIdList;
auto hr = CComObject<CModernSettingsShellFolderEnumIDList>::CreateInstance(&enumIdList);
if (SUCCEEDED(hr))
{
enumIdList->Initialize(this);
hr = enumIdList->QueryInterface(IID_PPV_ARGS(ppenumIDList));
}
return hr;
}
// Factory for handlers for the specified item.
HRESULT CModernSettingsShellFolder::BindToObject(PCUIDLIST_RELATIVE pidl, IBindCtx* pbc, REFIID riid, void** ppv)
{
return E_NOINTERFACE;
}
HRESULT CModernSettingsShellFolder::BindToStorage(PCUIDLIST_RELATIVE pidl, IBindCtx* pbc, REFIID riid, void** ppv)
{
return BindToObject(pidl, pbc, riid, ppv);
}
// Called to determine the equivalence and/or sort order of two idlists.
HRESULT CModernSettingsShellFolder::CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
{
UINT column = LOWORD(lParam);
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, (USHORT)(StrCmp(GetColumnDisplayName(pidl1, column).data(), GetColumnDisplayName(pidl2, column).data())));
}
// Called by the Shell to create the View Object and return it.
HRESULT CModernSettingsShellFolder::CreateViewObject(HWND hwnd, REFIID riid, void** ppv)
{
HRESULT hr = E_NOINTERFACE;
*ppv = NULL;
if (riid == IID_IShellView)
{
SFV_CREATE csfv = { sizeof(csfv), 0 };
hr = QueryInterface(IID_PPV_ARGS(&csfv.pshf));
if (SUCCEEDED(hr))
{
hr = SHCreateShellFolderView(&csfv, (IShellView**)ppv);
csfv.pshf->Release();
}
}
return hr;
}
// Retrieves the attributes of one or more file objects or subfolders.
HRESULT CModernSettingsShellFolder::GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, ULONG* rgfInOut)
{
*rgfInOut &= SFGAO_CANLINK;
return S_OK;
}
// Retrieves an OLE interface that can be used to carry out
// actions on the specified file objects or folders.
HRESULT CModernSettingsShellFolder::GetUIObjectOf(HWND hwnd, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT* /* prgfInOut */, void** ppv)
{
HRESULT hr = E_NOINTERFACE;
*ppv = nullptr;
if (riid == IID_IContextMenu)
{
// The default context menu will call back for IQueryAssociations to determine the
// file associations with which to populate the menu.
const DEFCONTEXTMENU dcm = { hwnd, nullptr, m_pidl, static_cast<IShellFolder2*>(this), cidl, apidl, nullptr, 0, nullptr };
hr = SHCreateDefaultContextMenu(&dcm, riid, ppv);
}
else if (riid == IID_IExtractIconW)
{
hr = E_INVALIDARG;
auto s = GetModernSetting(*apidl);
if (s)
{
if (!s.icon.empty())
{
CComPtr<IDefaultExtractIconInit> pdxi;
hr = SHCreateDefaultExtractIcon(IID_PPV_ARGS(&pdxi));
if (SUCCEEDED(hr))
{
WCHAR icon_path[MAX_PATH];
StringCchCopy(icon_path, _countof(icon_path), s.icon.data());
auto location = PathParseIconLocation(icon_path);
hr = pdxi->SetNormalIcon(icon_path, location);
if (SUCCEEDED(hr))
hr = pdxi->QueryInterface(riid, ppv);
}
}
else
{
auto glyph = !s.glyph.empty() ? s.glyph.front() : 0xe115;
CComObject<GlyphExtractIcon>* extract;
hr = CComObject<GlyphExtractIcon>::CreateInstance(&extract);
if (SUCCEEDED(hr))
{
extract->SetGlyph(glyph);
hr = extract->QueryInterface(riid, ppv);
}
}
}
}
else if (riid == IID_IDataObject)
{
hr = SHCreateDataObject(m_pidl, cidl, apidl, nullptr, riid, ppv);
}
else if (riid == IID_IQueryAssociations)
{
WCHAR szFolderViewImplClassID[64];
hr = StringFromGUID2(CLSID_ModernSettingsShellFolder, szFolderViewImplClassID, ARRAYSIZE(szFolderViewImplClassID));
if (SUCCEEDED(hr))
{
const ASSOCIATIONELEMENT assocItem = { ASSOCCLASS_CLSID_STR, nullptr, szFolderViewImplClassID };
hr = AssocCreateForClasses(&assocItem, 1, riid, ppv);
}
}
return hr;
}
// Retrieves the display name for the specified file object or subfolder.
HRESULT CModernSettingsShellFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl, SHGDNF shgdnFlags, STRRET* pName)
{
auto setting = GetModernSetting(pidl);
if (!setting)
return E_INVALIDARG;
HRESULT hr = S_OK;
if (shgdnFlags & SHGDN_FORPARSING)
{
if (shgdnFlags & SHGDN_INFOLDER)
{
// This form of the display name needs to be handled by ParseDisplayName.
hr = StringToStrRet(setting.fileName.data(), pName);
}
else
{
WCHAR szDisplayName[MAX_PATH];
CComString pszThisFolder;
hr = SHGetNameFromIDList(m_pidl, (shgdnFlags & SHGDN_FORADDRESSBAR) ? SIGDN_DESKTOPABSOLUTEEDITING : SIGDN_DESKTOPABSOLUTEPARSING, &pszThisFolder);
if (SUCCEEDED(hr))
{
StringCchCopy(szDisplayName, ARRAYSIZE(szDisplayName), pszThisFolder);
StringCchCat(szDisplayName, ARRAYSIZE(szDisplayName), L"\\");
StringCchCat(szDisplayName, ARRAYSIZE(szDisplayName), setting.fileName.data());
hr = StringToStrRet(szDisplayName, pName);
}
}
}
else
{
hr = StringToStrRet(setting.description.data(), pName);
}
return hr;
}
// Sets the display name of a file object or subfolder, changing the item identifier in the process.
HRESULT CModernSettingsShellFolder::SetNameOf(HWND /* hwnd */, PCUITEMID_CHILD /* pidl */, PCWSTR /* pszName */, DWORD /* uFlags */, PITEMID_CHILD* ppidlOut)
{
*ppidlOut = NULL;
return E_NOTIMPL;
}
// IShellFolder2 methods
// Requests the GUID of the default search object for the folder.
HRESULT CModernSettingsShellFolder::GetDefaultSearchGUID(GUID* /* pguid */)
{
return E_NOTIMPL;
}
HRESULT CModernSettingsShellFolder::EnumSearches(IEnumExtraSearch** ppEnum)
{
*ppEnum = NULL;
return E_NOINTERFACE;
}
// Retrieves the default sorting and display column (indices from GetDetailsOf).
HRESULT CModernSettingsShellFolder::GetDefaultColumn(DWORD /* dwRes */, ULONG* pSort, ULONG* pDisplay)
{
*pSort = 0;
*pDisplay = 0;
return S_OK;
}
// Retrieves the default state for a specified column.
HRESULT CModernSettingsShellFolder::GetDefaultColumnState(UINT iColumn, SHCOLSTATEF* pcsFlags)
{
if (iColumn < _countof(g_columnDescriptions))
{
*pcsFlags = SHCOLSTATE_ONBYDEFAULT | SHCOLSTATE_TYPE_STR;
return S_OK;
}
return E_INVALIDARG;
}
// Retrieves detailed information, identified by a property set ID (FMTID) and property ID (PID), on an item in a Shell folder.
HRESULT CModernSettingsShellFolder::GetDetailsEx(PCUITEMID_CHILD pidl, const PROPERTYKEY* pkey, VARIANT* pv)
{
for (const auto& desc : g_columnDescriptions)
{
if (IsEqualPropertyKey(*pkey, desc.key))
{
auto str = GetColumnDisplayName(pidl, (UINT)std::distance(g_columnDescriptions, &desc));
pv->vt = VT_BSTR;
pv->bstrVal = SysAllocString(str.data());
return pv->bstrVal ? S_OK : E_OUTOFMEMORY;
}
}
return S_OK;
}
// Retrieves detailed information, identified by a column index, on an item in a Shell folder.
HRESULT CModernSettingsShellFolder::GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS* pDetails)
{
pDetails->cxChar = 24;
if (!pidl)
{
// No item means we're returning information about the column itself.
if (iColumn >= _countof(g_columnDescriptions))
{
// GetDetailsOf is called with increasing column indices until failure.
return E_FAIL;
}
pDetails->fmt = LVCFMT_LEFT;
return StringToStrRet(g_columnDescriptions[iColumn].name, &pDetails->str);
}
auto str = GetColumnDisplayName(pidl, iColumn);
return StringToStrRet(str.data(), &pDetails->str);
}
// Converts a column name to the appropriate property set ID (FMTID) and property ID (PID).
HRESULT CModernSettingsShellFolder::MapColumnToSCID(UINT iColumn, PROPERTYKEY* pkey)
{
if (iColumn < _countof(g_columnDescriptions))
{
*pkey = g_columnDescriptions[iColumn].key;
return S_OK;
}
return E_FAIL;
}
// IPersist method
HRESULT CModernSettingsShellFolder::GetClassID(CLSID* pClassID)
{
*pClassID = CLSID_ModernSettingsShellFolder;
return S_OK;
}
// IPersistFolder method
HRESULT CModernSettingsShellFolder::Initialize(PCIDLIST_ABSOLUTE pidl)
{
m_pidl = pidl;
return m_pidl ? S_OK : E_FAIL;
}
// IPersistFolder2 methods
// Retrieves the PIDLIST_ABSOLUTE for the folder object.
HRESULT CModernSettingsShellFolder::GetCurFolder(PIDLIST_ABSOLUTE* ppidl)
{
*ppidl = NULL;
HRESULT hr = m_pidl ? S_OK : E_FAIL;
if (SUCCEEDED(hr))
{
*ppidl = ILCloneFull(m_pidl);
hr = *ppidl ? S_OK : E_OUTOFMEMORY;
}
return hr;
}
HRESULT CModernSettingsShellFolder::CreateChildID(const std::wstring_view& fileName, PITEMID_CHILD* ppidl)
{
auto size = fileName.size() * sizeof(wchar_t);
// Sizeof an object plus the next cb plus the characters in the string.
UINT nIDSize = sizeof(FVITEMID) + sizeof(USHORT) + (WORD)size;
// Allocate and zero the memory.
FVITEMID* lpMyObj = (FVITEMID*)CoTaskMemAlloc(nIDSize);
HRESULT hr = lpMyObj ? S_OK : E_OUTOFMEMORY;
if (SUCCEEDED(hr))
{
ZeroMemory(lpMyObj, nIDSize);
lpMyObj->cb = static_cast<short>(nIDSize - sizeof(lpMyObj->cb));
lpMyObj->magic = MAGIC;
lpMyObj->size = (WORD)size;
memcpy(lpMyObj->data, fileName.data(), size);
*ppidl = (PITEMID_CHILD)lpMyObj;
}
return hr;
}
std::wstring_view CModernSettingsShellFolder::GetColumnDisplayName(PCUITEMID_CHILD pidl, UINT iColumn)
{
auto setting = GetModernSetting(pidl);
if (setting)
{
switch (iColumn)
{
case 0:
return setting.description;
case 1:
return setting.keywords;
case 2:
return setting.fileName;
}
}
return {};
}

View File

@@ -0,0 +1,85 @@
// Open-Shell Modern Settings shell folder
// Provides folder that contains all modern settings
#pragma once
#include "resource.h"
#include "ComHelper.h"
#include "StartMenuHelper_i.h"
#include <shlobj.h>
#include <string>
// CModernSettingsShellFolder
class ATL_NO_VTABLE CModernSettingsShellFolder :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CModernSettingsShellFolder, &CLSID_ModernSettingsShellFolder>,
public IShellFolder2,
public IPersistFolder2
{
public:
CModernSettingsShellFolder()
{
}
DECLARE_REGISTRY_RESOURCEID(IDR_MODERNSETTINGSSHELLFOLDER)
DECLARE_NOT_AGGREGATABLE(CModernSettingsShellFolder)
BEGIN_COM_MAP(CModernSettingsShellFolder)
COM_INTERFACE_ENTRY(IShellFolder)
COM_INTERFACE_ENTRY(IShellFolder2)
COM_INTERFACE_ENTRY(IPersist)
COM_INTERFACE_ENTRY(IPersistFolder)
COM_INTERFACE_ENTRY(IPersistFolder2)
END_COM_MAP()
DECLARE_PROTECT_FINAL_CONSTRUCT()
HRESULT FinalConstruct()
{
return S_OK;
}
void FinalRelease()
{
}
// IShellFolder
IFACEMETHODIMP ParseDisplayName(HWND hwnd, IBindCtx* pbc, PWSTR pszName, ULONG* pchEaten, PIDLIST_RELATIVE* ppidl, ULONG* pdwAttributes);
IFACEMETHODIMP EnumObjects(HWND hwnd, DWORD grfFlags, IEnumIDList** ppenumIDList);
IFACEMETHODIMP BindToObject(PCUIDLIST_RELATIVE pidl, IBindCtx* pbc, REFIID riid, void** ppv);
IFACEMETHODIMP BindToStorage(PCUIDLIST_RELATIVE pidl, IBindCtx* pbc, REFIID riid, void** ppv);
IFACEMETHODIMP CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2);
IFACEMETHODIMP CreateViewObject(HWND hwnd, REFIID riid, void** ppv);
IFACEMETHODIMP GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, ULONG* rgfInOut);
IFACEMETHODIMP GetUIObjectOf(HWND hwnd, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT* prgfInOut, void** ppv);
IFACEMETHODIMP GetDisplayNameOf(PCUITEMID_CHILD pidl, SHGDNF shgdnFlags, STRRET* pName);
IFACEMETHODIMP SetNameOf(HWND hwnd, PCUITEMID_CHILD pidl, PCWSTR pszName, DWORD uFlags, PITEMID_CHILD* ppidlOut);
// IShellFolder2
IFACEMETHODIMP GetDefaultSearchGUID(GUID* pGuid);
IFACEMETHODIMP EnumSearches(IEnumExtraSearch** ppenum);
IFACEMETHODIMP GetDefaultColumn(DWORD dwRes, ULONG* pSort, ULONG* pDisplay);
IFACEMETHODIMP GetDefaultColumnState(UINT iColumn, SHCOLSTATEF* pbState);
IFACEMETHODIMP GetDetailsEx(PCUITEMID_CHILD pidl, const PROPERTYKEY* pkey, VARIANT* pv);
IFACEMETHODIMP GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS* pDetails);
IFACEMETHODIMP MapColumnToSCID(UINT iColumn, PROPERTYKEY* pkey);
// IPersist
IFACEMETHODIMP GetClassID(CLSID* pClassID);
// IPersistFolder
IFACEMETHODIMP Initialize(PCIDLIST_ABSOLUTE pidl);
// IPersistFolder2
IFACEMETHODIMP GetCurFolder(PIDLIST_ABSOLUTE* ppidl);
HRESULT CreateChildID(const std::wstring_view& fileName, PITEMID_CHILD* ppidl);
private:
std::wstring_view GetColumnDisplayName(PCUITEMID_CHILD pidl, UINT iColumn);
CAbsolutePidl m_pidl; // where this folder is in the name space
};
OBJECT_ENTRY_AUTO(__uuidof(ModernSettingsShellFolder), CModernSettingsShellFolder)

View File

@@ -0,0 +1,26 @@
HKCR
{
NoRemove CLSID
{
ForceRemove {82e749ed-b971-4550-baf7-06aa2bf7e836} = s 'Open-Shell Modern Settings'
{
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
}
ShellFolder
{
val Attributes = d '&HA0000000'
}
ShellEx
{
ContextMenuHandlers
{
Default = s '{5ab14324-c087-42c1-b905-a0bfdb4e9532}'
{
}
}
}
}
}
}

View File

@@ -25,6 +25,8 @@ const CLSID g_ExplorerClsid= {0xECD4FC4D, 0x521C, 0x11D0, {0xB7, 0x92, 0x00, 0xA
const CLSID g_EmulationClsid= {0xD3214FBB, 0x3CA1, 0x406A, {0xB3, 0xE8, 0x3E, 0xB7, 0xC3, 0x93, 0xA1, 0x5E}};
#define EMULATION_KEY L"TreatAs"
#define SHELLEXT_NAME L"StartMenuExt"
static void AdjustPrivileges( void )
{
HANDLE hToken;
@@ -46,6 +48,18 @@ static void AdjustPrivileges( void )
}
}
static void AddShellExt(const wchar_t* progID, const LPSECURITY_ATTRIBUTES sa)
{
HKEY hkey = NULL;
if (RegCreateKeyEx(HKEY_CLASSES_ROOT, CString(progID) + L"\\ShellEx\\ContextMenuHandlers\\" SHELLEXT_NAME, NULL, NULL, REG_OPTION_BACKUP_RESTORE, KEY_WRITE, sa, &hkey, NULL) == ERROR_SUCCESS)
{
wchar_t val[] = L"{E595F05F-903F-4318-8B0A-7F633B520D2B}";
RegSetValueEx(hkey, NULL, NULL, REG_SZ, (BYTE*)val, sizeof(val));
RegCloseKey(hkey);
}
}
static void AddRegistryKeys( bool bPin )
{
AdjustPrivileges();
@@ -103,21 +117,12 @@ static void AddRegistryKeys( bool bPin )
RegSetValueEx(hkey,NULL,NULL,REG_SZ,(BYTE*)val,sizeof(val));
RegCloseKey(hkey);
}
hkey=NULL;
if (bPin)
{
if (RegCreateKeyEx(HKEY_CLASSES_ROOT,L"Launcher.ImmersiveApplication\\ShellEx\\ContextMenuHandlers\\StartMenuExt",NULL,NULL,REG_OPTION_BACKUP_RESTORE,KEY_WRITE,&sa,&hkey,NULL)==ERROR_SUCCESS)
{
wchar_t val[]=L"{E595F05F-903F-4318-8B0A-7F633B520D2B}";
RegSetValueEx(hkey,NULL,NULL,REG_SZ,(BYTE*)val,sizeof(val));
RegCloseKey(hkey);
}
if (RegCreateKeyEx(HKEY_CLASSES_ROOT,L"Launcher.SystemSettings\\ShellEx\\ContextMenuHandlers\\StartMenuExt",NULL,NULL,REG_OPTION_BACKUP_RESTORE,KEY_WRITE,&sa,&hkey,NULL)==ERROR_SUCCESS)
{
wchar_t val[]=L"{E595F05F-903F-4318-8B0A-7F633B520D2B}";
RegSetValueEx(hkey,NULL,NULL,REG_SZ,(BYTE*)val,sizeof(val));
RegCloseKey(hkey);
}
AddShellExt(L"Launcher.ImmersiveApplication", &sa);
AddShellExt(L"Launcher.DesktopPackagedApplication", &sa);
AddShellExt(L"Launcher.SystemSettings", &sa);
}
}
}
@@ -127,6 +132,16 @@ static void AddRegistryKeys( bool bPin )
FreeSid(pAdminSID);
}
static void RemoveShellExt(const wchar_t* progID)
{
HKEY hkey = NULL;
if (RegCreateKeyEx(HKEY_CLASSES_ROOT, CString(progID) + L"\\ShellEx\\ContextMenuHandlers", NULL, NULL, REG_OPTION_BACKUP_RESTORE, KEY_WRITE | DELETE, NULL, &hkey, NULL) == ERROR_SUCCESS)
{
RegDeleteTree(hkey, SHELLEXT_NAME);
RegCloseKey(hkey);
}
}
static void RemoveRegistryKeys( bool bPin )
{
AdjustPrivileges();
@@ -136,19 +151,12 @@ static void RemoveRegistryKeys( bool bPin )
RegDeleteTree(hkey,EMULATION_KEY);
RegCloseKey(hkey);
}
hkey=NULL;
if (bPin)
{
if (RegCreateKeyEx(HKEY_CLASSES_ROOT,L"Launcher.ImmersiveApplication\\ShellEx\\ContextMenuHandlers",NULL,NULL,REG_OPTION_BACKUP_RESTORE,KEY_WRITE|DELETE,NULL,&hkey,NULL)==ERROR_SUCCESS)
{
RegDeleteTree(hkey,L"StartMenuExt");
RegCloseKey(hkey);
}
if (RegCreateKeyEx(HKEY_CLASSES_ROOT,L"Launcher.SystemSettings\\ShellEx\\ContextMenuHandlers",NULL,NULL,REG_OPTION_BACKUP_RESTORE,KEY_WRITE|DELETE,NULL,&hkey,NULL)==ERROR_SUCCESS)
{
RegDeleteTree(hkey,L"StartMenuExt");
RegCloseKey(hkey);
}
RemoveShellExt(L"Launcher.ImmersiveApplication");
RemoveShellExt(L"Launcher.DesktopPackagedApplication");
RemoveShellExt(L"Launcher.SystemSettings");
}
}

View File

@@ -6,6 +6,7 @@
import "oaidl.idl";
import "ocidl.idl";
import "shobjidl.idl";
[
object,
@@ -31,4 +32,21 @@ library StartMenuHelperLib
{
[default] interface IStartMenuExt;
};
[
uuid(82e749ed-b971-4550-baf7-06aa2bf7e836)
]
coclass ModernSettingsShellFolder
{
interface IShellFolder2;
interface IPersistFolder2;
};
[
uuid(5ab14324-c087-42c1-b905-a0bfdb4e9532)
]
coclass ModernSettingsContextMenu
{
interface IContextMenu;
interface IShellExtInit;
interface IObjectWithSite;
};
};

View File

@@ -98,6 +98,8 @@ END
IDR_STARTMENUHELPER REGISTRY "StartMenuHelper.rgs"
IDR_STARTMENUEXT REGISTRY "StartMenuExt.rgs"
IDR_MODERNSETTINGSSHELLFOLDER REGISTRY "ModernSettingsShellFolder.rgs"
IDR_MODERNSETTINGSCONTEXTMENU REGISTRY "ModernSettingsContextMenu.rgs"
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////

View File

@@ -30,46 +30,46 @@
<ProjectGuid>{A42C6159-ACA8-46D1-A0FB-19C398B137D5}</ProjectGuid>
<RootNamespace>StartMenuHelper</RootNamespace>
<Keyword>AtlProj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</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>
<PlatformToolset>v142</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>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Setup|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</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>
<PlatformToolset>v142</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>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
@@ -157,7 +157,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -177,6 +176,7 @@
<ModuleDefinitionFile>.\$(TargetName).def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<PerUserRedirection>true</PerUserRedirection>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -192,7 +192,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -212,6 +211,7 @@
<ModuleDefinitionFile>.\$(TargetName).def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<PerUserRedirection>true</PerUserRedirection>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -248,6 +248,7 @@
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<PerUserRedirection>true</PerUserRedirection>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -283,6 +284,7 @@
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<PerUserRedirection>true</PerUserRedirection>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'">
@@ -356,6 +358,9 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="ModernSettings.cpp" />
<ClCompile Include="ModernSettingsContextMenu.cpp" />
<ClCompile Include="ModernSettingsShellFolder.cpp" />
<ClCompile Include="StartMenuExt.cpp" />
<ClCompile Include="StartMenuHelper.cpp" />
<ClCompile Include="StartMenuHelper_i.c">
@@ -369,6 +374,8 @@
<Midl Include="StartMenuHelper.idl" />
</ItemGroup>
<ItemGroup>
<None Include="ModernSettingsContextMenu.rgs" />
<None Include="ModernSettingsShellFolder.rgs" />
<None Include="StartMenuExt.rgs" />
<None Include="StartMenuHelper.rgs" />
<None Include="StartMenuHelper32.def" />
@@ -377,6 +384,9 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="dllmain.h" />
<ClInclude Include="ModernSettings.h" />
<ClInclude Include="ModernSettingsContextMenu.h" />
<ClInclude Include="ModernSettingsShellFolder.h" />
<ClInclude Include="Resource.h" />
<ClInclude Include="StartMenuExt.h" />
<ClInclude Include="StartMenuHelper_i.h" />

View File

@@ -34,6 +34,15 @@
<ClCompile Include="StartMenuHelper_i.c">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="ModernSettingsShellFolder.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ModernSettings.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ModernSettingsContextMenu.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Midl Include="StartMenuHelper.idl">
@@ -56,6 +65,12 @@
<None Include="StartMenuHelperL10N.ini">
<Filter>Resource Files</Filter>
</None>
<None Include="ModernSettingsShellFolder.rgs">
<Filter>Resource Files</Filter>
</None>
<None Include="ModernSettingsContextMenu.rgs">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClInclude Include="dllmain.h">
@@ -76,6 +91,15 @@
<ClInclude Include="StartMenuHelper_i.h">
<Filter>Generated Files</Filter>
</ClInclude>
<ClInclude Include="ModernSettingsShellFolder.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="ModernSettings.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="ModernSettingsContextMenu.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="StartMenuHelper.rc">

View File

@@ -4,6 +4,8 @@
//
#define IDR_STARTMENUHELPER 101
#define IDR_STARTMENUEXT 102
#define IDR_MODERNSETTINGSSHELLFOLDER 103
#define IDR_MODERNSETTINGSCONTEXTMENU 104
// Next default values for new objects
//
@@ -12,6 +14,6 @@
#define _APS_NEXT_RESOURCE_VALUE 201
#define _APS_NEXT_COMMAND_VALUE 32768
#define _APS_NEXT_CONTROL_VALUE 201
#define _APS_NEXT_SYMED_VALUE 103
#define _APS_NEXT_SYMED_VALUE 105
#endif
#endif

View File

@@ -319,7 +319,7 @@ LRESULT CUpdateDlg::OnDontRemind( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL
LRESULT CUpdateDlg::OnWeb( int idCtrl, LPNMHDR pnmh, BOOL& bHandled )
{
ShellExecute(m_hWnd,NULL,L"http://www.classicshell.net",NULL,NULL,SW_SHOWNORMAL);
ShellExecute(m_hWnd,NULL,L"https://github.com/Open-Shell/Open-Shell-Menu",NULL,NULL,SW_SHOWNORMAL);
return 0;
}

View File

@@ -136,7 +136,7 @@ BEGIN
PUSHBUTTON "Download",IDC_BUTTONDOWNLOAD,7,144,50,14,NOT WS_VISIBLE
CONTROL "Don't remind me again about this version",IDC_CHECKDONT,
"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,61,144,141,14
CONTROL "<a>www.classicshell.net</a>",IDC_LINKWEB,"SysLink",WS_TABSTOP,7,164,66,10,WS_EX_TRANSPARENT
CONTROL "<a>https://github.com/Open-Shell/Open-Shell-Menu</a>",IDC_LINKWEB,"SysLink",WS_TABSTOP,7,164,66,10,WS_EX_TRANSPARENT
DEFPUSHBUTTON "OK",IDOK,202,160,50,14
PUSHBUTTON "Cancel",IDCANCEL,259,160,50,14
END

View File

@@ -14,19 +14,19 @@
<ProjectGuid>{171B46B0-6083-4D9E-BD33-946EA3BD76FA}</ProjectGuid>
<RootNamespace>Update</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</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>
<PlatformToolset>v142</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
@@ -57,7 +57,6 @@
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\Lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>

View File

@@ -4,7 +4,7 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<!-- Default product version to use if CS_VERSION environment variable is not defined -->
<CS_VERSION Condition="'$(CS_VERSION)'==''">4.3.2</CS_VERSION>
<CS_VERSION Condition="'$(CS_VERSION)'==''">4.4.1000</CS_VERSION>
</PropertyGroup>
<ItemDefinitionGroup>
<ResourceCompile>

View File

@@ -2,7 +2,7 @@ version: 4.4.{build}
pull_requests:
do_not_increment_build_number: true
skip_tags: true
image: Visual Studio 2017
image: Visual Studio 2019
clone_depth: 1
build_script:
- cmd: Src\Setup\__MakeFinal.bat