tags:

views:

86

answers:

2

Hi all,

is it possible to add buttons or menu items to external programs? For instance, adding an menu item into notepad itself which will show a messagebox (after clicking on it) with the current text within notepad. if yes, is there a url which gives some more details about it?

looking forward to your answers.

+1  A: 

Yes please take a look here http://www.rohitab.com/discuss/lofiversion/index.php/t17456.html

SDX2000
Thanks, this was what I needed
A: 

It's possible by creating the control (via the Windows API or whatever) and then assigning your target window's HWND as the new control's parent. For reference, check the SetParent Win32 API function on MSDN.

Not sure how well this will work with a menu, but that's the normal way to add a control to a window. Be careful, though. There are lots of gotchas (commands taken by the target application, memory considerations, etc).

DannySmurf