Jeff Sholl

I'm not sure if this is possible or not, and I'm not sure if I'm going to get this across well, but I'll give it a shot and see if you guys can help me figure out how to pull this off or point me in the right direction.

What I would like to do is there will be a program running in the systray and while it is running anytime the user RightClicks on some selected text there will be an option in the RClick popup menu to do something with my program. So for example if they are in Word, notepad, internet explorer, etc. and they select some text and right click on it, in the popup menu there will be an option to do something with that selected text in my program. Hope this makes sense Smile

Would this be possible While my program is running can I place an option in the window's RClick popup menu to send some selected text to my program

Thanks guys, any help would be greatly appreciated!

Jeff

EDIT: Sorry, I should have probably placed this in the Windows SDK forum. But, if anyone here can help, that would be great.



Re: Windows SDK Putting a command into window's general RightClick popup menu...

Rakesh Simpi

hey Jeff,



you can go through this article. i think you will get answers for most of your questions along with a sample source code...


happy coding!





Re: Windows SDK Putting a command into window's general RightClick popup menu...


Re: Windows SDK Putting a command into window's general RightClick popup menu...

Viorel.

Theoretically you could consider the interception of WM_INITMENU and WM_INITPOPUPMENU notifications which are sent when a menu becomes active. This should be possible using advanced "hooking" technique and SetWindowsHookEx function. When you intercept such a message, you probably can alter the menu before it is displayed.

But you should take into account that context menus in some applications can be done without standard interceptable menus.

For particular cases you could also consider creating plug-in modules for Word or Internet Explorer.

I hope this makes sense.