Einzelnen Beitrag anzeigen

Benutzerbild von implementation
implementation

Registriert seit: 5. Mai 2008
940 Beiträge
 
FreePascal / Lazarus
 
#3

Re: In Konsole angeklickten Menüpunkt ermitteln

  Alt 6. Sep 2009, 13:20
Danke für die schnelle Antwort, das war das Problem.
Delphi-Quellcode:
procedure TNWLGUICon.ProcessMenuClick(Rec:MOUSE_EVENT_RECORD);
var m: TNWLGUICMenu; i: Byte; break: Boolean;
begin
   m := Menu;
   i := 1;
   AppMan.Console.Cursor.Move(0,2);
   break := false;
   while (not break) and ((m<>nil) and (i<5)) do begin
      break := not (Rec.dwMousePosition.X > m.PaintInfo.Left);
      if not break then begin
         m := m.NextMenu;
         i += 1;
      end;
   end;
   AppMan.Console.Cursor.Move(0,1);
   AppMan.Console.InOut.Space := Menues[i-2].PaintInfo.Left;
   AppMan.Console.InOut.Ansi := Menues[i-2].Caption;
end;
Marvin
  Mit Zitat antworten Zitat