WndProc中关于inherited的位置
procedure TfrmScreenSnapRect.WndProc(var Msg :TMessage);
begin
//位置1:inherited;
case Msg.Msg of
WM_NCHITTEST
begin
if TWMNCHitTest(Msg).Result = htClient then
TWMNCHitTest(Msg).Result := htCaption;
end;
WM_LBUTTONDBLCLK:
begin
ModalResult := mrOk;
end;
end;
inherited;//位置2
end;
inherited在
位置1时WM_NCHITTEST响应,WM_LBUTTONDBLCLK不响应
位置2时WM_NCHITTEST不响应,TWMNCHitTest(Msg).Result=0,WM_LBUTTONDBLCLK不响应
请问如何让他们都能正确响应?
分不多,希望大家指点一下,谢谢