Commit graph

6 commits

Author SHA1 Message Date
Colin Finck c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
Giannis Adamopoulos 1980176e15 [SHELL32] -CDefViewBckgrndMenu: Fix pasting in the background of a folder.
svn path=/trunk/; revision=75618
2017-08-18 17:32:20 +00:00
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
Giannis Adamopoulos f9e5da10de Fix build.
svn path=/trunk/; revision=73408
2016-11-29 18:01:35 +00:00
Giannis Adamopoulos 4c9e684463 [SHELL32] - CDefViewBckgrndMenu: Shell_MergeMenus doesn't handle items added by shell extensions correctly so let the folder IContextMenu add its items directly in the menu. CORE-12508
svn path=/trunk/; revision=73407
2016-11-29 17:56:04 +00:00
Giannis Adamopoulos 99548a5a34 [SHELL32]
- CDefViewBckgrndMenu : Add class to handle the background menu of the CDefView and handle stuff that previously were handled by CDefaultContextMenu. Let the shell folders fill their own part of the background context menu.
- CDefView: Create a CDefViewBckgrndMenu instead of a CDefaultContextMenu which was completely wrong.
- CDesktopFolder, CFSFolder: Implement returning the background context menu in CreateViewObject. Note that I am not completely sure that the callback should be adding the Properties item.
- CDefaultContextMenu: Remove code that was moved to CDefViewBckgrndMenu and try to improve the overzealous debug prints regarding the shell extensions.
CORE-12410, CORE-12472

svn path=/trunk/; revision=73405
2016-11-29 15:38:55 +00:00