contextmenu

Adding items to context menu and custom actions for these items

Hi How can I add menu items to the Context menu for folders? I don't want to do this via registry. I want to integrate this with my application's installer and when the application is installed, the context menu items should be added. On clicking the items, my application's method should be called (similar to what WinRAR does) Thanks. ...

Programmatically open context menu using UI automation?

I'm trying to implement a right click context menu using UI automation. Since UI automation does not have a native right click pattern I am adding an ExpandCollapse provider to the listview's AutomationPeer class and mapping the expand and collapse to opening and closing the context menu. My question, is there a better method of invoki...

Getting Coverage for Windows Explorer Context Menu Application!

I have an application which runs using the context menu of windows explorer. I create an ATL based DLL and register it to Windows Registry under HKCR\AllFileSystemObjects\ShellEx\ContextMenuHandlers. I am able to run my application. I want coverage for my code present in the DLL which is being registered in the registry. I am currently ...

Right click with SendKeys in .NET

I am using sendkeys in C# .NET. I have letters, arrow keys and enter working. I cant figure out how to send a right click for the context menu. I know i can press a key on my keyboard to do it but i have no idea how to send the msg. How do i? i googled and saw new MenuItem().PerformClick(); as a solution however i didnt see any affect...

How to reference right-clicked object in WPF Context Menu item click event handler?

In WPF application there is a Grid with a number of objects (they are derived from a custom control). I want to perform some actions on each of them using context menu: <Grid.ContextMenu> <ContextMenu> <MenuItem Name="EditStatusCm" Header="Change status" Click="EditStatusCm_Click"/> </ContextMenu> ...

flex 3 passing data from modules to parent application to switch views in the viewstack

Hello Fellow stackoverflowers, I´m stuck writing a piece of code. I have application with a viewstack witch load 5 modules. each module is loaded via the moduleLoader tag and they all have an id. Every loaded module has a context menu. the context menu has 5 menuItems. one menuItem for each view for the viewstack. The context menu is ...

How do I write shell extension context menu in C++ Builder 2010?

I'm looking for some examples for writing a shell extension in C++ Builder 2010 (2007 and 2009 would also probably be relevant) so I can right click a file in Explorer and get the file path in my VCL program. I have followed Clayton Todd's tutorial, but it's from 2001, and I have some trouble getting it to work. I can't get it to call m...

save context menu items in my.settings vb.net

How can I store the items in a context menu strip in the Settings so they are in the context menu when the application is next started? Or is there a better way than using settings? (they are recently opened files in the cms) ...

How to add condition to a WPF Context Menu?

How could I add some conditions changing list of MenuItems in a WPF Context Menu, depending on some attributes of clicked objects?: <Grid.ContextMenu> <ContextMenu> <MenuItem Name="EditStatusCm" Header="Change status" /> ... <MenuItem ... /> </ContextMenu> </Grid.ContextMenu> ...

Displaying complete context menu in windows 7 library folders

When browsing non-special/standard folders in explorer (windows 7), I have various custom right-click context menu options such as: "Open command window here" (shift+ rightclick) TortoiseHG WinMerge ...etc... The problem is that these options do not come up in the context menu when navigating library folders (such as Documents/My Do...

Add menu item to windows context menu only for specific filetype

Hi, i've dveloped an application that load an image using the context menu of window (right click on the file) and for the moment is working, but the reg key is on HKEY_CLASSES_ROOT\* and it works with all files. I want that the menu item on the context menu should be displayed only with .jpg files. Whow i can do that? Which regist...

onTextContextMenuItem is not called on custom menu items

Hi I'm trying to add some custom menu items to some EditText-instances. They appear on in the menu, but when I click the buttons the onTextContentMenuItem-method is not called. The EditText-instances are in a ListView if that matters. Any advice on the matter? Relevant code: class DocumentFragment extends EditText { public Docume...

How do you make height of context menu items not be fixed (ie scale to size of the particular item) in .Net?

See the two images below. I don't want each item in the menu to be the height of the largest. It should size to fit the contents. I've played around with a number of properties and haven't been able to prevent this behavior. Is it possible? ...

Right-click on a NSStatusItem

Hi. I have a NSStatusItem and I want to popup a menu by rightclicking the item. I subclassed a NSView and overwrote the - (void)rightMouseDown:(NSEvent *)event method. I also implemented - (void)mouseDown:(NSEvent *)event for looking at the modifierflags. My problem is, that the view does not recieve the NSRightMouseDown-Event. And I don...

How do I change the context menu on a WPF ESRI Symbol at run time?

An ESRI Symbol has a ControlTemplate and in the ControlTemplate I can specify a ContextMenu, and that works fine. However, I need to change the ContextMenu (add, remove items) at run time. ControlTemplate.FindName doesn't work because Symbol is not a FrameworkElement. I also know about Graphic.MouseLeftButtonDown, but I want the context ...

Cannot add actions to custom buttons on word "Text" popup menu

Hi, I've been having a real tough time the following. I'm using Visual Studio 2010 Beta, developing a word template (.dotm) in Visual Basic.Net I'm trying to add my own buttons on the text popup/context menu of word. However if I use the .OnAction property, I get an error msg in word stating the following: The macro cannot be found...

How to enable the browser context menu in dojox.grid.DataGrid?

I'm trying to get the browser context menu to work inside a dojox.grid.DataGrid. When I right-click on the grid now, nothing happens. I tried overriding onCellContextMenu, onRowContextMenu, doContextMenu, and oncontextmenu with empty functions on the grid instance, but that didn't work. The method onCellContextMenu is called on a right-c...

Looking for popUpMenuPositioningItem:atLocation:inView: equivalent for 10.5

I'm working on an application that needs to display a context menu on screen in various scenarios. In the function I'm writing, I don't have access to any NSWindows or NSViews. I'd like to use popUpMenuPositioningItem:atLocation:inView as this function works perfectly for me in 10.6. However, we have a requirement to support 10.5, so thi...

Can't get OnContextMenu to work for custom CListCtl class.

I am trying to get a context menu to work for a CListCtrl derived class. I just created a method OnContextMenu, but it isn't being called. What am I missing? I am using Visual Studio 2008, to create a CDialog based MFC application. customlist.h class tcCustomListCtl : public CListCtl { DECLARE_DYNAMIC(tcCustomListCtl) public:...

Showing a Windows context menu for multiple items

I have an application that lists files, and I allow the user to right-click on a file and my application shows the Windows context menu for the selected file. I use SHParseDisplayName to get a pidl for a filename. Then I bind to the parent object: IntPtr pidlLast = IntPtr.Zero; SHBindToParent(pidl, typeof(IShellFolder).GUID, out oShell...