add menu item to notepad

Apr 24, 2012 at 3:51pm
hi i wanted to know if i am able to add menu items to notepad or any other app?
i know you can change the title name so shouldnt you be able to do this?

but only want to do it while my program is running so the new menu dont stay there
Last edited on Apr 24, 2012 at 3:52pm
Apr 24, 2012 at 4:11pm
The source code of notepad is not publicly available so it's not really possible. I guess it's possible to hack it somehow but that will not be easy to do. It's probably much easier to write a Notepad clone yourself that have the extra features you want.
Apr 24, 2012 at 4:14pm
i didnt just mean notepad i ment any program.

so there is no way to do it even if i inject a .dll into it?

to make my own menu to be able to insert my own things?
Apr 24, 2012 at 4:30pm
must be able to be done.

it can be done in Autoit
Apr 24, 2012 at 4:58pm
http://msdn.microsoft.com/en-us/library/ms647987

can that be used if im in the currentprocces?
Apr 25, 2012 at 3:51am
anyone?

please
Apr 25, 2012 at 4:57am
i found this cant seem to get it working

1
2
3
4
5
6
7
8
HWND hwnd = FindWindow("Notepad",NULL); 
HMENU hMenu = GetSystemMenu(hwnd,FALSE); 

if (hwnd!=NULL) 
{ 
InsertMenu (hMenu, 0, MF_BYPOSITION, 0, "EXTRA"); 

} 
Apr 25, 2012 at 7:36am
It could be done, however you would have to attempt to disassemble notepad.exe, and maybe decompile it, then you could see how it works, and write your dll injection. Hope it helps :)
Topic archived. No new replies allowed.