Results 1 to 6 of 6

Thread: [RESOLVED] Win7 Explorer Themed Selection pszClassList

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Resolved [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.
    Attached Images Attached Images  
    Last edited by Jonney; Jan 21st, 2015 at 09:21 AM.

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    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.

  3. #3
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,654

    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.

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: Win7 Explorer Themed Selection pszClassList

    Quote Originally Posted by fafalone View Post
    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.

  5. #5
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,654

    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.

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    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
  •  



Click Here to Expand Forum to Full Width