visual c++ - How do I get updated themes for CTreeCtrl -
I have a C + + MFC application that uses CTreeCtrl, I am running Windows 7 and Visual Studio 2008 . I'm trying to get +/-
instead of arrows to control my tree / arrows to expand-
One of the good things I see is good Examples are tree controls that you see when you edit the properties of your project. Visual Studio.
It does not matter whether I have an old XP style to style or try to modify topics +/-
I think I can remember some simple Having any help would be appreciated.
Add this function to get vista style
LRESULT EnableVistaTheme (HNWHWND, LPCWWoost ClassList, LPCWSUSSSEs, LPCWebustImmediist) {Elrasselt LRSilit = S_Files; HRESULT (__stdcall * pSetWindowTheme) (HWND HWND, LPCWSSTS PSSSBPPNM, LPCWSTSSSSIBlist); Handle (__stdcall * pOpenThemeData) (hwnh hwd, lpcwstssss class list); HRESULT (__stdcall * pCloseThemeData) (Handle H Theme); HMODULE hinstDll = :: Load Library (_T ("UxTheme.dll")); If (hinstDll) {(FARPROC & amp;) pOpenThemeData = :: GetProcAddress (hinstDll, "OpenThemedData"); (FARPROC & amp; p) pCloseThemeData = :: GetProcAddress (hinstDll, "Bandit Data"); (FARPROC & amp;) pSetWindowTheme = :: GetProcAddress (hinstDll, "SetWindowTheme"); If (pSetWindowTheme & amp; amp; and; OpenThemeData & amp; amp; pCloseThemeData) {Handle theme = pOpenThemeData (hwnd, classlist); If (subject! = Null) {Verify (pCloseThemeData (subject) == S_OK); LResult = pSetWindowTheme (hwnd, subApp, idlist); }} :: Free Library (host DLL); } Returns alarsult; } and call this function with parameters,
hwnd: handle your tree control ID list: NULL
Comments
Post a Comment