|
-
Jan 21st, 2015, 08:23 AM
#1
Thread Starter
Frenzied Member
-
Jan 21st, 2015, 08:22 PM
#2
Thread Starter
Frenzied Member
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
Last edited by Jonney; Jan 21st, 2015 at 08:34 PM.
-
Jan 21st, 2015, 10:47 PM
#3
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.
-
Jan 22nd, 2015, 12:00 AM
#4
Thread Starter
Frenzied Member
Re: Win7 Explorer Themed Selection pszClassList
 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?
Last edited by Jonney; Jan 22nd, 2015 at 03:01 AM.
-
Jan 22nd, 2015, 03:07 AM
#5
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)
Last edited by fafalone; Jan 22nd, 2015 at 03:48 AM.
-
Jan 22nd, 2015, 11:47 PM
#6
Thread Starter
Frenzied Member
Re: Win7 Explorer Themed Selection pszClassList
OK, thank you for clarification. I have to draw it in hard code.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|