if not (csDesigning in ComponentState) then begin if (m_Form.FormStyle <> fsMDIChild) and (m_Form.FormStyle <> fsMDIForm) then m_Form.BorderStyle := bsNone; m_Form.AutoScroll := false; //关键代码 m_PrevParentWndProc := Pointer(GetWindowLong(TForm(Owner).Handle, GWL_WNDPROC)); P := MakeObjectInstance(NewParentWndProc); SetWindowLong(TForm(AOwner).Handle, GWL_WNDPROC, LongInt(P)); SetWindowLong(m_Form.Handle, GWL_STYLE, GETWINDOWLONG(m_Form.Handle, GWL_STYLE) and (not WS_CAPTION)); if not Assigned(Application.OnMessage) then begin m_AppOnMsgAssigned := true; Application.OnMessage := OnApplicationMessage; end; end suiForm把form的scroll给禁止掉了。
begin
if (m_Form.FormStyle <> fsMDIChild) and (m_Form.FormStyle <> fsMDIForm) then
m_Form.BorderStyle := bsNone; m_Form.AutoScroll := false; //关键代码 m_PrevParentWndProc := Pointer(GetWindowLong(TForm(Owner).Handle, GWL_WNDPROC));
P := MakeObjectInstance(NewParentWndProc);
SetWindowLong(TForm(AOwner).Handle, GWL_WNDPROC, LongInt(P));
SetWindowLong(m_Form.Handle, GWL_STYLE, GETWINDOWLONG(m_Form.Handle, GWL_STYLE) and (not WS_CAPTION)); if not Assigned(Application.OnMessage) then
begin
m_AppOnMsgAssigned := true;
Application.OnMessage := OnApplicationMessage;
end;
end
suiForm把form的scroll给禁止掉了。