Home > Back-end >  How to modify the delphi7 listview do report column headings such as the color of the style
How to modify the delphi7 listview do report column headings such as the color of the style

Time:11-12

How to modify the delphi7 listview do report column headings such as style color

Delphi7 present style:


Want to change into this style:

CodePudding user response:

A change of control? With dev?

CodePudding user response:

you can try, contracted version

CodePudding user response:

, he want to redraw the title bar part of the very difficult

CodePudding user response:

Read the realization of the listview in Delphi source code, then you will know how to get to the header handle, to handle, want to do is ok

CodePudding user response:

Procedure TCustomListView. WMParentNotify (var Message: TWMParentNotify);
The begin
With the Message do
If (Event=WM_CREATE message handler) and (FHeaderHandle=0) then
The begin
FHeaderHandle:=ChildWnd;
FDefHeaderProc:=TWindowProcPtr (GetWindowLong (FHeaderHandle GWL_WNDPROC));
{$IF DEFINED (CLR)}
SetWindowLong (FHeaderHandle GWL_WNDPROC, FLVInstances. FHeaderInstance);
{$ELSE}
The SetWindowLong (FHeaderHandle GWL_WNDPROC, LongInt (FHeaderInstance));
{$IFEND}
end;
Inherited;
end;


FHeaderHandle here is listview head handle, it seems that you to cover WM_PARENTNOTIFY news
  • Related