The new credentials window now applies Windows XP theme settings to
authorJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 22 Jun 2007 19:05:44 +0000 (19:05 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 22 Jun 2007 19:05:44 +0000 (19:05 +0000)
dialog panels that are hosted within tab controls.

ticket: 5584

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19634 dc483132-0cff-0310-8789-dd5450dbe970

src/windows/identity/ui/Makefile
src/windows/identity/ui/newcredwnd.c

index 7091104f0f36d277b8c5b487f78eae1421cb9b57..cf20127a34737107bec87d93151c47e6f586debf 100644 (file)
@@ -75,6 +75,10 @@ SDKLIBFILES=                         \
        msimg32.lib             \
        ole32.lib
 
+!if "$(APPVER)" != "5.0"
+SDKLIBFILES = $(SDKLIBFILES) uxtheme.lib
+!endif
+
 $(OBJ)\uiconfig.c: uiconfig.csv $(CONFDIR)\csvschema.cfg
        $(CCSV) $** $@
 
index 938cc1b4e2c0ecc9879f7f463c076d3b3b314b27..1d38e4c95e0341786bd56e2c5eb9679de9be0486 100644 (file)
@@ -30,6 +30,9 @@
 #define OEMRESOURCE
 
 #include<khmapp.h>
+#if _WIN32_WINNT >= 0x0501
+#include<uxtheme.h>
+#endif
 #include<assert.h>
 
 ATOM khui_newcredwnd_cls;
@@ -1402,6 +1405,11 @@ nc_handle_wm_create(HWND hwnd,
     if (hf_main)
         SendMessage(ncd->tab_wnd, WM_SETFONT, (WPARAM) hf_main, FALSE);
 
+#if _WIN32_WINNT >= 0x0501
+    EnableThemeDialogTexture(ncd->dlg_main,
+                             ETDT_ENABLETAB);
+#endif
+
     {
         RECT r_main;
         RECT r_area;
@@ -1982,6 +1990,12 @@ static LRESULT nc_handle_wm_nc_notify(HWND hwnd,
 
 #ifdef DEBUG
                     assert(d->nc->types[i]->hwnd_panel);
+#endif
+#if _WIN32_WINNT >= 0x0501
+                    if (d->nc->types[i]->hwnd_panel) {
+                        EnableThemeDialogTexture(d->nc->types[i]->hwnd_panel,
+                                                 ETDT_ENABLETAB);
+                    }
 #endif
                 }
             }