win32: rename TWindowInfo -> TWin32WindowInfo, GetWindowInfo -> GetWin32WindowInfo, etc because of conflict with winapi functions and structures

git-svn-id: trunk@20836 -
This commit is contained in:
paul 2009-07-12 04:27:59 +00:00
parent 319321c0d4
commit 87a2fea05c
12 changed files with 82 additions and 82 deletions

View File

@ -91,7 +91,7 @@ function CallDefaultWindowProc(Window: HWnd; Msg: UInt; WParam: Windows.WParam;
Exit;
Info.cbSize := SizeOf(Info);
Win32Extra.GetComboBoxInfo(Window, @Info);
Result := (Info.hwndItem <> 0) and GetWindowInfo(Info.hwndItem)^.isComboEdit;
Result := (Info.hwndItem <> 0) and GetWin32WindowInfo(Info.hwndItem)^.isComboEdit;
end;
var
PrevWndProc: Windows.WNDPROC;
@ -105,7 +105,7 @@ begin
if depthLen > 0 then
MessageStackDepth[depthLen] := '#';
{$endif}
PrevWndProc := GetWindowInfo(Window)^.DefWndProc;
PrevWndProc := GetWin32WindowInfo(Window)^.DefWndProc;
if (PrevWndProc = nil) or (PrevWndProc = @WindowProc) // <- prevent recursion
then begin
if UnicodeEnabledOS
@ -198,7 +198,7 @@ begin
Result := (-3 <= moveX) and (moveX <= 3) and (-3 <= moveY) and (moveY <= 3);
end;
function GetNeedParentPaint(AWindowInfo: PWindowInfo; AWinControl: TWinControl): boolean;
function GetNeedParentPaint(AWindowInfo: PWin32WindowInfo; AWinControl: TWinControl): boolean;
begin
Result := AWindowInfo^.needParentPaint
and ((AWinControl = nil) or not (csOpaque in AWinControl.ControlStyle));
@ -232,14 +232,14 @@ var
P: TPoint;
NewLeft, NewTop, NewWidth, NewHeight: integer;
lWinControl, ChildWinControl: TWinControl;
ChildWindowInfo: PWindowInfo;
ChildWindowInfo: PWin32WindowInfo;
TargetObject: TObject;
WinProcess: Boolean;
NotifyUserInput: Boolean;
OverlayWindow: HWND;
TargetWindow: HWND;
eraseBkgndCommand: TEraseBkgndCommand;
WindowInfo: PWindowInfo;
WindowInfo: PWin32WindowInfo;
Flags: dword;
WindowDC: HDC;
@ -265,7 +265,7 @@ var
PageIndex, Flags: Integer;
PageHandle: HWND;
begin
Notebook := GetWindowInfo(NotebookHandle)^.WinControl as TCustomNotebook;
Notebook := GetWin32WindowInfo(NotebookHandle)^.WinControl as TCustomNotebook;
PageIndex := Windows.SendMessage(NotebookHandle, TCM_GETCURSEL, 0, 0);
PageIndex := NotebookPageRealToLCLIndex(Notebook, PageIndex);
if PageIndex = -1 then exit;
@ -376,7 +376,7 @@ var
// do not use default deliver message
if lWinControl = nil then
begin
lWinControl := GetWindowInfo(Window)^.PWinControl;
lWinControl := GetWin32WindowInfo(Window)^.PWinControl;
if lWinControl = nil then exit;
end;
@ -396,7 +396,7 @@ var
while (ParentPaintWindow <> 0) and not lNotebookFound do
begin
// notebook is parent of window that has istabpage
if GetWindowInfo(ParentPaintWindow)^.isTabPage then
if GetWin32WindowInfo(ParentPaintWindow)^.isTabPage then
lNotebookFound := true;
ParentPaintWindow := Windows.GetParent(ParentPaintWindow);
end;
@ -698,7 +698,7 @@ var
begin
ScrollbarHandle := HWND(LParam);
if ScrollbarHandle<>0 then
lWinControl := GetWindowInfo(ScrollbarHandle)^.WinControl;
lWinControl := GetWin32WindowInfo(ScrollbarHandle)^.WinControl;
if lWinControl is TCustomTrackBar then
begin
LMessage.Msg := LM_CHANGED;
@ -910,9 +910,9 @@ var
procedure HandleSpinEditChange(ASpinEdit: TCustomFloatSpinEdit);
var
lWindowInfo: PWindowInfo;
lWindowInfo: PWin32WindowInfo;
begin
lWindowInfo := GetWindowInfo(ASpinEdit.Handle);
lWindowInfo := GetWin32WindowInfo(ASpinEdit.Handle);
if lWindowInfo = @DefaultWindowInfo then exit;
lWindowInfo^.spinValue := ASpinEdit.StrToValue(ASpinEdit.Text);
@ -1210,7 +1210,7 @@ begin
NotifyUserInput := False;
Assert(False, 'Trace:WindowProc - Getting Object with Callback Procedure');
WindowInfo := GetWindowInfo(Window);
WindowInfo := GetWin32WindowInfo(Window);
if WindowInfo^.isChildEdit then
begin
// combobox child edit weirdness
@ -1409,10 +1409,10 @@ begin
end;
end
else begin
lWinControl := GetWindowInfo(HWND(LParam))^.WinControl;
lWinControl := GetWin32WindowInfo(HWND(LParam))^.WinControl;
// buddy controls use 'awincontrol' to designate associated wincontrol
if lWinControl = nil then
lWinControl := GetWindowInfo(HWND(LParam))^.AWinControl;
lWinControl := GetWin32WindowInfo(HWND(LParam))^.AWinControl;
if lWinControl is TCustomCheckbox then begin
case HIWORD(WParam) of
@ -1503,7 +1503,7 @@ begin
// others need to erased with their window color
// scrollbar also has buttons
WindowDC := HDC(WParam);
ChildWindowInfo := GetWindowInfo(HWND(LParam));
ChildWindowInfo := GetWin32WindowInfo(HWND(LParam));
ChildWinControl := ChildWindowInfo^.WinControl;
if ChildWinControl = nil then
ChildWinControl := ChildWindowInfo^.AWinControl;
@ -1588,7 +1588,7 @@ begin
end;
// TODO: this could crash for a MenuItem.
WindowInfo := GetWindowInfo(PDrawItemStruct(LParam)^.hwndItem);
WindowInfo := GetWin32WindowInfo(PDrawItemStruct(LParam)^.hwndItem);
if WindowInfo^.WinControl<>nil then
lWinControl := WindowInfo^.WinControl;
{$IFDEF MSG_DEBUG}
@ -1975,7 +1975,7 @@ begin
// check if the window is an edit control of a combobox, if so,
// redirect it to the combobox, not the edit control
if GetWindowInfo(TargetWindow)^.isComboEdit then
if GetWin32WindowInfo(TargetWindow)^.isComboEdit then
TargetWindow := Windows.GetParent(TargetWindow);
// check InMouseWheelRedirection to prevent recursion
@ -2058,7 +2058,7 @@ begin
end;
WM_NOTIFY:
begin
WindowInfo := GetWindowInfo(PNMHdr(LParam)^.hwndFrom);
WindowInfo := GetWin32WindowInfo(PNMHdr(LParam)^.hwndFrom);
{$ifdef MSG_DEBUG}
DebugLn([MessageStackDepth, 'Notify code: ', PNMHdr(LParam)^.code]);
{$endif}
@ -2489,7 +2489,7 @@ begin
(WParam = Size_Restored) then
lWinControl.DoAdjustClientRectChange(False);
end;
OverlayWindow := GetWindowInfo(Window)^.Overlay;
OverlayWindow := GetWin32WindowInfo(Window)^.Overlay;
if OverlayWindow <> 0 then
Windows.SetWindowPos(OverlayWindow, HWND_TOP, 0, 0, NewWidth, NewHeight, SWP_NOMOVE);
end;
@ -2609,7 +2609,7 @@ begin
if LMNotify.Result = 0 then
ShowHideTabPage(HWndFrom, False);
TCN_SELCHANGE:
NotebookFocusNewControl(GetWindowInfo(hwndFrom)^.WinControl as TCustomNotebook, idFrom);
NotebookFocusNewControl(GetWin32WindowInfo(hwndFrom)^.WinControl as TCustomNotebook, idFrom);
end;
end;
@ -2777,7 +2777,7 @@ begin
// Check if overlayed control want to handle mouse messages
Parent := Windows.GetParent(Window);
Owner := GetWindowInfo(Parent)^.WinControl;
Owner := GetWin32WindowInfo(Parent)^.WinControl;
P.x := GET_X_LPARAM(lParam);
P.y := GET_Y_LPARAM(lParam);
Windows.ScreenToClient(Parent, P);

View File

@ -369,7 +369,7 @@ begin
begin
while PeekMessage(AMessage, HWnd(nil), 0, 0, PM_REMOVE) do
begin
AccelTable := GetWindowInfo(AMessage.HWnd)^.Accel;
AccelTable := GetWin32WindowInfo(AMessage.HWnd)^.Accel;
if (AccelTable = HACCEL(nil))
or (TranslateAccelerator(AMessage.HWnd, AccelTable, @AMessage) = 0) then
begin
@ -726,7 +726,7 @@ var
Flags: dword;
begin
Handle := ObjectToHWND(Sender);
ParentPanel := GetWindowInfo(Handle)^.ParentPanel;
ParentPanel := GetWin32WindowInfo(Handle)^.ParentPanel;
if ParentPanel <> 0 then
Handle := ParentPanel;
if TControl(Sender).HandleObjectShouldBeVisible then

View File

@ -34,8 +34,8 @@ uses
Type
TEventType = (etNotify, etKey, etKeyPress, etMouseWheel, etMouseUpDown);
PWindowInfo = ^TWindowInfo;
TWindowInfo = record
PWin32WindowInfo = ^TWin32WindowInfo;
TWin32WindowInfo = record
AccelGroup: HACCEL;
Accel: HACCEL;
Overlay: HWND; // overlay, transparent window on top, used by designer
@ -96,9 +96,9 @@ function BorderStyleToWin32Flags(Style: TFormBorderStyle): DWORD;
function BorderStyleToWin32FlagsEx(Style: TFormBorderStyle): DWORD;
function GetDesigningBorderStyle(const AForm: TCustomForm): TFormBorderStyle;
function AllocWindowInfo(Window: HWND): PWindowInfo;
function AllocWindowInfo(Window: HWND): PWin32WindowInfo;
function DisposeWindowInfo(Window: HWND): boolean;
function GetWindowInfo(Window: HWND): PWindowInfo;
function GetWin32WindowInfo(Window: HWND): PWin32WindowInfo;
procedure RemoveStayOnTopFlags(Window: HWND);
procedure RestoreStayOnTopFlags(Window: HWND);
@ -149,7 +149,7 @@ type
);
var
DefaultWindowInfo: TWindowInfo;
DefaultWindowInfo: TWin32WindowInfo;
WindowInfoAtom: ATOM;
ChangedMenus: TList; // list of HWNDs which menus needs to be redrawn
UnicodeEnabledOS: Boolean = False;
@ -741,10 +741,10 @@ end;
// ----------------------------------------------------------------------
procedure SetAccelGroup(Const Control: HWND; Const AnAccelGroup: HACCEL);
var
WindowInfo: PWindowInfo;
WindowInfo: PWin32WindowInfo;
begin
Assert(False, 'Trace:TODO: Code SetAccelGroup');
WindowInfo := GetWindowInfo(Control);
WindowInfo := GetWin32WindowInfo(Control);
if WindowInfo <> @DefaultWindowInfo then
begin
WindowInfo^.AccelGroup := AnAccelGroup;
@ -756,7 +756,7 @@ end;
function GetAccelGroup(Const Control: HWND): HACCEL;
begin
Assert(False, 'Trace:TODO: Code GetAccelGroup');
Result := GetWindowInfo(Control)^.AccelGroup;
Result := GetWin32WindowInfo(Control)^.AccelGroup;
end;
procedure SetAccelKey(Window: HWND; Const CommandId: Word; Const AKey: word; Const AModifier: TShiftState);
@ -792,9 +792,9 @@ var AccelCount: integer; {number of accelerators in table}
end;
var
WindowInfo: PWindowInfo;
WindowInfo: PWin32WindowInfo;
begin
WindowInfo := GetWindowInfo(Window);
WindowInfo := GetWin32WindowInfo(Window);
OldAccel := WindowInfo^.Accel;
NullAccel := nil;
AccelCount := CopyAcceleratorTable(OldAccel, NullAccel, 0);
@ -825,7 +825,7 @@ end;
function GetAccelKey(Const Control: HWND): LPACCEL;
begin
Assert(False, 'Trace:TODO: Code GetAccelKey');
//Result := GetWindowInfo(Control)^.AccelKey;
//Result := GeWin32tWindowInfo(Control)^.AccelKey;
Result := nil;
end;
@ -909,7 +909,7 @@ function GetLCLClientBoundsOffset(Handle: HWnd; var Rect: TRect): boolean;
var
OwnerObject: TObject;
begin
OwnerObject := GetWindowInfo(Handle)^.WinControl;
OwnerObject := GetWin32WindowInfo(Handle)^.WinControl;
Result:=GetLCLClientBoundsOffset(OwnerObject, Rect);
end;
@ -1017,9 +1017,9 @@ begin
Result := AForm.BorderStyle;
end;
function AllocWindowInfo(Window: HWND): PWindowInfo;
function AllocWindowInfo(Window: HWND): PWin32WindowInfo;
var
WindowInfo: PWindowInfo;
WindowInfo: PWin32WindowInfo;
begin
New(WindowInfo);
FillChar(WindowInfo^, sizeof(WindowInfo^), 0);
@ -1030,9 +1030,9 @@ end;
function DisposeWindowInfo(Window: HWND): boolean;
var
WindowInfo: PWindowInfo;
WindowInfo: PWin32WindowInfo;
begin
WindowInfo := PWindowInfo(Windows.GetProp(Window, PChar(PtrUInt(WindowInfoAtom))));
WindowInfo := PWin32WindowInfo(Windows.GetProp(Window, PChar(PtrUInt(WindowInfoAtom))));
Result := Windows.RemoveProp(Window, PChar(PtrUInt(WindowInfoAtom)))<>0;
if Result then
begin
@ -1041,9 +1041,9 @@ begin
end;
end;
function GetWindowInfo(Window: HWND): PWindowInfo;
function GetWin32WindowInfo(Window: HWND): PWin32WindowInfo;
begin
Result := PWindowInfo(Windows.GetProp(Window, PChar(PtrUInt(WindowInfoAtom))));
Result := PWin32WindowInfo(Windows.GetProp(Window, PChar(PtrUInt(WindowInfoAtom))));
if Result = nil then
Result := @DefaultWindowInfo;
end;
@ -1066,7 +1066,7 @@ end;
procedure RemoveStayOnTopFlags(Window: HWND);
var
StayOnTopWindowsInfo: PStayOnTopWindowsInfo;
WindowInfo: PWindowInfo;
WindowInfo: PWin32WindowInfo;
begin
// WriteLn('RemoveStayOnTopFlags 1');
if InRemoveStayOnTopFlags = 0 then
@ -1074,7 +1074,7 @@ begin
New(StayOnTopWindowsInfo);
StayOnTopWindowsInfo^.AppWindow := Window;
StayOnTopWindowsInfo^.StayOnTopList := TList.Create;
WindowInfo := GetWindowInfo(Window);
WindowInfo := GetWin32WindowInfo(Window);
WindowInfo^.StayOnTopList := StayOnTopWindowsInfo^.StayOnTopList;
EnumThreadWindows(GetWindowThreadProcessId(Window, nil),
@EnumStayOnTopRemove, LPARAM(StayOnTopWindowsInfo));
@ -1086,13 +1086,13 @@ end;
procedure RestoreStayOnTopFlags(Window: HWND);
var
WindowInfo: PWindowInfo;
WindowInfo: PWin32WindowInfo;
I: integer;
begin
// WriteLn('RestoreStayOnTopFlags 1');
if InRemoveStayOnTopFlags = 1 then
begin
WindowInfo := GetWindowInfo(Window);
WindowInfo := GetWin32WindowInfo(Window);
if WindowInfo^.StayOnTopList <> nil then
begin
for I := 0 to WindowInfo^.StayOnTopList.Count - 1 do

View File

@ -1800,9 +1800,9 @@ function TWin32WidgetSet.GetDesignerDC(WindowHandle: HWND): HDC;
var
OverlayWindow: HWND;
ARect: Windows.RECT;
WindowInfo, OverlayWindowInfo: PWindowInfo;
WindowInfo, OverlayWindowInfo: PWin32WindowInfo;
begin
WindowInfo := GetWindowInfo(WindowHandle);
WindowInfo := GetWin32WindowInfo(WindowHandle);
OverlayWindow := WindowInfo^.Overlay;
if OverlayWindow = HWND(nil) then
begin
@ -2264,10 +2264,10 @@ var
LeftTop:TPoint;
R: TRect;
ParentHandle: THandle;
WindowInfo: PWindowInfo;
WindowInfo: PWin32WindowInfo;
begin
Result:=false;
WindowInfo := GetWindowInfo(Handle);
WindowInfo := GetWin32WindowInfo(Handle);
if (WindowInfo^.WinControl is TCustomFloatSpinEdit) then
Handle := Windows.SendMessage(Handle, UDM_GETBUDDY, 0, 0);
if not Windows.GetWindowRect(Handle,@R) then exit;
@ -2300,7 +2300,7 @@ var
WP: WINDOWPLACEMENT;
R: TRect;
Style, ExStyle: PtrInt;
WindowInfo: PWindowInfo;
WindowInfo: PWin32WindowInfo;
procedure AdjustForBuddySize;
var
@ -2335,7 +2335,7 @@ begin
end;
end;
WindowInfo := GetWindowInfo(Handle);
WindowInfo := GetWin32WindowInfo(Handle);
// convert top level lcl window coordinaties to win32 coord
Style := GetWindowLong(Handle, GWL_STYLE);
@ -2825,7 +2825,7 @@ var
OverlayWindow: HWND;
begin
Assert(False, Format('Trace:> [TWin32WidgetSet.ReleaseDC] DC:0x%x', [DC]));
OverlayWindow := GetWindowInfo(Window)^.Overlay;
OverlayWindow := GetWin32WindowInfo(Window)^.Overlay;
if OverlayWindow <> HWND(nil) then
Result := Windows.ReleaseDC(OverlayWindow, DC);
Assert(False, Format('Trace:< [TWin32WidgetSet.ReleaseDC] DC:0x%x', [DC]));

View File

@ -475,10 +475,10 @@ end;
function BitBtnWndProc(Window: HWnd; Msg: UInt; WParam: Windows.WParam;
LParam: Windows.LParam): LResult; stdcall;
var
Info: PWindowInfo;
Info: PWin32WindowInfo;
Control: TWinControl;
begin
Info := GetWindowInfo(Window);
Info := GetWin32WindowInfo(Window);
if (Info = nil) or (Info^.WinControl = nil) then
begin
Result := CallDefaultWindowProc(Window, Msg, WParam, LParam);

View File

@ -64,7 +64,7 @@ var
begin
Handle := ACustomListBox.Handle;
Result := TWin32CheckListBoxStrings.Create(Handle, ACustomListBox);
GetWindowInfo(Handle)^.List := Result;
GetWin32WindowInfo(Handle)^.List := Result;
end;
class function TWin32WSCustomCheckListBox.GetItemEnabled(

View File

@ -330,11 +330,11 @@ end;
function StatusBarWndProc(Window: HWnd; Msg: UInt; WParam: Windows.WParam;
LParam: Windows.LParam): LResult; stdcall;
var
Info: PWindowInfo;
Info: PWin32WindowInfo;
Control: TWinControl;
Details: TThemedElementDetails;
begin
Info := GetWindowInfo(Window);
Info := GetWin32WindowInfo(Window);
if (Info = nil) or (Info^.WinControl = nil) then
begin
Result := CallDefaultWindowProc(Window, Msg, WParam, LParam);
@ -703,7 +703,7 @@ end;
function TrackBarWndProc(Window: HWnd; Msg: UInt; WParam: Windows.WParam;
LParam: Windows.LParam): LResult; stdcall;
var
WindowInfo: PWindowInfo;
WindowInfo: PWin32WindowInfo;
Control: TWinControl;
FocusBorderWidth,
FocusBorderHeight, Offset: Integer;
@ -721,7 +721,7 @@ begin
NMHdr := PNMHDR(LParam);
if NMHdr^.code = NM_CUSTOMDRAW then
begin
WindowInfo := GetWindowInfo(PNMHdr(LParam)^.hwndFrom);
WindowInfo := GetWin32WindowInfo(PNMHdr(LParam)^.hwndFrom);
Control := WindowInfo^.WinControl;
case PNMCustomDraw(LParam)^.dwDrawStage of
CDDS_PREPAINT:

View File

@ -111,7 +111,7 @@ type
TCreateWindowExParams = record
Buddy, Parent, Window: HWND;
Left, Top, Height, Width: integer;
WindowInfo, BuddyWindowInfo: PWindowInfo;
WindowInfo, BuddyWindowInfo: PWin32WindowInfo;
MenuHandle: HMENU;
Flags, FlagsEx: dword;
SubClassWndProc: pointer;
@ -240,7 +240,7 @@ begin
begin
// some controls (combobox) immediately send a message upon setting font
WindowInfo := AllocWindowInfo(Window);
if GetWindowInfo(Parent)^.needParentPaint then
if GetWin32WindowInfo(Parent)^.needParentPaint then
WindowInfo^.needParentPaint := true;
WindowInfo^.WinControl := AWinControl;
AWinControl.Handle := Window;
@ -333,7 +333,7 @@ begin
Assert(False, 'Trace:AddControl - Parent Window Handle is $' + IntToHex(LongInt(ParentHandle), 8));
Assert(False, 'Trace:AddControl - Child Window Handle is $' + IntToHex(LongInt(ChildHandle), 8));
// handle groupbox exception
ParentPanelHandle := GetWindowInfo(ChildHandle)^.ParentPanel;
ParentPanelHandle := GetWin32WindowInfo(ChildHandle)^.ParentPanel;
if ParentPanelHandle <> 0 then
ChildHandle := ParentPanelHandle;
SetParent(ChildHandle, ParentHandle);
@ -508,7 +508,7 @@ var
AccelTable: HACCEL;
begin
Handle := AWinControl.Handle;
AccelTable := GetWindowInfo(Handle)^.Accel;
AccelTable := GetWin32WindowInfo(Handle)^.Accel;
if AccelTable <> 0 then
DestroyAcceleratorTable(AccelTable);
DestroyWindow(Handle);

View File

@ -322,9 +322,9 @@ end;
class procedure TWin32WSCustomPage.ThemeChange(Wnd: HWnd);
var
WindowInfo: PWindowInfo;
WindowInfo: PWin32WindowInfo;
begin
WindowInfo := GetWindowInfo(Wnd);
WindowInfo := GetWin32WindowInfo(Wnd);
if WindowInfo <> nil then
begin
with WindowInfo^ do

View File

@ -1322,7 +1322,7 @@ const
begin
MenuHandle := APopupMenu.Handle;
AppHandle := TWin32WidgetSet(WidgetSet).AppHandle;
GetWindowInfo(AppHandle)^.PopupMenu := APopupMenu;
GetWin32WindowInfo(AppHandle)^.PopupMenu := APopupMenu;
TrackPopupMenuEx(MenuHandle,
lAlign[APopupMenu.IsRightToLeft] or
TPM_LEFTBUTTON or TPM_RIGHTBUTTON or

View File

@ -104,12 +104,12 @@ end;
function SpinBuddyWindowProc(Window: HWnd; Msg: UInt; WParam: Windows.WParam;
LParam: Windows.LParam): LResult; stdcall;
var
AWindowInfo: PWindowInfo;
AWindowInfo: PWin32WindowInfo;
begin
Result := WindowProc(Window, Msg, WParam, LParam);
if Msg = WM_KILLFOCUS then
begin
AWindowInfo := GetWindowInfo(Window);
AWindowInfo := GetWin32WindowInfo(Window);
if AWindowInfo^.AWinControl is TCustomFloatSpinEdit then
UpdateFloatSpinEditControl(AWindowInfo^.AWinControl.Handle,
TCustomFloatSpinEdit(AWindowInfo^.AWinControl));
@ -119,9 +119,9 @@ end;
procedure UpdateFloatSpinEditControl(const Handle: HWND;
const AFloatSpinEdit: TCustomFloatSpinEdit);
var
lWindowInfo: PWindowInfo;
lWindowInfo: PWin32WindowInfo;
begin
lWindowInfo := GetWindowInfo(Handle);
lWindowInfo := GetWin32WindowInfo(Handle);
if lWindowInfo <> @DefaultWindowInfo then
begin
lWindowInfo^.spinValue := AFloatSpinEdit.Value;
@ -242,7 +242,7 @@ end;
class function TWin32WSCustomFloatSpinEdit.GetValue(
const ACustomFloatSpinEdit: TCustomFloatSpinEdit): Double;
begin
Result := GetWindowInfo(ACustomFloatSpinEdit.Handle)^.spinValue;
Result := GetWin32WindowInfo(ACustomFloatSpinEdit.Handle)^.spinValue;
end;
class procedure TWin32WSCustomFloatSpinEdit.SetReadOnly

View File

@ -459,7 +459,7 @@ begin
// allocate windowinfo record ourselves, we do not call WindowInitBuddy
BuddyWindowInfo := AllocWindowInfo(Buddy);
BuddyWindowInfo^.PWinControl := AWinControl;
if GetWindowInfo(Parent)^.needParentPaint then
if GetWin32WindowInfo(Parent)^.needParentPaint then
BuddyWindowInfo^.needParentPaint := true;
Parent := Buddy;
end;
@ -494,7 +494,7 @@ var
begin
WinHandle := AWinControl.Handle;
// check if we have a ``container'', if so, move that
BuddyHandle := GetWindowInfo(WinHandle)^.ParentPanel;
BuddyHandle := GetWin32WindowInfo(WinHandle)^.ParentPanel;
if BuddyHandle <> 0 then
begin
MoveWindow(BuddyHandle, Left, Top, Width, Height, false);
@ -620,11 +620,11 @@ end;
class function TWin32WSCustomListBox.GetSelected(const ACustomListBox: TCustomListBox; const AIndex: integer): boolean;
var
WindowInfo: PWindowInfo;
WindowInfo: PWin32WindowInfo;
winHandle: HWND;
begin
winHandle := ACustomListBox.Handle;
WindowInfo := GetWindowInfo(winHandle);
WindowInfo := GetWin32WindowInfo(winHandle);
// if we're handling a WM_DRAWITEM, then LB_GETSEL is not reliable, check stored info
if (WindowInfo^.DrawItemIndex <> -1) and (WindowInfo^.DrawItemIndex = AIndex) then
Result := WindowInfo^.DrawItemSelected
@ -638,7 +638,7 @@ var
begin
Handle := ACustomListBox.Handle;
Result := TWin32ListStringList.Create(Handle, ACustomListBox);
GetWindowInfo(Handle)^.List := Result;
GetWin32WindowInfo(Handle)^.List := Result;
end;
class function TWin32WSCustomListBox.GetTopIndex(const ACustomListBox: TCustomListBox): integer;
@ -740,7 +740,7 @@ class function TWin32WSCustomComboBox.GetStringList(
begin
Result := nil;
if ACustomComboBox.Style <> csSimple then
Result := TWin32ComboBoxStringList(GetWindowInfo(ACustomComboBox.Handle)^.List);
Result := TWin32ComboBoxStringList(GetWin32WindowInfo(ACustomComboBox.Handle)^.List);
end;
class function TWin32WSCustomComboBox.CreateHandle(const AWinControl: TWinControl;
@ -851,7 +851,7 @@ end;
class function TWin32WSCustomComboBox.GetMaxLength(const ACustomComboBox: TCustomComboBox): integer;
begin
Result := GetWindowInfo(ACustomComboBox.Handle)^.MaxLength;
Result := GetWin32WindowInfo(ACustomComboBox.Handle)^.MaxLength;
end;
class function TWin32WSCustomComboBox.GetText(const AWinControl: TWinControl; var AText: string): boolean;
@ -912,7 +912,7 @@ var
begin
winhandle := ACustomComboBox.Handle;
SendMessage(winhandle, CB_LIMITTEXT, NewLength, 0);
GetWindowInfo(winhandle)^.MaxLength := NewLength;
GetWin32WindowInfo(winhandle)^.MaxLength := NewLength;
end;
class procedure TWin32WSCustomComboBox.SetReadOnly(const ACustomComboBox: TCustomComboBox;
@ -964,7 +964,7 @@ var
begin
winhandle := ACustomComboBox.Handle;
Result := TWin32ComboBoxStringList.Create(winhandle, ACustomComboBox);
GetWindowInfo(winhandle)^.List := Result;
GetWin32WindowInfo(winhandle)^.List := Result;
end;
class procedure TWin32WSCustomComboBox.Sort(const ACustomComboBox: TCustomComboBox; AList: TStrings; IsSorted: boolean);
@ -1080,7 +1080,7 @@ end;
class function TWin32WSCustomEdit.GetMaxLength(const ACustomEdit: TCustomEdit): integer;
begin
Result := GetWindowInfo(ACustomEdit.Handle)^.MaxLength;
Result := GetWin32WindowInfo(ACustomEdit.Handle)^.MaxLength;
end;
class procedure TWin32WSCustomEdit.GetPreferredSize(
@ -1137,7 +1137,7 @@ var
begin
winhandle := ACustomEdit.Handle;
SendMessage(winhandle, EM_LIMITTEXT, NewLength, 0);
GetWindowInfo(winhandle)^.MaxLength := NewLength;
GetWin32WindowInfo(winhandle)^.MaxLength := NewLength;
end;
class procedure TWin32WSCustomEdit.SetPasswordChar(const ACustomEdit: TCustomEdit; NewChar: char);