mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-23 19:30:21 +02:00
fix sizing when menu is attached to window
git-svn-id: trunk@5471 -
This commit is contained in:
parent
d916890343
commit
664f41ac03
@ -1251,10 +1251,16 @@ end;
|
||||
procedure TWin32WidgetSet.AttachMenuToWindow(AMenuObject: TComponent);
|
||||
var
|
||||
AMenu: TMenu;
|
||||
AWinControl: TWinControl;
|
||||
begin
|
||||
AMenu := AMenuObject as TMenu;
|
||||
if AMenu.FCompStyle = csMainMenu then
|
||||
Windows.SetMenu(TWinControl(AMenu.Owner).Handle, AMenu.Handle);
|
||||
begin
|
||||
AWinControl := TWinControl(AMenu.Owner);
|
||||
Windows.SetMenu(AWinControl.Handle, AMenu.Handle);
|
||||
// inform LCL of changed client size
|
||||
AWinControl.DoAdjustClientRectChange;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ Private methods (in no significant order) }
|
||||
@ -2953,6 +2959,9 @@ End;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.193 2004/05/14 15:20:47 micha
|
||||
fix sizing when menu is attached to window
|
||||
|
||||
Revision 1.192 2004/05/12 15:11:46 micha
|
||||
fix sizing/non-sizing border sizes
|
||||
|
||||
|
@ -568,7 +568,7 @@ begin
|
||||
if SendSizeMsgOnDiff then begin
|
||||
//writeln('LCLBoundsNeedsUpdate B ',TheWinControl.Name,':',TheWinControl.ClassName,' Sending WM_SIZE');
|
||||
Sender.InvalidateClientRectCache(true);
|
||||
SendMessage(Window, WM_SIZE, 0, MakeLParam(IntfWidth, IntfHeight));
|
||||
Windows.PostMessage(Window, WM_SIZE, 0, MakeLParam(IntfWidth, IntfHeight));
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -761,6 +761,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.41 2004/05/14 15:20:47 micha
|
||||
fix sizing when menu is attached to window
|
||||
|
||||
Revision 1.40 2004/05/12 15:11:46 micha
|
||||
fix sizing/non-sizing border sizes
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user