A free Windows-compatible Operating System - mirrored from GitHub
Go to file
Giannis Adamopoulos 551d8fa312 [SHELL32]
- CDefaultContextMenu: Make it respect the IContextMenu interface and expect menu id offsets instead of real menu ids and actually use the idCmdFirst and idCmdLast parameters in QueryContextMenu. Make the default part use and existed menu from the resources but changed accordingly so the ids of its elements can be adjusted to the next free id of the constructed menu. Rename InsertMenuItemsOfDynamicContextMenuExtension to AddShellExtensionsToMenu, DoDynamicShellExtensions to InvokeShellExt, and DoStaticShellExtensions to InvokeRegVerb. Make AddShellExtensionsToMenu and AddStaticContextMenusToMenu behave like QueryContextMenu to return the number of ids they occupy. Add two helpers SHGetMenuIdFromMenuMsg and SHSetMenuIdInMenuMsg to change the id that is contained in the lparam of WM_DRAWITEM and WM_MEASUREITEM before forwarding them.
- CDefView: When calling QueryContextMenu before using TrackPopupMenu, use 1 as the first id that will filled by the IContextMenu because we want 0 to be used as an indicator that the menu was canceled. Use SHGetMenuIdFromMenuMsg and SHSetMenuIdInMenuMsg to change the lparam of the messages forwarded to the IContextMenu accordingly.
- CDefViewBckgrndMenu: Add a hack so as to keep the code as simple as possible while respecting idCmdFirst and idCmdLast.
- CNewMenu: Remove a hack that was needed because WM_DRAWITEM didn't come with the menu id offset but with the real menu id.
- CDesktopFolder, CFSFolder: Make the callbacks avoid adding an extra separators.
After that shell extensions in menus should work better and callbacks to shell folders should really be able to add several menu items. 

svn path=/trunk/; revision=75533
2017-08-14 15:25:58 +00:00
reactos [SHELL32] 2017-08-14 15:25:58 +00:00
rosapps [MOVEFILE] 2017-08-13 10:15:55 +00:00
rossubsys [REACTOS][ROSAPPS][ROSSUBSYS] 2016-05-31 22:36:48 +00:00
rostests [UXTHEME_APITEST] -Add tests for SetThemeAppProperties. 2017-08-09 07:14:44 +00:00
wallpapers Rename 'wallpaper' repo to 'wallpapers' (since it doesn't contain only 1 wallpaper :p ) 2015-03-15 16:06:50 +00:00