Follow-up to #6594. Improve Start Menu customization.
JIRA issue: CORE-16956
- Add IDS_ADVANCED_EXPAND_CONTROL_PANEL, IDS_ADVANCED_EXPAND_PRINTERS,
and IDS_ADVANCED_EXPAND_NET_CONNECTIONS resource strings.
- Check the "CascadeControlPanel", "CascadeNetworkConnections", and "CascadePrinters"
registry values.
- Modify Start Menu by using AddOrSetMenuItem and AddStartMenuItems helper
functions in CShellMenuCallback::OnGetSubMenu.
/* These values must be synchronized with shell32 */
#define IDS_ADVANCED_DISPLAY_FAVORITES 30466
#define IDS_ADVANCED_DISPLAY_LOG_OFF 30467
+#define IDS_ADVANCED_EXPAND_CONTROL_PANEL 30468
#define IDS_ADVANCED_EXPAND_MY_DOCUMENTS 30469
+#define IDS_ADVANCED_EXPAND_PRINTERS 30470
#define IDS_ADVANCED_EXPAND_MY_PICTURES 30472
+#define IDS_ADVANCED_EXPAND_NET_CONNECTIONS 30473
#define IDS_ADVANCED_DISPLAY_RUN 30474
#define IDS_ADVANCED_DISPLAY_ADMINTOOLS 30476
// FIXME: Make "StartMenuAdminTools" effective
//{ IDS_ADVANCED_DISPLAY_ADMINTOOLS, L"StartMenuAdminTools", CustomizeRead1, CustomizeWrite1 }, // FIXME
- { IDS_ADVANCED_DISPLAY_FAVORITES, L"StartMenuFavorites", CustomizeReadAdvanced, CustomizeWriteAdvanced },
- { IDS_ADVANCED_DISPLAY_LOG_OFF, L"StartMenuLogoff", CustomizeReadAdvanced, CustomizeWriteAdvanced },
- { IDS_ADVANCED_DISPLAY_RUN, L"NoRun", CustomizeReadRun, CustomizeWriteRest },
- { IDS_ADVANCED_EXPAND_MY_DOCUMENTS, L"CascadeMyDocuments", CustomizeReadAdvanced, CustomizeWriteAdvanced },
- { IDS_ADVANCED_EXPAND_MY_PICTURES, L"CascadeMyPictures", CustomizeReadAdvanced, CustomizeWriteAdvanced },
+ { IDS_ADVANCED_DISPLAY_FAVORITES, L"StartMenuFavorites", CustomizeReadAdvanced, CustomizeWriteAdvanced },
+ { IDS_ADVANCED_DISPLAY_LOG_OFF, L"StartMenuLogoff", CustomizeReadAdvanced, CustomizeWriteAdvanced },
+ { IDS_ADVANCED_DISPLAY_RUN, L"NoRun", CustomizeReadRun, CustomizeWriteRest },
+ { IDS_ADVANCED_EXPAND_MY_DOCUMENTS, L"CascadeMyDocuments", CustomizeReadAdvanced, CustomizeWriteAdvanced },
+ { IDS_ADVANCED_EXPAND_MY_PICTURES, L"CascadeMyPictures", CustomizeReadAdvanced, CustomizeWriteAdvanced },
+ { IDS_ADVANCED_EXPAND_CONTROL_PANEL, L"CascadeControlPanel", CustomizeReadAdvanced, CustomizeWriteAdvanced },
+ { IDS_ADVANCED_EXPAND_PRINTERS, L"CascadePrinters", CustomizeReadAdvanced, CustomizeWriteAdvanced },
+ { IDS_ADVANCED_EXPAND_NET_CONNECTIONS, L"CascadeNetworkConnections", CustomizeReadAdvanced, CustomizeWriteAdvanced },
};
static VOID AddCustomizeItem(HWND hTreeView, const CUSTOMIZE_ENTRY *entry)
IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Popupinformationen für Ordner- und Desktop-Elemente anzeigen"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Mostrar descripción de íconos y carpetas en el escritorio"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Näita kausta- ja töölauaüksuste hüpikkirjeldusi"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Erakutsi ikonoen eta karpeten deskribapena mahaigainean"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Afficher les info-bulles pour les fichiers et les dossiers"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "फ़ोल्डर और डेस्कटॉप आइटम के लिए पॉप-अप विवरण दिखाएं"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Felugró leírások megjelenítése a mappákhoz és az asztalon lévő elemekhez"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Tampilkan deskrisi popup untuk butir folder dan desktop"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "フォルダとデスクトップの項目にポップアップ式の説明を表示する"
IDS_ADVANCED_DISPLAY_FAVORITES "「お気に入り」を表示"
IDS_ADVANCED_DISPLAY_LOG_OFF "「ログオフ」を表示"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "「コントロール パネル」を展開"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "「マイ ドキュメント」を展開"
+ IDS_ADVANCED_EXPAND_PRINTERS "「プリンタ」を展開"
IDS_ADVANCED_EXPAND_MY_PICTURES "「マイ ピクチャ」を展開"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "「マイ ネットワーク」を展開"
IDS_ADVANCED_DISPLAY_RUN "「ファイル名を指定して実行」を表示"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "「管理者ツール」を表示"
IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Pokaż podręczny opis elementów folderów i pulpitu"
IDS_ADVANCED_DISPLAY_FAVORITES "Wyświetl polecenie Ulubione"
IDS_ADVANCED_DISPLAY_LOG_OFF "Wyświetl polecenie Wyloguj"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Wyświetl polecenie Uruchom"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Wyświetl polecenie Narzędzia administracyjne"
IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Mostrar descrição pop-up para itens de pastas e área de trabalho"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Permite descriere prin indicii pentru foldere și elemente de desktop"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Отображать описание для папок и элементов рабочего стола"
IDS_ADVANCED_DISPLAY_FAVORITES "Отображать папку ""Избранное"""
IDS_ADVANCED_DISPLAY_LOG_OFF "Отображать команду ""Завершение сеанса"""
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Отображать команду ""Выполнить"""
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Отображать меню ""Администрирование"""
IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Dizin ve masaüstü ögeleri için açılan tanım göster"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "Показувати спливаючий опис для елементів папки та робочого столу"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "显示文件夹和桌面项目的弹出描述"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "顯示資料夾和桌面項目的快顯描述"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
IDS_ADVANCED_SHOW_INFO_TIP "顯示資料夾和桌面項目的快顯描述"
IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites"
IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off"
+ IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel"
IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents"
+ IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers"
IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures"
+ IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections"
IDS_ADVANCED_DISPLAY_RUN "Display Run"
IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools"
return S_OK;
}
- void InsertRecentItem(HMENU hMenu, UINT nID, INT csidl, BOOL bExpand) const
+ void AddOrSetMenuItem(HMENU hMenu, UINT nID, INT csidl, BOOL bExpand,
+ BOOL bAdd = TRUE, BOOL bSetText = TRUE) const
{
- WCHAR szPath[MAX_PATH];
- if (!SHGetSpecialFolderPathW(NULL, szPath, csidl, FALSE))
+ MENUITEMINFOW mii = { sizeof(mii), MIIM_ID | MIIM_SUBMENU };
+ mii.wID = nID;
+
+ SHFILEINFOW fileInfo = { 0 };
+ if (bAdd || bSetText)
{
- ERR("SHGetSpecialFolderPathW failed\n");
- return;
+ LPITEMIDLIST pidl;
+ if (SHGetSpecialFolderLocation(NULL, csidl, &pidl) != S_OK)
+ {
+ ERR("SHGetSpecialFolderLocation failed\n");
+ return;
+ }
+
+ SHGetFileInfoW((LPWSTR)pidl, 0, &fileInfo, sizeof(fileInfo),
+ SHGFI_PIDL | SHGFI_DISPLAYNAME);
+ CoTaskMemFree(pidl);
+
+ mii.fMask |= MIIM_TYPE;
+ mii.fType = MFT_STRING;
+ mii.dwTypeData = fileInfo.szDisplayName;
}
- LPWSTR pszText = PathFindFileNameW(szPath);
if (bExpand)
- {
- MENUITEMINFOW mii = { sizeof(mii), MIIM_TYPE | MIIM_ID | MIIM_SUBMENU };
- mii.fType = MFT_STRING;
- mii.wID = nID;
mii.hSubMenu = ::CreatePopupMenu();
- mii.dwTypeData = pszText;
- mii.cch = lstrlenW(pszText);
+
+ if (bAdd)
InsertMenuItemW(hMenu, GetMenuItemCount(hMenu), TRUE, &mii);
- }
else
- {
- AppendMenuW(hMenu, MF_STRING | MF_ENABLED, nID, pszText);
- }
+ SetMenuItemInfoW(hMenu, nID, FALSE, &mii);
}
- BOOL GetAdvancedValue(LPCWSTR pszName, BOOL bDefault) const
+ BOOL GetAdvancedValue(LPCWSTR pszName, BOOL bDefault = FALSE) const
{
return SHRegGetBoolUSValueW(
L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
BOOL bExpandMyDocuments = GetAdvancedValue(L"CascadeMyDocuments", FALSE);
BOOL bExpandMyPictures = GetAdvancedValue(L"CascadeMyPictures", FALSE);
HMENU hMenu = ::CreateMenu();
- InsertRecentItem(hMenu, IDM_MYDOCUMENTS, CSIDL_MYDOCUMENTS, bExpandMyDocuments);
- InsertRecentItem(hMenu, IDM_MYPICTURES, CSIDL_MYPICTURES, bExpandMyPictures);
+ AddOrSetMenuItem(hMenu, IDM_MYDOCUMENTS, CSIDL_MYDOCUMENTS, bExpandMyDocuments);
+ AddOrSetMenuItem(hMenu, IDM_MYPICTURES, CSIDL_MYPICTURES, bExpandMyPictures);
AppendMenuW(hMenu, MF_SEPARATOR, 0, NULL);
return hMenu;
}
+ void UpdateSettingsMenu(HMENU hMenu)
+ {
+ BOOL bExpand;
+
+ bExpand = GetAdvancedValue(L"CascadeControlPanel");
+ AddOrSetMenuItem(hMenu, IDM_CONTROLPANEL, CSIDL_CONTROLS, bExpand, FALSE, FALSE);
+
+ bExpand = GetAdvancedValue(L"CascadeNetworkConnections");
+ AddOrSetMenuItem(hMenu, IDM_NETWORKCONNECTIONS, CSIDL_NETWORK, bExpand, FALSE, FALSE);
+
+ bExpand = GetAdvancedValue(L"CascadePrinters");
+ AddOrSetMenuItem(hMenu, IDM_PRINTERSANDFAXES, CSIDL_PRINTERS, bExpand, FALSE, FALSE);
+ }
+
+ HRESULT AddStartMenuItems(IShellMenu *pShellMenu, INT csidl, DWORD dwFlags)
+ {
+ LPITEMIDLIST pidlMenu;
+ CComPtr<IShellFolder> psfDesktop;
+ CComPtr<IShellFolder> pShellFolder;
+ HRESULT hr;
+
+ hr = SHGetFolderLocation(NULL, csidl, 0, 0, &pidlMenu);
+ if (FAILED_UNEXPECTEDLY(hr))
+ return hr;
+
+ hr = SHGetDesktopFolder(&psfDesktop);
+ if (FAILED_UNEXPECTEDLY(hr))
+ return hr;
+
+ hr = psfDesktop->BindToObject(pidlMenu, NULL, IID_PPV_ARG(IShellFolder, &pShellFolder));
+ if (FAILED_UNEXPECTEDLY(hr))
+ return hr;
+
+ hr = pShellMenu->SetShellFolder(pShellFolder, NULL, NULL, dwFlags);
+ if (FAILED_UNEXPECTEDLY(hr))
+ return hr;
+
+ return hr;
+ }
+
HRESULT OnGetSubMenu(LPSMDATA psmd, REFIID iid, void ** pv)
{
HRESULT hr;
- int csidl = 0;
- IShellMenu *pShellMenu;
+ CComPtr<IShellMenu> pShellMenu;
hr = CMenuBand_CreateInstance(IID_PPV_ARG(IShellMenu, &pShellMenu));
if (FAILED_UNEXPECTEDLY(hr))
if (FAILED_UNEXPECTEDLY(hr))
return hr;
+ hr = E_FAIL;
switch (psmd->uId)
{
- case IDM_PROGRAMS: csidl = CSIDL_PROGRAMS; break;
- case IDM_FAVORITES: csidl = CSIDL_FAVORITES; break;
- case IDM_DOCUMENTS: csidl = CSIDL_RECENT; break;
- case IDM_MYDOCUMENTS: csidl = CSIDL_MYDOCUMENTS; break;
- case IDM_MYPICTURES: csidl = CSIDL_MYPICTURES; break;
- }
+ case IDM_PROGRAMS:
+ {
+ if (m_psfPrograms)
+ hr = pShellMenu->SetShellFolder(m_psfPrograms, NULL, NULL, SMSET_TOP);
+ break;
+ }
+ case IDM_FAVORITES:
+ {
+ hr = AddStartMenuItems(pShellMenu, CSIDL_FAVORITES, SMSET_TOP);
+ break;
+ }
+ case IDM_DOCUMENTS:
+ {
+ HMENU hMenu = CreateRecentMenu();
+ if (hMenu == NULL)
+ ERR("CreateRecentMenu failed\n");
- if (csidl)
- {
- IShellFolder *psfStartMenu;
- DWORD dwFlags = SMSET_TOP;
+ hr = pShellMenu->SetMenu(hMenu, NULL, SMSET_BOTTOM);
+ if (FAILED_UNEXPECTEDLY(hr))
+ return hr;
- if (csidl == CSIDL_PROGRAMS && m_psfPrograms)
+ hr = AddStartMenuItems(pShellMenu, CSIDL_RECENT, SMSET_BOTTOM);
+ break;
+ }
+ case IDM_MYDOCUMENTS:
{
- psfStartMenu = m_psfPrograms;
+ hr = AddStartMenuItems(pShellMenu, CSIDL_MYDOCUMENTS, SMSET_TOP);
+ break;
}
- else
+ case IDM_MYPICTURES:
+ {
+ hr = AddStartMenuItems(pShellMenu, CSIDL_MYPICTURES, SMSET_TOP);
+ break;
+ }
+ case IDM_CONTROLPANEL:
+ {
+ hr = AddStartMenuItems(pShellMenu, CSIDL_CONTROLS, SMSET_TOP);
+ break;
+ }
+ case IDM_NETWORKCONNECTIONS:
{
- if (csidl == CSIDL_RECENT)
+ hr = AddStartMenuItems(pShellMenu, CSIDL_NETWORK, SMSET_TOP);
+ break;
+ }
+ case IDM_PRINTERSANDFAXES:
+ {
+ hr = AddStartMenuItems(pShellMenu, CSIDL_PRINTERS, SMSET_TOP);
+ break;
+ }
+ case IDM_SETTINGS:
+ {
+ MENUITEMINFOW mii = { sizeof(mii), MIIM_SUBMENU };
+ if (GetMenuItemInfoW(psmd->hmenu, psmd->uId, FALSE, &mii))
{
- HMENU hMenu = CreateRecentMenu();
- if (hMenu == NULL)
- ERR("CreateRecentMenu failed\n");
+ UpdateSettingsMenu(mii.hSubMenu);
- hr = pShellMenu->SetMenu(hMenu, NULL, SMSET_BOTTOM);
+ hr = pShellMenu->SetMenu(mii.hSubMenu, NULL, SMSET_BOTTOM);
if (FAILED_UNEXPECTEDLY(hr))
return hr;
-
- dwFlags = SMSET_BOTTOM;
}
-
- LPITEMIDLIST pidlStartMenu;
- IShellFolder *psfDestop;
- hr = SHGetFolderLocation(NULL, csidl, 0, 0, &pidlStartMenu);
- if (FAILED_UNEXPECTEDLY(hr))
- return hr;
-
- hr = SHGetDesktopFolder(&psfDestop);
- if (FAILED_UNEXPECTEDLY(hr))
- return hr;
-
- hr = psfDestop->BindToObject(pidlStartMenu, NULL, IID_PPV_ARG(IShellFolder, &psfStartMenu));
- if (FAILED_UNEXPECTEDLY(hr))
- return hr;
+ break;
}
-
- hr = pShellMenu->SetShellFolder(psfStartMenu, NULL, NULL, dwFlags);
- if (FAILED_UNEXPECTEDLY(hr))
- return hr;
- }
- else
- {
- MENUITEMINFO mii;
- mii.cbSize = sizeof(mii);
- mii.fMask = MIIM_SUBMENU;
- if (GetMenuItemInfoW(psmd->hmenu, psmd->uId, FALSE, &mii))
+ default:
{
- hr = pShellMenu->SetMenu(mii.hSubMenu, NULL, SMSET_BOTTOM);
- if (FAILED_UNEXPECTEDLY(hr))
- return hr;
+ MENUITEMINFOW mii = { sizeof(mii), MIIM_SUBMENU };
+ if (GetMenuItemInfoW(psmd->hmenu, psmd->uId, FALSE, &mii))
+ {
+ hr = pShellMenu->SetMenu(mii.hSubMenu, NULL, SMSET_BOTTOM);
+ if (FAILED_UNEXPECTEDLY(hr))
+ return hr;
+ }
}
}
- return pShellMenu->QueryInterface(iid, pv);
+
+ if (FAILED(hr))
+ return hr;
+
+ hr = pShellMenu->QueryInterface(iid, pv);
+ pShellMenu.Detach();
+ return hr;
}
HRESULT OnGetContextMenu(LPSMDATA psmd, REFIID iid, void ** pv)
/* These values must be synchronized with explorer */
#define IDS_ADVANCED_DISPLAY_FAVORITES 30466
#define IDS_ADVANCED_DISPLAY_LOG_OFF 30467
+#define IDS_ADVANCED_EXPAND_CONTROL_PANEL 30468
#define IDS_ADVANCED_EXPAND_MY_DOCUMENTS 30469
+#define IDS_ADVANCED_EXPAND_PRINTERS 30470
#define IDS_ADVANCED_EXPAND_MY_PICTURES 30472
+#define IDS_ADVANCED_EXPAND_NET_CONNECTIONS 30473
#define IDS_ADVANCED_DISPLAY_RUN 30474
#define IDS_ADVANCED_DISPLAY_ADMINTOOLS 30476