win32: changing border style by changing exstyle does not work for ListView -> use RecreateWnd (fixes part of issue #0013182)

git-svn-id: trunk@18752 -
This commit is contained in:
paul 2009-02-19 01:55:50 +00:00
parent c84b3499e1
commit 4c55ecc090

View File

@ -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);