FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Explorer-style ListView

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
awans



Joined: 25 Dec 2007
Posts: 3

PostPosted: Tue Dec 25, 2007 7:46 pm    Post subject: Explorer-style ListView Reply with quote

I'm trying to make an "explorer style" listview in a DFL app. So the underlying win32 method I need to call is "SetWindowTheme" in uxtheme.dll. While the DFL internal.winapi file has "GetWindowTheme," the other is absent.

Any guidance on how I might be able to either access the uxtheme dll directly/have the function added to the DFL winapi?
Back to top
View user's profile Send private message
awans



Joined: 25 Dec 2007
Posts: 3

PostPosted: Tue Dec 25, 2007 11:06 pm    Post subject: Reply with quote

Never mind -- the function is already in the newest snapshot!
Back to top
View user's profile Send private message
awans



Joined: 25 Dec 2007
Posts: 3

PostPosted: Wed Dec 26, 2007 2:51 pm    Post subject: Reply with quote

Just thought I'd post my code in case anyone else is trying to build one:

Code:

class ListViewEx : ListView
{
   protected override void onHandleCreated(EventArgs ea)
   {
      super.onHandleCreated(ea);

      DWORD LVS_EX_DOUBLEBUFFER = 0x00010000;
      Message m = Message(handle, LVM_SETEXTENDEDLISTVIEWSTYLE,
            cast(WPARAM) LVS_EX_DOUBLEBUFFER,
            cast(LPARAM) LVS_EX_DOUBLEBUFFER);   

      prevWndProc(m);

      HMODULE hmuxt;
      hmuxt = GetModuleHandleA("uxtheme.dll");
      if(hmuxt)
      {
         auto setWinTheme = cast(typeof(&SetWindowTheme))
            GetProcAddress(hmuxt, "SetWindowTheme");
         assert(setWinTheme);
         setWinTheme(handle, "Explorer"w.ptr, null);
      }
   }
}
Back to top
View user's profile Send private message
jicman



Joined: 22 Dec 2004
Posts: 298
Location: Rochester, NY

PostPosted: Thu Jan 03, 2008 1:33 pm    Post subject: Reply with quote

Thanks. Just save me 4 hours of reading materials. .-)

jose
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group