constructor TTrayMenu.Create(AOwner: TComponent);
begin
inherited;
//在IDE环境下是不是不用....
if csDesigning in ComponentState then
begin
OldWndProc := Pointer(GetWindowLong(Application.Handle, GWL_WNDPROC));
SetWindowLong(Application.Handle, GWL_WNDPROC, longint(@NewWndProc));
OldProc := Pointer(GetWindowLong(Application.Handle, GWL_WNDPROC));
SetWindowLong(Application.Handle, GWL_WNDPROC, Longint(MakeObjectInstance(WndProc)));
FHWND := TForm(AOwner).Handle;
OldFormWndProc := Pointer(GetWindowLong(FHWND, GWL_WNDPROC));
SetWindowLong(FHWND, GWL_WNDPROC, Longint(MakeObjectInstance(WndFormProc)));
end;
FActiveFormMenu := False;
FActiveTrayMenu := False;
ActiveMenu := False;
end;
声明,我不是高手。