AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein GUI-Design mit VCL / FireMonkey / Common Controls Delphi Was tun uMsg: UInt; wParam: WParam; lParam: LParam ?
Thema durchsuchen
Ansicht
Themen-Optionen

Was tun uMsg: UInt; wParam: WParam; lParam: LParam ?

Ein Thema von MisterNiceGuy · begonnen am 15. Mai 2005 · letzter Beitrag vom 16. Mai 2005
 
Benutzerbild von MisterNiceGuy
MisterNiceGuy

Registriert seit: 1. Jul 2003
Ort: Mannheim
919 Beiträge
 
Delphi 7 Personal
 
#1

Was tun uMsg: UInt; wParam: WParam; lParam: LParam ?

  Alt 15. Mai 2005, 19:23
Ich habe folgenden Code zum Andocken eines Fensters (Screensnap).
Delphi-Quellcode:
function WndProc(WndHWND: HWnd; uMsg: UInt; wParam: WParam; lParam: LParam): LResult; stdcall;
const
  DISTANCE = 20;
var
  MyWndPos: PWindowPos;
  WorkAreaRect: TRect;
begin
   Result := 0;

   case uMsg of
    WM_WINDOWPOSCHANGING: begin
      // Nötige Informationen holen
      SystemParametersInfo(SPI_GETWORKAREA, 0, @WorkAreaRect, 0);
      MyWndPos := PWINDOWPOS(lParam);

      // Oben und Unten
      if (MyWndPos.y <= DISTANCE) and
         (MyWndPos.y >= -DISTANCE) then
           MyWndPos.y := 0;
      if (MyWndPos.y + MyWndPos.cy > (WorkAreaRect.Bottom - DISTANCE)) and
         (MyWndPos.y + MyWndPos.cy < (WorkAreaRect.Bottom + DISTANCE)) then
           MyWndPos.y := WorkAreaRect.Bottom - MyWndPos.cy;

      // Links und Rechts
      if (MyWndPos.x <= DISTANCE) and
         (MyWndPos.x >= -DISTANCE) then
           MyWndPos.x := 0;
      if (MyWndPos.x + MyWndPos.cx > (WorkAreaRect.Right - DISTANCE)) and
         (MyWndPos.x + MyWndPos.cx < (WorkAreaRect.Right + DISTANCE)) then
           MyWndPos.x := WorkAreaRect.Right - MyWndPos.cx;
    end;

    WM_DESTROY: begin
      PostQuitMessage(0);
    end;

     else Result := DefWindowProc(WndHWND, uMsg, wParam, lParam);
   end;
end;
Ich würde nun gerne diese Funktion auf ein beliebiges Fenster dessen Handle ich habe anweden.
Leider scheitere ich an den Parametern.
Das Handle ist klar, aber was
uMsg: UInt; wParam: WParam; lParam: LParam tun weiß ich nicht!

Hoffe ihr könnt mir helfen.
Jonas
Wenn mich jemand sucht, ich bin im Kühlschrank!

Informationen über das Duale Studium
www.jofre.de
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:36 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz