The target application is written in Delphi (win32 is not .NET) and is closed.
The action I want to call is called Copy, but there is no obvious key combination. (Ctrl + Insert does the wrong thing, but Ctrl + C does nothing)
I can find my goal HWNDand convince her to open the context menu (it responds to WM_RBUTTONDOWN/UPnot WM_CONTEXTMENU). From the menu, HWNDI can even get the menu handle through MN_GETHMENUand find the menu item that I want. I just don’t know the details of how to “select” an element. It does not help that the menu is "weak", i.e. it HWNDdoesn’t belong, so I don’t know which of the many hidden windows TPUtilWindowis the real owner, otherwise I could just send it WM_COMMANDand not even jump into the menu, which would be preferable.
Although I am sure that this facilitates all kinds of hacks, I would prefer not to enter the code into the target process.
Answers accepted in any language.
source
share