How to add menu to other applications
-
Hey All I am wondering how to add new menu to other application, meaning I want to add a menu to another application that is not mine let's say I want to add menu to Windows Live Messenger or Yahoo! any idea how? thanks in advance!
When you run this code you have two "test" in File last option and another after help
PROCESS_INFORMATION l_ProcessInfo; STARTUPINFO l_StartupInfo; ZeroMemory(&l_StartupInfo, sizeof(STARTUPINFO)); l_StartupInfo.cb = sizeof(STARTUPINFO); l_StartupInfo.dwFlags = STARTF_USESHOWWINDOW; l_StartupInfo.wShowWindow = SW_SHOWMAXIMIZED; CreateProcess(NULL, "Notepad.exe", NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &l_StartupInfo, &l_ProcessInfo); MessageBox("Wait"); HWND hWnd = ::FindWindow("Notepad", NULL); //find notepad HMENU h=::GetMenu(hWnd); HMENU h2=GetSubMenu(h,0); AppendMenu(h2,MF_STRING,22,"test"); AppendMenu(h,MF_STRING,22,"test");
_**
**_
WhiteSky
-
When you run this code you have two "test" in File last option and another after help
PROCESS_INFORMATION l_ProcessInfo; STARTUPINFO l_StartupInfo; ZeroMemory(&l_StartupInfo, sizeof(STARTUPINFO)); l_StartupInfo.cb = sizeof(STARTUPINFO); l_StartupInfo.dwFlags = STARTF_USESHOWWINDOW; l_StartupInfo.wShowWindow = SW_SHOWMAXIMIZED; CreateProcess(NULL, "Notepad.exe", NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &l_StartupInfo, &l_ProcessInfo); MessageBox("Wait"); HWND hWnd = ::FindWindow("Notepad", NULL); //find notepad HMENU h=::GetMenu(hWnd); HMENU h2=GetSubMenu(h,0); AppendMenu(h2,MF_STRING,22,"test"); AppendMenu(h,MF_STRING,22,"test");
_**
**_
WhiteSky
thanks alot I didn't think it was easy like that to do what I am trying to, I thought I needed to hook the application first I have one more question, how I can I add the WM_COMMAND ability to this code so when I click on "test" a MessaBox will pop up? thanks in advance!
-
thanks alot I didn't think it was easy like that to do what I am trying to, I thought I needed to hook the application first I have one more question, how I can I add the WM_COMMAND ability to this code so when I click on "test" a MessaBox will pop up? thanks in advance!
You can see an article from Mr David Crow about "resource" maybe it is some helpful to you
_**
**_
WhiteSky
-
You can see an article from Mr David Crow about "resource" maybe it is some helpful to you
_**
**_
WhiteSky
-
I tried to find the article and searched after the arthur name but no result are you sure it is the right name? thanks!