1 Attachment(s)
[RESOLVED] Win7 Explorer Themed Selection pszClassList
Does MS provide pszClassList for Win7 File Explorer Theme Selection, so that I can fill OpenThemeData API to draw Hover and Selection Rectangle? Or just doesn't exist? If doesn't have, how to simulate? I want to draw such style for my ListBox.
Refer to my attached pic.
Edited: I open VBAccelerator's Theme explorer, it doesn't have "ListBox" theme.:( No wonder .NET ComboBox and ListBox also own plain focus rectangle.
Re: Win7 Explorer Themed Selection pszClassList
From what I know, ComboBox and ListBox doesn't have Themed selection, But Treeview,Listview got.
What is the behind story? and why is so difficult?
ListBox/ComboBox doesn't have similar "LB_SETCALLBACKMASK".
Code:
Public Property Get ExplorerTheme() As Boolean
ExplorerTheme = m_ExplorerTheme
End Property
Public Property Let ExplorerTheme(ByVal Value As Boolean)
m_ExplorerTheme = Value
If m_hListView Then
If Value Then
Call SetWindowTheme(m_hListView, StrPtr("explorer"), 0)
Call SendMessage(m_hListView, LVM_SETCALLBACKMASK, LVIS_FOCUSED, ByVal 0)
Else
Call SetWindowTheme(m_hListView, 0, 0)
Call SendMessage(m_hListView, LVM_SETCALLBACKMASK, 0, ByVal 0)
End If
End If
End Property
Re: Win7 Explorer Themed Selection pszClassList
Was wondering why the SetWindowTheme wasn't working by itself.. thanks for the tip.
Combobox and Listbox are VB-intrinsic controls that aren't too tightly linked to the latest version of comctl. I don't recall seeing them themed anywhere, but if they did accept themes you'd have to create them via CreateWindowEx in a manifested app/ide.
Re: Win7 Explorer Themed Selection pszClassList
Quote:
Originally Posted by
fafalone
Was wondering why the SetWindowTheme wasn't working by itself.. thanks for the tip.
Combobox and Listbox are VB-intrinsic controls that aren't too tightly linked to the latest version of comctl. I don't recall seeing them themed anywhere, but if they did accept themes you'd have to create them via CreateWindowEx in a manifested app/ide.
VB6 SDK ListBox and ComboBox created by CreateWindowEx don't have Theme selection.
.NET also don't have.
ListView and TreeView have but have to write some extra codes to turn on instead of by manifest file.
What is the behind story why MS just ignore it?
Re: Win7 Explorer Themed Selection pszClassList
It's probably some compatibility thing.. maintaining compatibility like windows has to must be a nightmare.
Also how do you get the treeview behaving like that... there's no TVM_SETCALLBACKMASK and just settheme by itself isn't working.
Edit: Nevermind
Code:
Dim swt1 As String
swt1 = "explorer"
Call SetWindowTheme(m_hwndTV, StrPtr(swt1), 0&)
Call TreeView_SetStyle(m_hwndTV, TVS_TRACKSELECT)
Call TreeView_SetExtendedStyle(m_hwndTV, TVS_EX_DOUBLEBUFFER Or TVS_EX_FADEINOUTEXPANDOS)
Re: Win7 Explorer Themed Selection pszClassList
OK, thank you for clarification. I have to draw it in hard code.