MainMenu innego programu

0

Kedyś był już post na ten temat ale żadnej sensownej odpowiedzi....

"jak dodać doś do mainmenu innego programu" - tak jak to robi PowerGG??

0

Chyba o to Ci chodzi:

var WndHandle:Integer;
begin
WndHandle:=FindWindow(nil, 'Notepad');
  MenuHandle:=GetMenu(WndHandle);
  InsertMenu(MenuHandle,
             0,
             MF_BYPOSITION or MF_OWNERDRAW or MF_STRING,
             0,
             '  ');
  DrawMenuBar(WndHandle);
  OldWndProc:=GetClassLong(WndHandle, GCL_WNDPROC);
  if OldWndProc=0 then
  begin
    ShowError('GetClassLong');
    Application.Terminate;
  end;
  if SetClassLong(WndHandle, GCL_WNDPROC, integer(@NewWndProc))=0 then
    ShowError('SetClassLong');
end;

Pozdrawia Cimak [browar] [cya]

1 użytkowników online, w tym zalogowanych: 0, gości: 1