mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-05 07:38:15 +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;
|
||||
End;
|
||||
|
||||
const
|
||||
// needs to move
|
||||
MCM_FIRST = $1000;
|
||||
MCM_GETMINREQRECT = MCM_FIRST + 9;
|
||||
|
||||
|
||||
var
|
||||
OnClipBoardRequest: TClipboardRequestEvent;
|
||||
|
||||
@ -280,6 +286,9 @@ End.
|
||||
{ =============================================================================
|
||||
|
||||
$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
|
||||
fix bug 558: title bar redraw (win32)
|
||||
USE_SYNCHRONIZE enabled per default for 1.9.x
|
||||
|
@ -545,6 +545,7 @@ Var
|
||||
OldLeft: Integer;
|
||||
OldTop: Integer;
|
||||
{$ENDIF}
|
||||
lRect: TRect;
|
||||
WinHandle, BuddyHandle: HWND;
|
||||
StringList: TWin32ComboBoxStringList;
|
||||
suppressMove: boolean;
|
||||
@ -592,6 +593,12 @@ Begin
|
||||
StringList := TWin32ComboBoxStringList(GetWindowInfo(WinHandle)^.List);
|
||||
if StringList <> nil then
|
||||
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;
|
||||
|
||||
@ -719,6 +726,9 @@ end;
|
||||
|
||||
{
|
||||
$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
|
||||
use 0 icon handle for bsdialog forms
|
||||
|
||||
|
@ -56,6 +56,9 @@ type
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
Win32Int, InterfaceBase;
|
||||
|
||||
{ TWin32WSCalendar }
|
||||
|
||||
function TWin32WSCalendar.CreateHandle(const AWinControl: TWinControl;
|
||||
@ -76,6 +79,8 @@ begin
|
||||
// create window
|
||||
FinishCreateWindow(AWinControl, Params, false);
|
||||
Result := Params.Window;
|
||||
// resize to proper size
|
||||
TWin32WidgetSet(InterfaceObject).ResizeChild(AWinControl, Params.Left, Params.Top, 0, 0);
|
||||
end;
|
||||
|
||||
function TWin32WSCalendar.GetDateTime(const ACalendar: TCustomCalendar): TDateTime;
|
||||
|
Loading…
Reference in New Issue
Block a user