Page 1 of 1

'Explorer' theme for ListViews & TreeViews on Vista+

Posted: 16 Jul 2015, 03:01
by just me
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
}

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

Posted: 16 Jul 2015, 04:07
by tmplinshi
Nice!

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

Posted: 17 Jul 2015, 03:58
by tmplinshi
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
}

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

Posted: 14 Aug 2017, 04:50
by Fords
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

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

Posted: 16 Sep 2017, 15:55
by SKAN
Wonderful selection effect when in lististview's Icon-view.
Thanks for sharing!

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

Posted: 06 Oct 2019, 13:39
by think
Any update on this? As mentioned by Fords, is there a way to remove the grids?