'Explorer' theme for ListViews & TreeViews on Vista+

Put simple Tips and Tricks that are not entire Tutorials in this forum
just me
Posts: 5660
Joined: 02 Oct 2013, 08:51
Location: Germany

'Explorer' theme for ListViews & TreeViews on Vista+

16 Jul 2015, 03:01

Related: viewtopic.php?f=13&t=8685

As long as it isn't implemented, you might want to use this function or similar:

Code: Select all

SetExplorerTheme(HCTL) { ; HCTL : handle of a ListView or TreeView control
   If (DllCall("GetVersion", "UChar") > 5) {
      VarSetCapacity(ClassName, 1024, 0)
      If DllCall("GetClassName", "Ptr", HCTL, "Str", ClassName, "Int", 512, "Int")
         If (ClassName = "SysListView32") || (ClassName = "SysTreeView32")
            Return !DllCall("UxTheme.dll\SetWindowTheme", "Ptr", HCTL, "WStr", "Explorer", "Ptr", 0)
   }
   Return False
}
tmplinshi
Posts: 1283
Joined: 01 Oct 2013, 14:57

Re: 'Explorer' theme for ListViews & TreeViews on Vista+

17 Jul 2015, 03:58

For who also want to remove the listview's selection border:

Reference: http://stackoverflow.com/questions/2691 ... stviewitem

Code: Select all

LV_RemoveSelBorder(HLV, a*) {
	Static WM_CHANGEUISTATE := 0x127
	     , WM_UPDATEUISTATE := 0x128
	     , UIS_SET := 1
	     , UISF_HIDEFOCUS := 0x1
	     , wParam := (UIS_SET << 16) | (UISF_HIDEFOCUS & 0xffff) ; MakeLong
	     , _ := OnMessage(WM_UPDATEUISTATE, "LV_RemoveSelBorder")
	If (a.2 = WM_UPDATEUISTATE)
		Return 0 ; Prevent alt key from restoring the selection border
	PostMessage, WM_CHANGEUISTATE, wParam, 0,, % "ahk_id " . HLV
}
Fords

Re: 'Explorer' theme for ListViews & TreeViews on Vista+

14 Aug 2017, 04:50

Hello just me,

Is it possible to hide columns lines line like in explorer? -grid has no effect.
http://i.imgur.com/WA9w7WL.png

Thanks
User avatar
SKAN
Posts: 350
Joined: 29 Sep 2013, 16:58

Re: 'Explorer' theme for ListViews & TreeViews on Vista+

16 Sep 2017, 15:55

Wonderful selection effect when in lististview's Icon-view.
Thanks for sharing!

Return to “Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 0 guests