mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 21:16:32 +02:00
force default width and height for calendar control
git-svn-id: trunk@6764 -
This commit is contained in:
parent
a82ee71336
commit
66e4a148ca
@ -249,6 +249,12 @@ type
|
|||||||
Next: PLazObject;
|
Next: PLazObject;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
const
|
||||||
|
// needs to move
|
||||||
|
MCM_FIRST = $1000;
|
||||||
|
MCM_GETMINREQRECT = MCM_FIRST + 9;
|
||||||
|
|
||||||
|
|
||||||
var
|
var
|
||||||
OnClipBoardRequest: TClipboardRequestEvent;
|
OnClipBoardRequest: TClipboardRequestEvent;
|
||||||
|
|
||||||
@ -280,6 +286,9 @@ End.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.132 2005/02/07 16:19:14 micha
|
||||||
|
force default width and height for calendar control
|
||||||
|
|
||||||
Revision 1.131 2005/01/15 10:09:23 micha
|
Revision 1.131 2005/01/15 10:09:23 micha
|
||||||
fix bug 558: title bar redraw (win32)
|
fix bug 558: title bar redraw (win32)
|
||||||
USE_SYNCHRONIZE enabled per default for 1.9.x
|
USE_SYNCHRONIZE enabled per default for 1.9.x
|
||||||
|
@ -545,6 +545,7 @@ Var
|
|||||||
OldLeft: Integer;
|
OldLeft: Integer;
|
||||||
OldTop: Integer;
|
OldTop: Integer;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
lRect: TRect;
|
||||||
WinHandle, BuddyHandle: HWND;
|
WinHandle, BuddyHandle: HWND;
|
||||||
StringList: TWin32ComboBoxStringList;
|
StringList: TWin32ComboBoxStringList;
|
||||||
suppressMove: boolean;
|
suppressMove: boolean;
|
||||||
@ -592,6 +593,12 @@ Begin
|
|||||||
StringList := TWin32ComboBoxStringList(GetWindowInfo(WinHandle)^.List);
|
StringList := TWin32ComboBoxStringList(GetWindowInfo(WinHandle)^.List);
|
||||||
if StringList <> nil then
|
if StringList <> nil then
|
||||||
Height := StringList.ComboHeight;
|
Height := StringList.ComboHeight;
|
||||||
|
end else
|
||||||
|
if Sender is TCustomCalendar then
|
||||||
|
begin
|
||||||
|
Windows.SendMessage(WinHandle, MCM_GETMINREQRECT, 0, LPARAM(@lRect));
|
||||||
|
Width := lRect.Right;
|
||||||
|
Height := lRect.Bottom;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -719,6 +726,9 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.307 2005/02/07 16:19:14 micha
|
||||||
|
force default width and height for calendar control
|
||||||
|
|
||||||
Revision 1.306 2005/01/31 17:09:17 micha
|
Revision 1.306 2005/01/31 17:09:17 micha
|
||||||
use 0 icon handle for bsdialog forms
|
use 0 icon handle for bsdialog forms
|
||||||
|
|
||||||
|
@ -56,6 +56,9 @@ type
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
Win32Int, InterfaceBase;
|
||||||
|
|
||||||
{ TWin32WSCalendar }
|
{ TWin32WSCalendar }
|
||||||
|
|
||||||
function TWin32WSCalendar.CreateHandle(const AWinControl: TWinControl;
|
function TWin32WSCalendar.CreateHandle(const AWinControl: TWinControl;
|
||||||
@ -76,6 +79,8 @@ begin
|
|||||||
// create window
|
// create window
|
||||||
FinishCreateWindow(AWinControl, Params, false);
|
FinishCreateWindow(AWinControl, Params, false);
|
||||||
Result := Params.Window;
|
Result := Params.Window;
|
||||||
|
// resize to proper size
|
||||||
|
TWin32WidgetSet(InterfaceObject).ResizeChild(AWinControl, Params.Left, Params.Top, 0, 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TWin32WSCalendar.GetDateTime(const ACalendar: TCustomCalendar): TDateTime;
|
function TWin32WSCalendar.GetDateTime(const ACalendar: TCustomCalendar): TDateTime;
|
||||||
|
Loading…
Reference in New Issue
Block a user