- This topic has 2 replies, 2 voices, and was last updated 15 years, 2 months ago by Insfin from Australia.
-
AuthorPosts
-
August 17, 2009 at 5:46 am #33191Insfin from AustraliaParticipant
Hi Serge,
Please run P04.exe inside Post3_Reproduce.zip.
Now please click on “Maximise” button.
Did you see that it leaves gap on top? We think this gap is about 4 pixels.
It is supposed to cover the entire monitor work area.
The bug is in method TsSkinProvider.AC_WMGetMinMaxInfo(…)
Original — procedure TsSkinProvider.AC_WMGetMinMaxInfo(var Message: TWMGetMinMaxInfo);
CODEprocedure TsSkinProvider.AC_WMGetMinMaxInfo(var Message: TWMGetMinMaxInfo);
var
R : TRect;
sbwf, yOffs : integer;
begin
if FDrawNonClientArea {and SkinData.SkinManager.ExtendedBorders {and (BorderForm <> nil)} { Extended borders are used } and (Form.FormStyle <> fsMDIChild) and (Form.Parent = nil) then begin
R := acWorkRect(Form);
sbwf := SysBorderWidth(Form.Handle, BorderForm, False);
if CaptionHeight(True) > CaptionHeight(False) + sbwf
then yOffs := CaptionHeight(True) – CaptionHeight(False) – sbwf
else yOffs := sbwf;
Message.MinMaxInfo^.ptMaxPosition.Y := yOffs – sbwf;
sbwf := sbwf * 2;
Message.MinMaxInfo^.ptMaxSize.Y := HeightOf(R) – yOffs + sbwf;
Message.MinMaxInfo^.ptMaxSize.X := WidthOf(R) + sbwf;
Message.Result := 0;
end;
OldWndProc(TMessage(Message));
end;It seems that the calculation of yOffs is wrong? Would you be able to have a look
into this?It seems that you need to check that the form has caption before assigning value to yOffs.
Otherwise just leaves it at 0. And hence our modifications below. Now, if you compile
the demo project with our mods, “Maximise” would cover the entire monitor work area.We are not sure if this is correct? What were the adjustments originally for?
Would you please kindly have a look into this?
Please note that we do not want to set our form border style to bsNone!
Our modification — procedure TsSkinProvider.AC_WMGetMinMaxInfo(var Message: TWMGetMinMaxInfo);
CODEprocedure TsSkinProvider.AC_WMGetMinMaxInfo(var Message: TWMGetMinMaxInfo);
var
R : TRect;
sbwf, yOffs : integer;
begin
if FDrawNonClientArea and (Form.FormStyle <> fsMDIChild) and (Form.Parent = nil) then
begin
R := acWorkRect(Form);
sbwf := SysBorderWidth(Form.Handle, BorderForm, False);if ( (GetWindowLong(Form.Handle, GWL_STYLE) and WS_CAPTION = WS_CAPTION) ) then
begin
if CaptionHeight(True) > CaptionHeight(False) + sbwf then
yOffs := CaptionHeight(True) – CaptionHeight(False) – sbwf
else
yOffs := sbwf;
end
else
yOffs := 0;Message.MinMaxInfo^.ptMaxPosition.Y := yOffs – sbwf;
sbwf := sbwf * 2;
Message.MinMaxInfo^.ptMaxSize.Y := HeightOf(R) – yOffs + sbwf;Message.MinMaxInfo^.ptMaxSize.X := WidthOf(R) + sbwf;
Message.Result := 0;
end;
OldWndProc(TMessage(Message));
end;Best regards,
Be Hai Nguyen.
August 17, 2009 at 10:32 am #40223SupportKeymasterThank you for example, I'll check it today or tomorrow.
September 21, 2009 at 4:53 am #40520Insfin from AustraliaParticipantThis appears to be fixed in version 6.44.
Thank you and best regards.
-
AuthorPosts
- You must be logged in to reply to this topic.