From 4c55ecc0905e97776529ef761412a93f31fbf511 Mon Sep 17 00:00:00 2001 From: paul Date: Thu, 19 Feb 2009 01:55:50 +0000 Subject: [PATCH] win32: changing border style by changing exstyle does not work for ListView -> use RecreateWnd (fixes part of issue #0013182) git-svn-id: trunk@18752 - --- lcl/interfaces/win32/win32wscustomlistview.inc | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lcl/interfaces/win32/win32wscustomlistview.inc b/lcl/interfaces/win32/win32wscustomlistview.inc index c0ae956d08..8333e7e15d 100644 --- a/lcl/interfaces/win32/win32wscustomlistview.inc +++ b/lcl/interfaces/win32/win32wscustomlistview.inc @@ -680,19 +680,11 @@ begin end; class procedure TWin32WSCustomListView.SetBorderStyle(const AWinControl: TWinControl; const ABorderStyle: TBorderStyle); -var - Handle: HWND; - StyleEx: PtrInt; begin if not WSCheckHandleAllocated(AWinControl, 'TWin32WSCustomListView.SetBorder') then Exit; - Handle := AWinControl.Handle; - StyleEx := GetWindowLong(Handle, GWL_EXSTYLE); - if ABorderStyle = TBorderStyle(bsSingle) Then - StyleEx := StyleEx or WS_EX_CLIENTEDGE - else - StyleEx := StyleEx and not WS_EX_CLIENTEDGE; - SetWindowLong(Handle, GWL_EXSTYLE, StyleEx); + // changing border style by changing EXSTYLE here does not work correctly + RecreateWnd(AWinControl); end; class procedure TWin32WSCustomListView.SetColor(const AWinControl: TWinControl);