Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Right click on items to choose "Send to" doesn't work #225

Closed
the-phuctran opened this issue Oct 26, 2021 · 7 comments
Closed

[BUG] Right click on items to choose "Send to" doesn't work #225

the-phuctran opened this issue Oct 26, 2021 · 7 comments

Comments

@the-phuctran
Copy link

Description, Steps to reproduce, Expected behavior, Screenshots
Screenshot (6)
This option doesn't work in the right-click menu

  • OS: Windows 11 Pro, 21H2, 22000.282
  • Version 1.0.24.0, Microsoft store.
@the-phuctran the-phuctran changed the title [BUG] Right click on folder to choose "Send to" doesn't work [BUG] Right click on items to choose "Send to" doesn't work Oct 26, 2021
@Hofknecht
Copy link
Owner

thank you for reporting, i can reproduce it, i will have a look

@Tanjalibertatis
Copy link
Collaborator

We are using 'Explorer Shell Context Menu' from CodeProject. At its website we found a bug report related to this issue, but sadly no solution. Only the suggestion for another project called 'Gong Solutions Shell Library' that should work in this case.

https://www.codeproject.com/Articles/22012/Explorer-Shell-Context-Menu?fid=929090&df=90&mpp=25&sort=Position&spc=Relaxed&select=3706303&tid=3706303

@Hofknecht Hofknecht added this to Analyze / Spec in STM 1.1.0 Oct 28, 2021
@Hofknecht Hofknecht added this to Analyze / Spec in STM 1.2.0 Nov 19, 2021
@Hofknecht Hofknecht removed this from Analyze / Spec in STM 1.1.0 Nov 19, 2021
@Hofknecht
Copy link
Owner

Hofknecht commented Dec 10, 2021

related to ShellContextMenu there is also this second minor issue, the context menu of a network root folder does not work
900 context menu network root folder not working

when we change to another solution maybe also check this issue or create then an extra one therefore

@Hofknecht
Copy link
Owner

a third point is that dark mode not working in this ShellContextMenu:
2021-12-11 11_15_29-Window

should look like this:
2021-12-11 11_15_10-

@Hofknecht Hofknecht removed this from Analyze / Spec in STM 1.2.0 Dec 11, 2021
@Hofknecht Hofknecht added this to Analyze / Spec in STM 1.3.0 via automation Dec 11, 2021
@chip33
Copy link
Contributor

chip33 commented Jan 23, 2022

Right click on items to choose "Send to" doesn't work #225 can be fixed by modifying ShellContextMenu.cs as described here

@Hofknecht :)

Method ShellContextMenu.ShowContextMenu first calls User32.dll DestroyMenu then calls IContextMenu.InvokeCommand, using the menu id of the previous destroyed menu.

Changed the order of calls, then it worked.

private void ShowContextMenu(Point pointScreen)
{
    ...

        uint nSelected = TrackPopupMenuEx(
            pMenu,
            TPM.RETURNCMD,
            pointScreen.X,
            pointScreen.Y,
            this.Handle,
            IntPtr.Zero);

        // First invoke menu item, then destroy menu.
        if (nSelected != 0)
        {
            InvokeCommand(_oContextMenu, nSelected, _strParentFolder, pointScreen);
        }

        DestroyMenu(pMenu);
        pMenu = IntPtr.Zero;

    ...
}

ShellContextMenu.InvokeContextMenuDefault in original source code for ShellContextMenu.cs does it in the correct order.

I have compiled latest commit 1.2.2.4 with this change to ShellContextMenu.cs and Send to now works for me.
ShellContextMenu.zip

@Hofknecht
Copy link
Owner

@chip33 Thank you for analyzing finding the solution!
Seems to work great, comitted it with version 1.2.2.5!

@the-phuctran
FYI Thank you for reporting!

the other 2 related issues are now in #298

=> closed

STM 1.3.0 automation moved this from Analyze / Spec to Closed Jan 25, 2022
@Hofknecht Hofknecht added this to the 1.3 milestone Jan 25, 2022
@chip33
Copy link
Contributor

chip33 commented Jan 26, 2022

Hi, you are welcome, glad to help with such a great project :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
STM 1.3.0
  
Closed
Development

No branches or pull requests

4 participants