mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 10:19:16 +02:00
win32: don't perform 'is TCustomFloatSpinEdit' comparisons in code. Therefore empty application does not contains spinedit code anymore (and executable is 12Kb smaller)
git-svn-id: trunk@23624 -
This commit is contained in:
parent
46bb53cc00
commit
9d6fb42169
@ -249,7 +249,7 @@ uses
|
||||
Win32WSStdCtrls,
|
||||
Win32Themes,
|
||||
////////////////////////////////////////////////////
|
||||
Arrow, Calendar, Spin, CheckLst, Win32Extra, LclProc, LCLMessageGlue;
|
||||
Arrow, Calendar, CheckLst, Win32Extra, LclProc, LCLMessageGlue;
|
||||
|
||||
type
|
||||
TMouseDownFocusStatus = (mfNone, mfFocusSense, mfFocusChanged);
|
||||
|
@ -55,6 +55,7 @@ Type
|
||||
isComboEdit: boolean; // is buddy of combobox, the edit control
|
||||
isChildEdit: boolean; // is buddy edit of a control
|
||||
isGroupBox: boolean; // is groupbox, and does not have themed tabpage as parent
|
||||
askBuddyCoords: boolean; // ask buddy window about position and size
|
||||
ThemedCustomDraw: boolean;// controls needs themed drawing in wm_notify/nm_customdraw
|
||||
MaxLength: integer;
|
||||
DrawItemIndex: integer; // in case of listbox, when handling WM_DRAWITEM
|
||||
|
@ -2251,7 +2251,7 @@ var
|
||||
begin
|
||||
Result := False;
|
||||
WindowInfo := GetWin32WindowInfo(Handle);
|
||||
if (WindowInfo^.WinControl is TCustomFloatSpinEdit) then
|
||||
if WindowInfo^.askBuddyCoords then
|
||||
Handle := Windows.SendMessage(Handle, UDM_GETBUDDY, 0, 0);
|
||||
|
||||
if IsIconic(Handle) and GetWindowPlacement(Handle, @WindowPlacement) then
|
||||
@ -2299,8 +2299,8 @@ var
|
||||
BuddyWP: WINDOWPLACEMENT;
|
||||
begin
|
||||
BuddyHandle := Windows.SendMessage(Handle, UDM_GETBUDDY, 0, 0);
|
||||
if (BuddyHandle<>HWND(nil)) and Windows.GetWindowPlacement(BuddyHandle, BuddyWP)
|
||||
then Width := WP.rcNormalPosition.Right - BuddyWP.rcNormalPosition.Left;
|
||||
if (BuddyHandle<>HWND(nil)) and Windows.GetWindowPlacement(BuddyHandle, BuddyWP) then
|
||||
Width := WP.rcNormalPosition.Right - BuddyWP.rcNormalPosition.Left;
|
||||
end;
|
||||
|
||||
procedure ExcludeCaption; inline;
|
||||
@ -2382,7 +2382,7 @@ begin
|
||||
|
||||
ExcludeCaption;
|
||||
|
||||
if (WindowInfo^.WinControl is TCustomFloatSpinEdit) then
|
||||
if WindowInfo^.askBuddyCoords then
|
||||
AdjustForBuddySize;
|
||||
end;
|
||||
|
||||
|
@ -194,7 +194,8 @@ begin
|
||||
// init buddy
|
||||
Params.SubClassWndProc := @SpinBuddyWindowProc;
|
||||
WindowCreateInitBuddy(AWinControl, Params);
|
||||
Params.BuddyWindowInfo^.isChildEdit := true;
|
||||
Params.BuddyWindowInfo^.isChildEdit := True;
|
||||
Params.WindowInfo^.askBuddyCoords := True;
|
||||
// make possible LCL Wincontrol identification by Buddy handle
|
||||
// TODO: should move to widget specific SetProp method
|
||||
SetProp(Params.Buddy, 'WinControl', PtrUInt(AWinControl));
|
||||
|
Loading…
Reference in New Issue
Block a user