diff --git a/lcl/interfaces/win32/win32wscustomlistview.inc b/lcl/interfaces/win32/win32wscustomlistview.inc index 5f3adae079..5dd49c45a5 100644 --- a/lcl/interfaces/win32/win32wscustomlistview.inc +++ b/lcl/interfaces/win32/win32wscustomlistview.inc @@ -470,7 +470,7 @@ begin if not WSCheckHandleAllocated(ALV, 'GetHoverTime') then Exit; - Result := ListView_GetHoverTime(ALV.Handle); + Result := SendMessage(ALV.Handle, LVM_GETHOVERTIME, 0, 0); end; class function TWin32WSCustomListView.GetItemAt(const ALV: TCustomListView; x,y: integer): Integer; @@ -547,7 +547,7 @@ end; class function TWin32WSCustomListView.GetHeader(const AHandle: THandle): THandle; begin - Result := ListView_GetHeader(AHandle); + Result := SendMessage(AHandle, LVM_GETHEADER, 0, 0); if Result <> 0 then Exit; // probably old version, try the first child @@ -640,7 +640,7 @@ begin if not WSCheckHandleAllocated(ALV, 'SetHoverTime') then Exit; - ListView_SetHoverTime(ALV.Handle, AValue); + SendMessage(ALV.Handle, LVM_SETHOVERTIME, 0, AValue); end; class procedure TWin32WSCustomListView.SetImageList(const ALV: TCustomListView; const AList: TListViewImageList; const AValue: TCustomImageList); @@ -788,13 +788,13 @@ class procedure TWin32WSCustomListView.UpdateExStyle(const AHandle: THandle; con var OldStyle, NewStyle: Integer; begin - OldStyle := ListView_GetExtendedListViewStyle(AHandle); + OldStyle := SendMessage(AHandle, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); NewStyle := (OldStyle and not AMask) or AStyle; if OldStyle = NewStyle then Exit; - ListView_SetExtendedListViewStyle(AHandle, NewStyle); + SendMessage(AHandle, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, NewStyle); //Invalidate Listview, so that changes are made visible Windows.InvalidateRect(AHandle, nil, true); diff --git a/lcl/interfaces/win32/winext.pas b/lcl/interfaces/win32/winext.pas index 247b707827..fa9ad36b2b 100644 --- a/lcl/interfaces/win32/winext.pas +++ b/lcl/interfaces/win32/winext.pas @@ -218,14 +218,15 @@ Const // for GetRandomRgn SYSRGN = 4; - + +{not used anymore // missing listview macros function ListView_GetHeader(hwndLV: HWND): HWND; function ListView_GetExtendedListViewStyle(hwndLV: HWND): DWORD; function ListView_SetExtendedListViewStyle(hwndLV: HWND; dw: DWORD): BOOL; function ListView_GetHoverTime(hwndLV: HWND): DWORD; function ListView_SetHoverTime(hwndLV: HWND; dwHoverTimeMs: DWORD): DWORD; - +} { Win32 API functions not included in windows.pp } @@ -296,6 +297,7 @@ Uses SysUtils; {$PACKRECORDS NORMAL} +{not used anymore function ListView_GetHeader(hwndLV: HWND): HWND; begin Result := SendMessage(hwndLV, LVM_GETHEADER, 0, 0); @@ -324,7 +326,7 @@ end; procedure ListView_SetCheckState(hwndLV: HWND; iIndex: UINT;fCheck:BOOL); begin end; - +} Var TmpStr: PChar;