Thema: Delphi SetCapture

Einzelnen Beitrag anzeigen

MatthiasW

Registriert seit: 29. Jan 2003
Ort: Reichenbach
253 Beiträge
 
Delphi 2009 Professional
 
#3

Re: SetCapture

  Alt 25. Jan 2005, 13:26
Zitat von toms:
Hast du schon eine Lösung gefunden?
ja habe ich. Sorry das ich erst jetzt antworte. Es kommt darauf an das der Handle des Application - Objects verwendet wird.

Delphi-Quellcode:
  //start subclassing
  OldWndProc := Pointer(SetWindowLong(Application.Handle, GWL_WNDPROC,
                       Integer(@CalenderBoxWindowProc)));
  //all mouse message to this control
  SetCapture(Application.Handle);

function CalenderBoxWindowProc(wnd: HWND; Msg: Cardinal; wParam, lParam: Integer): Integer; stdcall;
begin
  //subclassing procedure for the mouse events if colorbox is showing
  case Msg of
    WM_LBUTTONDOWN:
    begin
      //code der ausgeführt werden soll wenn die mouse betätigt wird
    end;
  end;
end;
Hilfe wir stürzen ab!!!
  Mit Zitat antworten Zitat