pull up r19854 from trunk
authorTom Yu <tlyu@mit.edu>
Fri, 28 Sep 2007 23:36:28 +0000 (23:36 +0000)
committerTom Yu <tlyu@mit.edu>
Fri, 28 Sep 2007 23:36:28 +0000 (23:36 +0000)
 r19854@cathode-dark-space:  jaltman | 2007-08-24 10:26:11 -0400
 ticket: new
 subject: NIM: New command-line options --hide and --show / new command-line help dialog
 component: windows

 Add two command-line options to the Network Identity Manager application:

 --hide : If there is already an instance of Network Identity Manager
          running in the user's session, this will cause the main
          window of that instance to be hidden.

 --show : Unhides the main window of the running instance.

 If no options are specified when starting netidmgr.exe while another
 instance is running, the running instance will perform the default
 action as configured in the user's preferences.  By default, this will
 be to show the main window.

 The message box that displayed the command-line options if an invalid
 option is specified has been replaced with a dialog box that shows the
 options in a more readable rich text control.  The contents of the
 control are specified in ui/lang/<lang>/cmdline.rtf.

 Do not edit cmdline.rtf with Microsoft Word.  The output of Word is
 incompatible with the RichEdit20 component.

ticket: 5675
version_fixed: 1.6.3

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@19989 dc483132-0cff-0310-8789-dd5450dbe970

src/windows/identity/ui/appglobal.h
src/windows/identity/ui/credfuncs.c
src/windows/identity/ui/lang/en_us/cmdline.rtf [new file with mode: 0644]
src/windows/identity/ui/lang/en_us/khapp.rc
src/windows/identity/ui/main.c
src/windows/identity/ui/mainwnd.c
src/windows/identity/ui/notifier.c
src/windows/identity/ui/notifier.h
src/windows/identity/ui/resource.h

index 46e2d0dc9379229da8e5b7838c491950147fe8b7..235826d07b734cf779ee8c3008a71806154a5612 100644 (file)
@@ -42,7 +42,7 @@ extern const khm_version app_version;
 
 /* The structure used to send command-line options to a remote
    NetIDMgr session for versions prior to 1.2. */
-struct tag_khm_startup_options_v1 {
+typedef struct tag_khm_startup_options_v1 {
     BOOL seen;
     BOOL processing;
 
@@ -56,12 +56,12 @@ struct tag_khm_startup_options_v1 {
     BOOL error_exit;
 
     BOOL no_main_window;
-};
+} khm_startup_options_v1;
 
-/* Used on NetIDMgr versions 1.2 and later */
-struct tag_khm_startup_options_v2 {
-    khm_int32 magic;
-    DWORD cb_size;
+/* Used on NetIDMgr version 1.2.x */
+typedef struct tag_khm_startup_options_v2 {
+    khm_int32 magic;            /* set to STARTUP_OPTIONS_MAGIC */
+    DWORD cb_size;              /* size of structure, in bytes */
 
     BOOL init;
     BOOL import;
@@ -72,28 +72,48 @@ struct tag_khm_startup_options_v2 {
     BOOL remote_exit;
 
     khm_int32 code;
-} khm_startup_options_xfer;
+} khm_startup_options_v2;
+
+/* Used on NetIDMgr version 1.3.1 and later */
+typedef struct tag_khm_startup_options_v3 {
+    struct tag_khm_startup_options_v2 v2opt;
+
+    khm_int32 remote_display;   /* combination of SOPTS_DISPLAY_* */
+} khm_startup_options_v3;
 
 #define STARTUP_OPTIONS_MAGIC 0x1f280e41
 
+/* The following macros are used with
+   tag_khm_startup_options_v3->remote_display */
+
+/* Show (unhide) the main window. */
+#define SOPTS_DISPLAY_SHOW    0x00000001
+
+/* Hide the main window. (Can't be used with SOPTS_DISPLAY_SHOW) */
+#define SOPTS_DISPLAY_HIDE    0x00000002
+
+/* Suppress the default action on the remote end */
+#define SOPTS_DISPLAY_NODEF   0x00000004
+
 /* Used internally. */
 typedef struct tag_khm_startup_options_int {
-    BOOL seen;
-    BOOL processing;
-    BOOL remote;
+    khm_boolean seen;
+    khm_boolean processing;
+    khm_boolean remote;         /* is this a remote request? */
 
-    BOOL init;
-    BOOL import;
-    BOOL renew;
-    BOOL destroy;
+    khm_boolean init;
+    khm_boolean import;
+    khm_boolean renew;
+    khm_boolean destroy;
 
-    BOOL autoinit;
-    BOOL exit;
-    BOOL remote_exit;
+    khm_boolean autoinit;
+    khm_boolean exit;
+    khm_boolean remote_exit;
 
-    BOOL error_exit;
+    khm_boolean error_exit;
 
-    BOOL no_main_window;
+    khm_boolean no_main_window;
+    khm_int32 display;          /* SOPTS_DISPLAY_* */
 
     LONG pending_renewals;
 } khm_startup_options;
index 8eeba14a31b8a2777039dbb2495f5ee47ddbbdb2..b90d9a60d9558beb78867d77de661df6fe3b30b7 100644 (file)
@@ -1145,16 +1145,8 @@ khm_cred_process_startup_actions(void) {
        rest of the startup actions. */
     do {
         if (khm_startup.init) {
-            if (defident)
-                khui_context_set(KHUI_SCOPE_IDENT,
-                                 defident,
-                                 KCDB_CREDTYPE_INVALID,
-                                 NULL, NULL, 0,
-                                 NULL);
-            else
-                khui_context_reset();
 
-            khm_cred_obtain_new_creds(NULL);
+            khm_cred_obtain_new_creds_for_ident(defident, NULL);
             khm_startup.init = FALSE;
             break;
         }
@@ -1200,13 +1192,7 @@ khm_cred_process_startup_actions(void) {
             khm_startup.destroy = FALSE;
 
             if (defident) {
-                khui_context_set(KHUI_SCOPE_IDENT,
-                                 defident,
-                                 KCDB_CREDTYPE_INVALID,
-                                 NULL, NULL, 0,
-                                 NULL);
-
-                khm_cred_destroy_creds(FALSE, FALSE);
+                khm_cred_destroy_identity(defident);
                 break;
             }
         }
@@ -1253,6 +1239,13 @@ khm_cred_process_startup_actions(void) {
             break;
         }
 
+        if (khm_startup.display & SOPTS_DISPLAY_HIDE) {
+            khm_hide_main_window();
+        } else if (khm_startup.display & SOPTS_DISPLAY_SHOW) {
+            khm_show_main_window();
+        }
+        khm_startup.display = 0;
+
         /* when we get here, then we are all done with the command
            line stuff */
         khm_startup.processing = FALSE;
@@ -1290,6 +1283,25 @@ khm_cred_begin_startup_actions(void) {
 
     }
 
+    /* if this is a remote request, and no specific options were
+       specified other than --renew, then we perform the default
+       action, as if the user clicked on the tray icon. */
+    if (khm_startup.remote &&
+        !khm_startup.exit &&
+        !khm_startup.destroy &&
+        !khm_startup.autoinit &&
+        !khm_startup.init &&
+        !khm_startup.remote_exit &&
+        !khm_startup.import &&
+        !khm_startup.display) {
+
+        khm_int32 def_action = khm_get_default_notifier_action();
+
+        if (def_action > 0) {
+            khui_action_trigger(def_action, NULL);
+        }
+    }
+
     khm_startup.seen = TRUE;
     khm_startup.processing = TRUE;
 
diff --git a/src/windows/identity/ui/lang/en_us/cmdline.rtf b/src/windows/identity/ui/lang/en_us/cmdline.rtf
new file mode 100644 (file)
index 0000000..8a16b8e
Binary files /dev/null and b/src/windows/identity/ui/lang/en_us/cmdline.rtf differ
index 9c0f6cc3577f6e7c6e3ea381bd3bde651bc3e71f..cfdbe488da81f46895862eab66025c76c5b9a637 100644 (file)
-// Microsoft Visual C++ generated resource script.\r
-//\r
-#include "..\..\resource.h"\r
-\r
-#define APSTUDIO_READONLY_SYMBOLS\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Generated from the TEXTINCLUDE 2 resource.\r
-//\r
-#include "afxres.h"\r
-/////////////////////////////////////////////////////////////////////////////\r
-#undef APSTUDIO_READONLY_SYMBOLS\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// English (U.S.) resources\r
-\r
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r
-#ifdef _WIN32\r
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\r
-#pragma code_page(1252)\r
-#endif //_WIN32\r
-\r
-#ifdef APSTUDIO_INVOKED\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// TEXTINCLUDE\r
-//\r
-\r
-1 TEXTINCLUDE \r
-BEGIN\r
-    "..\\..\\resource.h\0"\r
-END\r
-\r
-2 TEXTINCLUDE \r
-BEGIN\r
-    "#include ""afxres.h""\0"\r
-END\r
-\r
-3 TEXTINCLUDE \r
-BEGIN\r
-    "\r\0"\r
-END\r
-\r
-#endif    // APSTUDIO_INVOKED\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Icon\r
-//\r
-\r
-// Icon with lowest ID value placed first to ensure application icon\r
-// remains consistent on all systems.\r
-IDI_MAIN_APP            ICON                    "..\\..\\images\\main_app.ico"\r
-IDI_ENABLED             ICON                    "..\\..\\images\\enabled.ico"\r
-IDI_DISABLED            ICON                    "..\\..\\images\\disabled.ico"\r
-IDI_NOTIFY_NONE         ICON                    "..\\..\\images\\app_notify_none.ico"\r
-IDI_NOTIFY_INFO         ICON                    "..\\..\\images\\app_notify_info.ico"\r
-IDI_NOTIFY_WARN         ICON                    "..\\..\\images\\app_notify_warn.ico"\r
-IDI_NOTIFY_ERROR        ICON                    "..\\..\\images\\app_notify_error.ico"\r
-IDI_CFG_DEFAULT         ICON                    "..\\..\\images\\cfg_default.ico"\r
-IDI_CFG_MODIFIED        ICON                    "..\\..\\images\\cfg_mod.ico"\r
-IDI_CFG_APPLIED         ICON                    "..\\..\\images\\cfg_applied.ico"\r
-IDI_CFG_DELETED         ICON                    "..\\..\\images\\cfg_deleted.ico"\r
-IDI_ID                  ICON                    "..\\..\\images\\id.ico"\r
-IDI_APPICON_WARN        ICON                    "..\\..\\images\\app_state_warn.ico"\r
-IDI_APPICON_EXP         ICON                    "..\\..\\images\\app_state_exp.ico"\r
-IDI_APPICON_OK          ICON                    "..\\..\\images\\app_state_ok.ico"\r
-IDI_CFG_PLUGIN          ICON                    "..\\..\\images\\cfg_plugin.ico"\r
-IDI_CFG_PLUGIN_ERR      ICON                    "..\\..\\images\\cfg_plugin_err.ico"\r
-IDI_CFG_PLUGIN_DIS      ICON                    "..\\..\\images\\cfg_plugin_dis.ico"\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Bitmap\r
-//\r
-\r
-IDB_TK_REFRESH          BITMAP                  "..\\..\\images\\tk-refresh.bmp"\r
-IDB_ID                  BITMAP                  "..\\..\\images\\id.bmp"\r
-IDB_ID_DELETE           BITMAP                  "..\\..\\images\\id-delete.bmp"\r
-IDB_ID_NEW              BITMAP                  "..\\..\\images\\id-new.bmp"\r
-IDB_ID_REFRESH          BITMAP                  "..\\..\\images\\id-refresh.bmp"\r
-IDB_TK                  BITMAP                  "..\\..\\images\\tk.bmp"\r
-IDB_TK_DELETE           BITMAP                  "..\\..\\images\\tk-delete.bmp"\r
-IDB_TK_NEW              BITMAP                  "..\\..\\images\\tk-new.bmp"\r
-IDB_VW_REFRESH_SM       BITMAP                  "..\\..\\images\\vw-refresh-sm.bmp"\r
-IDB_TB_BLANK            BITMAP                  "..\\..\\images\\tb-blank.bmp"\r
-IDB_TB_BLANK_SM         BITMAP                  "..\\..\\images\\tb-blank-small.bmp"\r
-IDB_VW_REFRESH          BITMAP                  "..\\..\\images\\vw-refresh.bmp"\r
-IDB_ID_DELETE_DIS       BITMAP                  "..\\..\\images\\id-delete-dis.bmp"\r
-IDB_ID_DELETE_DIS_SM    BITMAP                  "..\\..\\images\\id-delete-dis-sm.bmp"\r
-IDB_ID_DELETE_SM        BITMAP                  "..\\..\\images\\id-delete-sm.bmp"\r
-IDB_ID_DIS              BITMAP                  "..\\..\\images\\id-dis.bmp"\r
-IDB_ID_DIS_SM           BITMAP                  "..\\..\\images\\id-dis-sm.bmp"\r
-IDB_ID_NEW_DIS          BITMAP                  "..\\..\\images\\id-new-dis.bmp"\r
-IDB_ID_NEW_DIS_SM       BITMAP                  "..\\..\\images\\id-new-dis-sm.bmp"\r
-IDB_ID_NEW_SM           BITMAP                  "..\\..\\images\\id-new-sm.bmp"\r
-IDB_ID_REFRESH_DIS      BITMAP                  "..\\..\\images\\id-refresh-dis.bmp"\r
-IDB_ID_REFRESH_SM       BITMAP                  "..\\..\\images\\id-refresh-sm.bmp"\r
-IDB_ID_REFRESH_DIS_SM   BITMAP                  "..\\..\\images\\id-refresh-sm-dis.bmp"\r
-IDB_TK_DELETE_DIS       BITMAP                  "..\\..\\images\\tk-delete-dis.bmp"\r
-IDB_TK_DELETE_DIS_SM    BITMAP                  "..\\..\\images\\tk-delete-dis-sm.bmp"\r
-IDB_TK_DELETE_SM        BITMAP                  "..\\..\\images\\tk-delete-sm.bmp"\r
-IDB_TK_DIS_SM           BITMAP                  "..\\..\\images\\tk-dis-sm.bmp"\r
-IDB_TK_NEW_DIS          BITMAP                  "..\\..\\images\\tk-new-dis.bmp"\r
-IDB_TK_NEW_DIS_SM       BITMAP                  "..\\..\\images\\tk-new-dis-sm.bmp"\r
-IDB_TK_NEW_SM           BITMAP                  "..\\..\\images\\tk-new-sm.bmp"\r
-IDB_TK_REFRESH_DIS      BITMAP                  "..\\..\\images\\tk-refresh-dis.bmp"\r
-IDB_TK_REFRESH_DIS_SM   BITMAP                  "..\\..\\images\\tk-refresh-dis-sm.bmp"\r
-IDB_TK_REFRESH_SM       BITMAP                  "..\\..\\images\\tk-refresh-sm.bmp"\r
-IDB_TK_SM               BITMAP                  "..\\..\\images\\tk-sm.bmp"\r
-IDB_HELP_SM             BITMAP                  "..\\..\\images\\help-sm.bmp"\r
-IDB_HELP                BITMAP                  "..\\..\\images\\help.bmp"\r
-IDB_LOGO_SHADE          BITMAP                  "..\\..\\images\\logo_shade.bmp"\r
-IDB_WDG_EXPAND          BITMAP                  "..\\..\\images\\wdg_expanded.bmp"\r
-IDB_WDG_COLLAPSE        BITMAP                  "..\\..\\images\\wdg_collapsed.bmp"\r
-IDB_ID_SM               BITMAP                  "..\\..\\images\\id-sm.bmp"\r
-IDB_WDG_EXPAND_HI       BITMAP                  "..\\..\\images\\wdg_expanded_hi.bmp"\r
-IDB_WDG_COLLAPSE_HI     BITMAP                  "..\\..\\images\\wdg_collapsed_hi.bmp"\r
-IDB_WDG_CREDTYPE        BITMAP                  "..\\..\\images\\wdg_credtype.bmp"\r
-IDB_WDG_FLAG            BITMAP                  "..\\..\\images\\wdg_flag.bmp"\r
-IDB_FLAG_WARN           BITMAP                  "..\\..\\images\\flag-warning.bmp"\r
-IDB_FLAG_EXPIRED        BITMAP                  "..\\..\\images\\flag_expired.bmp"\r
-IDB_FLAG_CRITICAL       BITMAP                  "..\\..\\images\\flag-critical.bmp"\r
-IDB_LOGO_OPAQUE         BITMAP                  "..\\..\\images\\khimaira-cfg.bmp"\r
-IDB_IMPORT_SM_DIS       BITMAP                  "..\\..\\images\\import-sm-dis.bmp"\r
-IDB_IMPORT              BITMAP                  "..\\..\\images\\import.bmp"\r
-IDB_IMPORT_DIS          BITMAP                  "..\\..\\images\\import-dis.bmp"\r
-IDB_IMPORT_SM           BITMAP                  "..\\..\\images\\import-sm.bmp"\r
-IDB_CHPW_SM             BITMAP                  "..\\..\\images\\chpw-sm.bmp"\r
-IDB_CHPW                BITMAP                  "..\\..\\images\\chpw.bmp"\r
-IDB_CHPW_DIS            BITMAP                  "..\\..\\images\\chpw-dis.bmp"\r
-IDB_CHPW_DIS_SM         BITMAP                  "..\\..\\images\\chpw-dis-sm.bmp"\r
-IDB_TB_SPACE            BITMAP                  "..\\..\\images\\tb-space.bmp"\r
-IDB_WDG_STUCK_HI        BITMAP                  "..\\..\\images\\wdg_stuck_hi.bmp"\r
-IDB_WDG_STICK           BITMAP                  "..\\..\\images\\wdg_stick.bmp"\r
-IDB_WDG_STICK_HI        BITMAP                  "..\\..\\images\\wdg_stick_hi.bmp"\r
-IDB_WDG_STUCK           BITMAP                  "..\\..\\images\\wdg_stuck.bmp"\r
-IDB_FLAG_RENEW          BITMAP                  "..\\..\\images\\flag_renewable.bmp"\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Accelerator\r
-//\r
-\r
-IDR_MENU_BAR ACCELERATORS \r
-BEGIN\r
-    VK_F10,         IDA_ACTIVATE_MENU,      VIRTKEY, NOINVERT\r
-    VK_UP,          IDA_UP,                 VIRTKEY, NOINVERT\r
-    VK_DOWN,        IDA_DOWN,               VIRTKEY, NOINVERT\r
-    VK_LEFT,        IDA_LEFT,               VIRTKEY, NOINVERT\r
-    VK_RIGHT,       IDA_RIGHT,              VIRTKEY, NOINVERT\r
-    VK_ESCAPE,      IDA_ESC,                VIRTKEY, NOINVERT\r
-    VK_EXECUTE,     IDA_ENTER,              VIRTKEY, NOINVERT\r
-END\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Dialog\r
-//\r
-\r
-IDD_NC_NEWCRED DIALOGEX 0, 0, 301, 167\r
-STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD\r
-EXSTYLE WS_EX_CONTROLPARENT\r
-FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
-BEGIN\r
-    LTEXT           "UI Row2",IDC_NC_TPL_ROW_LG,7,31,287,18,NOT WS_VISIBLE | WS_BORDER\r
-    LTEXT           "TplPanel",IDC_NC_TPL_PANEL,7,7,287,153,NOT WS_VISIBLE | WS_BORDER\r
-    LTEXT           "UI Row",IDC_NC_TPL_ROW,7,7,287,18,NOT WS_VISIBLE | WS_BORDER\r
-    LTEXT           "TplLabel",IDC_NC_TPL_LABEL,7,8,45,10,NOT WS_VISIBLE | WS_BORDER\r
-    LTEXT           "TplInput",IDC_NC_TPL_INPUT,54,7,240,13,NOT WS_VISIBLE | WS_BORDER\r
-    LTEXT           "TplLabelLg",IDC_NC_TPL_LABEL_LG,7,33,146,10,NOT WS_VISIBLE | WS_BORDER\r
-    LTEXT           "TplInputLg",IDC_NC_TPL_INPUT_LG,155,31,139,13,NOT WS_VISIBLE | WS_BORDER\r
-    LTEXT           "&Credentials",IDC_NC_CREDTEXT_LABEL,7,66,41,10,NOT WS_VISIBLE | NOT WS_GROUP\r
-    CONTROL         "",IDC_NC_CREDTEXT,"KhmHtWnd",NOT WS_VISIBLE | WS_TABSTOP,54,65,240,95,WS_EX_CLIENTEDGE\r
-    PUSHBUTTON      "&Ok",IDOK,101,142,89,18,WS_DISABLED\r
-    PUSHBUTTON      "&Cancel",IDCANCEL,198,142,54,18\r
-    PUSHBUTTON      "&>>",IDC_NC_ADVANCED,260,142,34,18\r
-END\r
-\r
-IDD_NC_BBAR DIALOGEX 0, 0, 66, 190\r
-STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_SYSMENU\r
-EXSTYLE WS_EX_CONTROLPARENT\r
-FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
-BEGIN\r
-    DEFPUSHBUTTON   "&Ok",IDOK,7,7,52,41,WS_DISABLED\r
-    PUSHBUTTON      "&Cancel",IDCANCEL,7,58,52,19\r
-    PUSHBUTTON      "<<",IDC_NC_BASIC,7,144,52,14\r
-    PUSHBUTTON      "&Help",IDC_NC_HELP,7,164,52,19\r
-END\r
-\r
-IDD_PP_IDENT DIALOGEX 0, 0, 235, 156\r
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_CAPTION\r
-EXSTYLE WS_EX_CONTROLPARENT\r
-CAPTION "Identity"\r
-FONT 8, "MS Shell Dlg", 0, 0, 0x0\r
-BEGIN\r
-    LTEXT           "Name",IDC_STATIC,7,8,19,12\r
-    LTEXT           "IdentityName",IDC_PP_IDNAME,34,7,194,12,NOT WS_GROUP,WS_EX_CLIENTEDGE\r
-    CONTROL         "Default identity",IDC_PP_IDDEF,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,34,22,71,12\r
-    CONTROL         "Searchable",IDC_PP_IDSEARCH,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,117,36,74,12\r
-    CONTROL         "Custom1",IDC_PP_PROPLIST,"NetIDMgrPropertyWnd",WS_TABSTOP,7,51,221,80\r
-    CONTROL         "Always visible (sticky)",IDC_PP_STICKY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,117,22,85,12\r
-    PUSHBUTTON      "Identity configuration ...",IDC_PP_CONFIG,117,135,111,14\r
-END\r
-\r
-IDD_PP_CRED DIALOGEX 0, 0, 236, 158\r
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_CAPTION\r
-CAPTION "Credential"\r
-FONT 8, "MS Shell Dlg", 0, 0, 0x0\r
-BEGIN\r
-    CONTROL         "Check1",IDC_PP_DUMMY,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,0,1,39,10\r
-    CONTROL         "Custom1",IDC_PP_CPROPLIST,"NetIDMgrPropertyWnd",WS_TABSTOP,7,7,222,144\r
-END\r
-\r
-IDD_CFG_MAIN DIALOGEX 0, 0, 357, 222\r
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU\r
-EXSTYLE WS_EX_CONTEXTHELP\r
-CAPTION "Network Identity Manager Configuration"\r
-FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
-BEGIN\r
-    LTEXT           "Title",IDC_CFG_TITLE,0,0,357,20,SS_CENTERIMAGE\r
-    CONTROL         "",IDC_CFG_NODELIST,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_TRACKSELECT | WS_TABSTOP | 0x800,0,20,100,182\r
-    LTEXT           "Static",IDC_CFG_PANE,102,20,255,182,NOT WS_VISIBLE | WS_BORDER\r
-    PUSHBUTTON      "&Ok",IDOK,162,205,78,16\r
-    PUSHBUTTON      "&Cancel",IDCANCEL,246,205,51,16\r
-    PUSHBUTTON      "&Apply",IDAPPLY,303,205,51,16,WS_DISABLED\r
-END\r
-\r
-IDD_CFG_GENERIC DIALOGEX 0, 0, 255, 182\r
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU\r
-FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
-BEGIN\r
-    CTEXT           "Please select one of the configuration categories on the left.",IDC_STATIC,21,17,212,18,SS_CENTERIMAGE,WS_EX_TRANSPARENT\r
-END\r
-\r
-IDD_CFG_GENERAL DIALOGEX 0, 0, 255, 182\r
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU\r
-FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
-BEGIN\r
-    GROUPBOX        "Startup / Shutdown",IDC_CFG_STARTUP_GROUP,7,7,241,44\r
-    CONTROL         "&Obtain new credentials at startup (if none are present)",IDC_CFG_AUTOINIT,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,20,196,10\r
-    CONTROL         "&Destroy all credentials on exit",IDC_CFG_DESTROYALL,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,36,111,10\r
-    GROUPBOX        "Other",IDC_CFG_OTHER,7,55,241,120\r
-    CONTROL         "&Run from taskbar notification area after window close",IDC_CFG_KEEPRUNNING,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,68,230,10\r
-    LTEXT           "Clicking on the &notification icon",IDC_CFG_NOTACT_STATIC,26,87,99,8\r
-    COMBOBOX        IDC_CFG_NOTACTION,133,85,110,48,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP\r
-    CONTROL         "&Monitor network connectivity",IDC_CFG_NETDETECT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,104,106,10\r
-    CONTROL         "&Log trace events to trace log at the following location:",IDC_CFG_LOGTOFILE,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,121,225,10\r
-    EDITTEXT        IDC_CFG_LOGPATH,16,135,173,14,ES_AUTOHSCROLL | ES_READONLY\r
-    PUSHBUTTON      "&Show log",IDC_CFG_SHOWLOG,193,135,50,14\r
-    CONTROL         "A&utomatically import Windows logon identity",IDC_CFG_AUTOIMPORT,\r
-                    "Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,16,156,165,10\r
-    CONTROL         "&Start Network Identity Manager during Windows logon",IDC_CFG_AUTOSTART,\r
-                    "Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP,113,165,135,10\r
-END\r
-\r
-IDD_CFG_IDENTITIES DIALOGEX 0, 0, 255, 182\r
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU\r
-EXSTYLE WS_EX_CONTROLPARENT\r
-FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
-BEGIN\r
-    CONTROL         "",IDC_CFG_TAB,"SysTabControl32",WS_TABSTOP,7,7,241,168\r
-    LTEXT           "Static",IDC_CFG_TARGET,10,21,235,151,NOT WS_VISIBLE | WS_BORDER\r
-END\r
-\r
-IDD_CFG_NOTIF DIALOGEX 0, 0, 255, 182\r
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU\r
-EXSTYLE WS_EX_CONTROLPARENT\r
-FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
-BEGIN\r
-    CONTROL         "&Renew automatically at",IDC_NOTIF_RENEW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,9,100,10\r
-    EDITTEXT        IDC_NOTIF_RENEW_THR,122,7,126,14,ES_AUTOHSCROLL\r
-    CONTROL         "Renew at &half life intervals when possible",IDC_NOTIF_HALFLIFE,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,48,27,148,10\r
-    CONTROL         "Initial warning at",IDC_NOTIF_WARN1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,46,100,10\r
-    EDITTEXT        IDC_NOTIF_WARN1_THR,122,44,126,14,ES_AUTOHSCROLL\r
-    CONTROL         "Final warning at",IDC_NOTIF_WARN2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,68,100,10\r
-    EDITTEXT        IDC_NOTIF_WARN2_THR,122,66,126,14,ES_AUTOHSCROLL\r
-    CONTROL         "&Monitor credential expiration",IDC_NOTIF_MONITOR,\r
-                    "Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,7,103,139,10\r
-END\r
-\r
-IDD_CFG_PLUGINS DIALOGEX 0, 0, 255, 182\r
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU\r
-EXSTYLE WS_EX_CONTROLPARENT\r
-FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
-BEGIN\r
-    CONTROL         "",IDC_CFG_PLUGINS,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,7,75,168\r
-    ICON            IDI_CFG_PLUGIN,IDC_CFG_ICON,87,11,20,20\r
-    EDITTEXT        IDC_CFG_DESC,128,7,120,30,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY\r
-    LTEXT           "&Module",IDC_CFG_LBL_MOD,87,43,24,8\r
-    EDITTEXT        IDC_CFG_MODULE,128,43,120,12,ES_AUTOHSCROLL | ES_READONLY\r
-    LTEXT           "&Version",IDC_STATIC,87,59,24,8\r
-    EDITTEXT        IDC_CFG_VERSION,128,59,120,12,ES_AUTOHSCROLL | ES_READONLY\r
-    LTEXT           "Ve&ndor",IDC_CFG_LBL_VEN,87,75,24,8\r
-    EDITTEXT        IDC_CFG_VENDOR,128,75,120,12,ES_AUTOHSCROLL | ES_READONLY\r
-    LTEXT           "De&pends on",IDC_CFG_LBL_DEPS,87,93,39,8\r
-    LISTBOX         IDC_CFG_DEPS,128,93,120,34,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP\r
-    LTEXT           "&Status",IDC_CFG_LBL_STATE,87,129,22,8\r
-    EDITTEXT        IDC_CFG_STATE,128,129,120,12,ES_AUTOHSCROLL | ES_READONLY\r
-    PUSHBUTTON      "&Enable ...",IDC_CFG_ENABLE,128,144,50,14,WS_DISABLED\r
-    PUSHBUTTON      "&Disable ...",IDC_CFG_DISABLE,198,144,50,14,WS_DISABLED\r
-    PUSHBUTTON      "&Unregister plugin ...",IDC_CFG_UNREGISTER,87,161,72,14,WS_DISABLED\r
-    PUSHBUTTON      "&Register new plugin ...",IDC_CFG_REGISTER,169,161,79,14,NOT WS_VISIBLE | WS_DISABLED\r
-END\r
-\r
-IDD_CFG_IDENTITY DIALOGEX 0, 0, 255, 182\r
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU\r
-EXSTYLE WS_EX_CONTROLPARENT\r
-FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
-BEGIN\r
-    CONTROL         "",IDC_CFG_TAB,"SysTabControl32",WS_TABSTOP,7,7,241,168\r
-    LTEXT           "Static",IDC_CFG_TARGET,10,21,235,151,NOT WS_VISIBLE | WS_BORDER\r
-END\r
-\r
-IDD_CFG_IDS_TAB DIALOGEX 0, 0, 235, 151\r
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU\r
-EXSTYLE WS_EX_CONTROLPARENT\r
-FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
-BEGIN\r
-    CONTROL         "Monitor credential expiration",IDC_CFG_MONITOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,107,10\r
-    CONTROL         "Automatically renew",IDC_CFG_RENEW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,20,81,10\r
-    CONTROL         "Always show in the credentials list (Pinned)",IDC_CFG_STICKY,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,34,151,10\r
-    PUSHBUTTON      "&Add new identity...",IDC_CFG_ADDIDENT,17,120,86,14\r
-END\r
-\r
-IDD_CFG_ID_TAB DIALOGEX 0, 0, 235, 151\r
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU\r
-EXSTYLE WS_EX_CONTROLPARENT\r
-FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
-BEGIN\r
-    CONTROL         "Always show in the credentials list (Pinned)",IDC_CFG_STICKY,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,34,151,10\r
-    CONTROL         "Monitor credential expiration",IDC_CFG_MONITOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,107,10\r
-    CONTROL         "Automatically renew",IDC_CFG_RENEW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,20,81,10\r
-    PUSHBUTTON      "Remove identity ...",IDC_CFG_REMOVE,139,122,78,14\r
-END\r
-\r
-IDD_ABOUT DIALOGEX 0, 0, 324, 238\r
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU\r
-CAPTION "About Network Identity Manager"\r
-FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
-BEGIN\r
-    DEFPUSHBUTTON   "OK",IDOK,267,7,50,14\r
-    LTEXT           "Productname",IDC_PRODUCT,41,7,225,13,NOT WS_GROUP\r
-    LTEXT           "© 2005-2007 Massachusetts Institute of Technology\n© 2006-2007 Secure Endpoints Inc.",IDC_COPYRIGHT,41,23,276,23,NOT WS_GROUP\r
-    LTEXT           "BuildInfo",IDC_BUILDINFO,41,49,276,20,NOT WS_GROUP\r
-    ICON            IDI_MAIN_APP,IDC_STATIC,6,7,20,20\r
-    CONTROL         "",IDC_MODULES,"SysListView32",LVS_REPORT | LVS_SORTASCENDING | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,41,88,276,143\r
-    LTEXT           "Loaded modules",IDC_STATIC,41,76,52,8\r
-END\r
-\r
-IDD_CFG_APPEAR DIALOGEX 0, 0, 255, 182\r
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU\r
-EXSTYLE WS_EX_CONTROLPARENT\r
-FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
-BEGIN\r
-    GROUPBOX        "Font for credentials display",IDC_STATIC,7,7,241,137\r
-    LTEXT           "&Font name",IDC_STATIC,17,22,35,8\r
-    COMBOBOX        IDC_CFG_FONTS,62,20,178,51,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP\r
-    LTEXT           "&Size",IDC_STATIC,62,43,14,8\r
-    COMBOBOX        IDC_CFG_SIZE,87,41,48,51,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    CONTROL         "&Bold",IDC_CFG_BOLD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,162,42,29,10\r
-    CONTROL         "&Italics",IDC_CFG_ITALICS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,42,35,10\r
-    EDITTEXT        IDC_CFG_SAMPLE_NORMAL,62,66,178,21,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE\r
-    EDITTEXT        IDC_CFG_SAMPLE_BOLD,62,91,178,21,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE\r
-    PUSHBUTTON      "&Revert to default",IDC_CFG_REVERT,168,122,72,14\r
-END\r
-\r
-IDD_CFG_ADDIDENT DIALOGEX 0, 0, 279, 95\r
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU\r
-CAPTION "Add new identity"\r
-FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
-BEGIN\r
-    LTEXT           "&Identity name",IDC_SM_LBL,7,10,46,8,NOT WS_VISIBLE\r
-    EDITTEXT        IDC_SM_CTL,67,7,205,14,ES_AUTOHSCROLL | NOT WS_VISIBLE\r
-    DEFPUSHBUTTON   "OK",IDOK,145,74,71,14\r
-    PUSHBUTTON      "Cancel",IDCANCEL,222,74,50,14\r
-    LTEXT           "&Identity name",IDC_MED_LBL,7,27,130,8,NOT WS_VISIBLE\r
-    EDITTEXT        IDC_MED_CTL,141,24,131,14,ES_AUTOHSCROLL | NOT WS_VISIBLE\r
-    LTEXT           "&Identity name",IDC_LG_LBL,7,41,265,8,NOT WS_VISIBLE\r
-    EDITTEXT        IDC_LG_CTL,141,50,131,14,ES_AUTOHSCROLL | NOT WS_VISIBLE\r
-END\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// DESIGNINFO\r
-//\r
-\r
-#ifdef APSTUDIO_INVOKED\r
-GUIDELINES DESIGNINFO \r
-BEGIN\r
-    IDD_NC_NEWCRED, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 294\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 160\r
-    END\r
-\r
-    IDD_NC_BBAR, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 59\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 183\r
-    END\r
-\r
-    IDD_PP_IDENT, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 228\r
-        VERTGUIDE, 34\r
-        VERTGUIDE, 117\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 149\r
-    END\r
-\r
-    IDD_PP_CRED, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 229\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 151\r
-    END\r
-\r
-    IDD_CFG_GENERIC, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 248\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 175\r
-    END\r
-\r
-    IDD_CFG_GENERAL, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 248\r
-        VERTGUIDE, 16\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 175\r
-    END\r
-\r
-    IDD_CFG_IDENTITIES, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 248\r
-        VERTGUIDE, 10\r
-        VERTGUIDE, 244\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 175\r
-        HORZGUIDE, 22\r
-        HORZGUIDE, 171\r
-    END\r
-\r
-    IDD_CFG_NOTIF, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 248\r
-        VERTGUIDE, 22\r
-        VERTGUIDE, 122\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 175\r
-    END\r
-\r
-    IDD_CFG_PLUGINS, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 248\r
-        VERTGUIDE, 87\r
-        VERTGUIDE, 128\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 175\r
-    END\r
-\r
-    IDD_CFG_IDENTITY, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 248\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 175\r
-    END\r
-\r
-    IDD_CFG_IDS_TAB, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 228\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 144\r
-    END\r
-\r
-    IDD_CFG_ID_TAB, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 228\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 144\r
-    END\r
-\r
-    IDD_ABOUT, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 6\r
-        RIGHTMARGIN, 317\r
-        VERTGUIDE, 41\r
-        VERTGUIDE, 266\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 231\r
-    END\r
-\r
-    IDD_CFG_APPEAR, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 248\r
-        VERTGUIDE, 7\r
-        VERTGUIDE, 62\r
-        VERTGUIDE, 240\r
-        VERTGUIDE, 248\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 175\r
-    END\r
-\r
-    IDD_CFG_ADDIDENT, DIALOG\r
-    BEGIN\r
-        LEFTMARGIN, 7\r
-        RIGHTMARGIN, 272\r
-        TOPMARGIN, 7\r
-        BOTTOMMARGIN, 88\r
-    END\r
-END\r
-#endif    // APSTUDIO_INVOKED\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// String Table\r
-//\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_MAIN_WINDOW_TITLE   "Network Identity Manager"\r
-    IDS_MENU_FILE           "&File"\r
-    IDS_MENU_CRED           "&Credential"\r
-    IDS_MENU_VIEW           "&View"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_MENU_OPTIONS        "&Options"\r
-    IDS_MENU_HELP           "&Help"\r
-    IDS_ACTION_PROPERTIES   "&Properties"\r
-    IDS_ACTION_EXIT         "E&xit"\r
-    IDS_CFG_ROOT_NAME       "Network Identity Manager"\r
-    IDS_ACTION_SET_DEF_ID   "Set as &default"\r
-    IDS_ACTION_SET_SRCH_ID  "Allow applications to &search"\r
-    IDS_CFG_ROOT_TITLE      "Network Identity Manager Configuration"\r
-    IDS_CFG_GENERAL_SHORT   "General"\r
-    IDS_ACTION_NEW_CRED     "Obtain &new credentials ..."\r
-    IDS_ACTION_PASSWD_ID    "Change &password"\r
-    IDS_ACTION_CHOOSE_COLS  "View columns"\r
-    IDS_ACTION_DEBUG_WINDOW "Debug window"\r
-    IDS_ACTION_VIEW_REFRESH "Refresh view"\r
-    IDS_MENU_LAYOUT         "Layout"\r
-    IDS_MENU_TOOLBARS       "Toolbars"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_ACTION_LAYOUT_ID    "By identity"\r
-    IDS_ACTION_LAYOUT_TYPE  "By type"\r
-    IDS_ACTION_LAYOUT_LOC   "By location"\r
-    IDS_ACTION_TB_STANDARD  "Standard"\r
-    IDS_ACTION_OPT_KHIM     "General"\r
-    IDS_ACTION_OPT_IDENTS   "Identities"\r
-    IDS_ACTION_OPT_NOTIF    "Notifications"\r
-    IDS_ACTION_HELP_CTX     "Help Contents"\r
-    IDS_ACTION_HELP_CONTENTS "Contents"\r
-    IDS_ACTION_HELP_INDEX   "Index"\r
-    IDS_ACTION_HELP_ABOUT   "About Network Identity Manager"\r
-    IDS_CFG_GENERAL_LONG    "General options"\r
-    IDS_SAMPLE_STRING       "Wxy"\r
-    IDS_NO_CREDS            "<large><p align=""center"">You currently have no credentials.</p><p align=""center"">Click <a id=""NewCreds"">here</a> to obtain new credentials.</p></large>"\r
-    IDS_WT_INIT_CREDS       "Obtain initial credentials"\r
-    IDS_WT_NEW_CREDS        "Obtain new credentials"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_NC_IDENTITY         "&Identity"\r
-    IDS_NC_IDENTS           "&Identities"\r
-    IDS_NC_CREDTEXT_ID_NONE "<p><b>(No identities specified)</b></p>"\r
-    IDS_NC_CREDTEXT_ID_ONE  "<p>Selected identity: <b>%s</b></p>"\r
-    IDS_NC_CREDTEXT_ID_MANY "<p>Primary identity: <b>%s</b></p><p>Additional identities: <b>%s</b></p>"\r
-    IDS_NC_CREDTEXT_ID_INVALID "<font color=""red"">%s (invalid)</font>"\r
-    IDS_WTPOST_INIT_CREDS   " - Initial credentials"\r
-    IDS_WTPOST_NEW_CREDS    " - New credentials"\r
-    IDS_ACTION_RENEW_CRED   "R&enew credentials"\r
-    IDS_ACTION_DESTROY_CRED "De&stroy credentials"\r
-    IDS_DEFAULT_FONT        "MS Shell Dlg"\r
-    IDS_NC_CREDTEXT_TABS    "<settab pos=""15""><settab pos=""30""><settab pos=""45"">"\r
-    IDS_NOTIFY_PREFIX       "Network Identity Manager - "\r
-    IDS_NOTIFY_READY        "Ready"\r
-    IDS_NOTIFY_ATTENTION    "Attention"\r
-    IDS_ALERT_DEFAULT       "Alert"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_PACTION_OK          "&Ok"\r
-    IDS_PACTION_CANCEL      "&Cancel"\r
-    IDS_PACTION_CLOSE       "&Close"\r
-    IDS_ALERT_NOSEL_TITLE   "No credentials selected"\r
-    IDS_ALERT_NOSEL         "Please select a credential, a credential type or an identity."\r
-    IDS_NC_CREDTEXT_ID_VALID "<font color=""blue"">%s</font>"\r
-    IDS_NC_CREDTEXT_ID_UNCHECKED "<font color=""grey"">%s (Unverified)</font>"\r
-    IDS_PROP_COL_PROPERTY   "Property"\r
-    IDS_PROP_COL_VALUE      "Value"\r
-    IDS_NC_NEW_IDENT        "( New identity ... )"\r
-    IDS_NC_CREDTEXT_ID_CHECKING "<font color=""grey"">%s (Checking...)</font>"\r
-    IDS_ACTION_OPEN_APP     "Show Network Identity Manager window"\r
-    IDS_CTX_NEW_IDENT       "Obaining new identity"\r
-    IDS_CTX_NEW_CREDS       "Obtaining new credentials"\r
-    IDS_CTX_RENEW_CREDS     "Renewing credentials"\r
-    IDS_CTX_PROC_NEW_IDENT  "Obtaining initial credentials for %1!s!"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_CTX_PROC_NEW_CREDS  "Obtaining new credentials for %1!s!"\r
-    IDS_CTX_PROC_RENEW_CREDS "Renewing credentials for %1!s!"\r
-    IDS_ACTION_CLOSE_APP    "Hide Network Identity Manager window"\r
-    IDS_NC_FAILED_TITLE     "Failed to acquire credentials"\r
-    IDS_CFG_IDENTITIES_SHORT "Identities"\r
-    IDS_CFG_IDENTITIES_LONG "Global Identity settings"\r
-    IDS_CFG_NOTIF_SHORT     "Notifications"\r
-    IDS_CFG_NOTIF_LONG      "Notifications"\r
-    IDS_CFG_PLUGINS_SHORT   "Plugins"\r
-    IDS_CFG_PLUGINS_LONG    "Plugins and Modules"\r
-    IDS_CFG_IDENTITY_SHORT  "%s"\r
-    IDS_CFG_IDENTITY_LONG   "Options for %s"\r
-    IDS_CTX_DESTROY_CREDS   "Destroying credentials"\r
-    IDS_WARN_EXPIRE         "Some of your credentials will expire in %s"\r
-    IDS_WARN_TITLE          "Credentials expiration warning"\r
-    IDS_ALERT_MOREINFO      "...\nClick here for more..."\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_WARN_EXPIRED        "Some of your credentials have expired."\r
-    IDS_WARN_EXPIRE_ID      "Credentials for %.180s will expire in %s"\r
-    IDS_WARN_EXPIRED_ID     "Credentials for %.220s have expired"\r
-    IDS_WARN_WM_TITLE       "Network Identity Manager is still running"\r
-    IDS_WARN_WM_MSG         "Click the Network Identity Manager icon below to open the application.\n\nOr right click the icon to access the Network Identity Manager menu."\r
-    IDS_CFG_ID_TAB_SHORT    "General"\r
-    IDS_CFG_ID_TAB_LONG     "General options for this identity"\r
-    IDS_CFG_IDS_TAB_SHORT   "General"\r
-    IDS_CFG_IDS_TAB_LONG    "General options for all identities"\r
-    IDS_CFG_IDS_IDENTITY    "Identity"\r
-    IDS_ACTION_IMPORT       "Import Credentials"\r
-    IDS_CTX_IMPORT          "Importing credentials from Windows"\r
-    IDS_CFG_PI_COL_PLUGINS  "Plugins"\r
-    IDS_PISTATE_FAILUNK     "Unknown failure"\r
-    IDS_PISTATE_FAILMAX     "Maximum failure count reached"\r
-    IDS_PISTATE_FAILREG     "Not properly registered"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_PISTATE_FAILDIS     "Disabled"\r
-    IDS_PISTATE_FAILLOD     "Failed to initialize"\r
-    IDS_PISTATE_PLACEHOLD   "Not loaded"\r
-    IDS_PISTATE_REG         "Not initialized"\r
-    IDS_PISTATE_HOLD        "Waiting for dependencies"\r
-    IDS_PISTATE_INIT        "Initializing"\r
-    IDS_PISTATE_RUN         "Running"\r
-    IDS_PISTATE_EXIT        "Stopped"\r
-    IDS_CTX_PASSWORD        "Changing password"\r
-    IDS_WT_PASSWORD         "Changing password"\r
-    IDS_WTPOST_PASSWORD     " - Changing password"\r
-    IDS_CTX_PROC_PASSWORD   "Changing password for %1!s!"\r
-    IDS_NC_PWD_FAILED_TITLE "Failed to change password"\r
-    IDS_CMDLINE_HELP        "Command line options for Network Identity Manager are :\n\n-a or --autoinit: Auto initialize credentials\n-i or --kinit: Obtain new credentials\n-d or --destroy: Destroy default identity\n-r or --renew: Renew all credentials\n-x or --exit: Exit the running instance of Network Identity Manager"\r
-    IDS_PACTION_NEXT        "Next alert"\r
-    IDS_ERR_TITLE_NO_IDENTPRO "Cannot proceed without identity provider"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_ERR_MSG_NO_IDENTPRO "There is no identity provider currently loaded.  The identity provider is the component of Network Identity Manager that verifies and performs operations on actual identities.  Without this provider, many critical operations cannot be performed."\r
-    IDS_ERR_SUGG_NO_IDENTPRO \r
-                            "This is quite possibly caused by the identity provider module failing to load properly."\r
-    IDS_NC_REN_FAILED_TITLE "Failed to renew credentials"\r
-    IDS_CW_DEFAULT          "(Default)"\r
-    IDS_ACTION_OPT_PLUGINS  "Plugins"\r
-    IDS_NC_SETDEF           "&Set as default identity"\r
-    IDS_NC_ID_DEF           "<p>This identity is the default</p>"\r
-    IDS_NC_ID_WDEF          "<p>Will be the default. (<a id=""NotDef"">Don't make default</a>)</p>"\r
-    IDS_NC_ID_NDEF          "<p>Not default identity.  (<a id=""MakeDef"">make default</a>)</p>"\r
-    IDS_PACTION_YES         "&Yes"\r
-    IDS_PACTION_NO          "&No"\r
-    IDS_PACTION_YESALL      "Y&es to all"\r
-    IDS_PACTION_NOALL       "N&o to all"\r
-    IDS_PACTION_KEEP        "&Keep"\r
-    IDS_PACTION_REMOVE      "&Remove"\r
-    IDS_PACTION_DISCARD     "&Discard"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_CFG_IT_MOD          "Changes need to be applied"\r
-    IDS_CFG_IT_APP          "Changes have been applied"\r
-    IDS_CFG_IT_NONE         "No changes"\r
-    IDS_CFG_NODESC          "(Description for plugin %s is not available)"\r
-    IDS_CFG_P_DELCNFT       "About to disable plugin %s"\r
-    IDS_CFG_P_DELCNFM       "Are you sure you want to disable plugin %s ?\n\nOnce disabled, the services provided by the plugin will no longer be available. In addition, any other plugins that depend on this plugin will also become non functional.\n\nNetwork Identity Manager will need to be restarted for the plugin to be deactivated."\r
-    IDS_CFG_P_DELCNFS       "The following plugins depend on this plugin : %s"\r
-    IDS_CFG_P_DELNDEP       "No other plugins depend on this plugin."\r
-    IDS_CFG_P_ENBCNFT       "About to enable plugin %s"\r
-    IDS_CFG_P_ENBCNFM       "The plugin %s will be marked as enabled.  The plugin will be come active the next time Network Identity Manager is started."\r
-    IDS_PISTATE_FAILINIT    "Failed to initialize"\r
-    IDS_CFG_P_UNRCNFT       "Unregistering plugin %s"\r
-    IDS_CFG_P_UNRCNFM       "Are you sure you want to unregister plugin %s? In addition to this plugin, any other plugins that are provided by the same module will also be unregistered.\n\nThe plugin will no longer be loaded for subsequent sessions of Network Identity Manager."\r
-    IDS_CFG_P_UNRCNFS       "Note that if the plugin was registered by a seprate installer, it should be unregistered by the same installer and not through Network Identity Manager.\n\nThe following plugins will be unregistered: %s"\r
-    IDS_ACTION_LAYOUT_CUST  "Custom"\r
-    IDS_APR_HEADER_TEXT     "Header text"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_APR_HEADER_TEXT_BOLD "Header text (selected)"\r
-    IDS_APR_TEXT            "Normal text"\r
-    IDS_APR_TEXT_BOLD       "Normal text (selected)"\r
-    IDS_APR_SAMPLE_TEXT_NORMAL "Sample text (normal). 01234567890"\r
-    IDS_CFG_APPEAR_SHORT    "Appearance"\r
-    IDS_CFG_APPEAR_LONG     "Appearance"\r
-    IDS_ACTION_OPT_APPEAR   "Appearance"\r
-    IDS_APR_SAMPLE_TEXT_SEL "Sample text (selected). 01234567890"\r
-    IDS_CFG_IDNAME_INV      "The identity name %s is invalid."\r
-    IDS_CFG_IDNAME_PRB      "Can't add new identity %s"\r
-    IDS_CFG_IDNAME_EXT      "The identity name %s already exists."\r
-    IDS_CFG_IDNAME_CCR      "Can't create new identity.  This may be caused by lack of resources or an unknown failure.  The code returned was %d."\r
-    IDS_CFG_IDNAME_CCC      "Can't create identity configuration.  This may be caused by lack or resources or not having the correct permissions to create the configuration space.  The code returned was %d."\r
-    IDS_CFG_LOGF_CS         "Can't show log file"\r
-    IDS_CFG_LOGF_CSR        "The log file %s does not exist."\r
-    IDS_ACTIONT_PROPERTIES  "Show properties for the current selection"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_ACTIONT_EXIT        "Exit Network Identity Manager"\r
-    IDS_ACTIONT_SET_DEF_ID  "Set the currently selected identity as the default identity"\r
-    IDS_ACTIONT_PASSWD_ID   "Change the password the currently selected identity"\r
-    IDS_ACTIONT_NEW_CRED    "Obtain new credentials"\r
-    IDS_ACTIONT_RENEW_CRED  "Renew or re-obtain credentials for the currently selected identity"\r
-    IDS_ACTIONT_DESTROY_CRED "Destroy the selected credentials or identities"\r
-    IDS_ACTIONT_VIEW_REFRESH \r
-                            "Re-obtain information about credentials and refresh the credentials display"\r
-    IDS_ACTIONT_OPT_IDENTS  "Change options for identities"\r
-    IDS_ACTIONT_OPT_KHIM    "Change general application settings for Network Identity Manager"\r
-    IDS_ACTIONT_OPT_NOTIF   "Change notification options"\r
-    IDS_ACTIONT_OPT_PLUGINS "Change options for plug-ins and modules"\r
-    IDS_ACTIONT_OPT_APPEAR  "Change appearance and display settings"\r
-    IDS_ACTIONT_HELP_CTX    "Display user documentation"\r
-    IDS_ACTIONT_IMPORT      "Import credentials from external sources such as the Windows LSA"\r
-    IDS_NC_FAILED_TITLE_I   "Failed to get credentials for %s"\r
-    IDS_NC_PWD_FAILED_TITLE_I "Failed to change password for %s"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_NC_REN_FAILED_TITLE_I "Failed to renew credentials for %s"\r
-    IDS_CFG_IDNAME_NON      "No identity selected.  Please select an identity and try again."\r
-    IDS_MENU_DESTROY_CRED   "Destroy"\r
-    IDS_MENU_RENEW_CRED     "Renew"\r
-    IDS_ACTION_DESTROY_ALL  "Destroy all identities"\r
-    IDS_ACTION_RENEW_ALL    "Renew all identities"\r
-    IDS_IDACTION_RENEW      "Renew %s"\r
-    IDS_IDACTION_DESTROY    "Destroy %s"\r
-    IDS_CTX_DESTROY_ID      "Destroying identity %1!s!"\r
-    IDS_NCN_IDENT_INVALID   "Identity %s is invalid."\r
-    IDS_NCN_IDENT_CHECKING  "Checking identity %s ..."\r
-    IDS_NCN_IDENT_UNKNOWN   "Validity of identity %s coudn't be determined."\r
-    IDS_REMOTE_FAIL         "The instance of Network Identity Manager that is already running is not responding to the remote request properly.  Please check if you are running the latest version of Network Identity Manger software included with MIT Kerberos for Windows."\r
-    IDS_REMOTE_FAIL_TITLE   "Failed to communicate with Network Identity Manager"\r
-    IDS_IDACTION_NEW        "Obtain new credentials for %s"\r
-    IDS_IDACTIONT_NEW       "New credentials for %s"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
-    IDS_IDACTIONT_RENEW     "Renew credentials for %s"\r
-    IDS_IDACTIONT_DESTROY   "Destroy credentials for %s"\r
-    IDS_ALERTTYPE_PLUGIN    "Failed to load plug-in"\r
-    IDS_ALERTTYPE_EXPIRE    "Credential expiration warning"\r
-    IDS_ALERTTYPE_RENEWFAIL "Failed to renew credentials"\r
-    IDS_ALERTTYPE_ACQUIREFAIL "Failed to acquire credentials"\r
-    IDS_ALERTTYPE_CHPW      "Failed to change password"\r
-    IDS_ACTION_LAYOUT_MINI  "&Advanced"\r
-    IDS_IDEXPDISP_NOCRED    "(This identity has no credentials)"\r
-    IDS_IDEXPDISP_1CRED     "(This identity has 1 credential)"\r
-    IDS_IDEXPDISP_NCRED     "(This identity has %d credentials)"\r
-    IDS_CW_DEFAULTTF        "(Default, %s)"\r
-    IDS_CW_TYPEF            "(%s)"\r
-    IDS_CW_EXPIREF          "Expires in %s"\r
-    IDS_CW_EXPIRED          "(Expired)"\r
-END\r
-\r
-#endif    // English (U.S.) resources\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-\r
-\r
-#ifndef APSTUDIO_INVOKED\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Generated from the TEXTINCLUDE 3 resource.\r
-//\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-#endif    // not APSTUDIO_INVOKED\r
-\r
-\r
-\r
+// Microsoft Visual C++ generated resource script.
+//
+#include "..\..\resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+    "..\\..\\resource.h\0"
+END
+
+2 TEXTINCLUDE 
+BEGIN
+    "#include ""afxres.h""\0"
+END
+
+3 TEXTINCLUDE 
+BEGIN
+    "\r\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_MAIN_APP            ICON                    "..\\..\\images\\main_app.ico"
+IDI_ENABLED             ICON                    "..\\..\\images\\enabled.ico"
+IDI_DISABLED            ICON                    "..\\..\\images\\disabled.ico"
+IDI_NOTIFY_NONE         ICON                    "..\\..\\images\\app_notify_none.ico"
+IDI_NOTIFY_INFO         ICON                    "..\\..\\images\\app_notify_info.ico"
+IDI_NOTIFY_WARN         ICON                    "..\\..\\images\\app_notify_warn.ico"
+IDI_NOTIFY_ERROR        ICON                    "..\\..\\images\\app_notify_error.ico"
+IDI_CFG_DEFAULT         ICON                    "..\\..\\images\\cfg_default.ico"
+IDI_CFG_MODIFIED        ICON                    "..\\..\\images\\cfg_mod.ico"
+IDI_CFG_APPLIED         ICON                    "..\\..\\images\\cfg_applied.ico"
+IDI_CFG_DELETED         ICON                    "..\\..\\images\\cfg_deleted.ico"
+IDI_ID                  ICON                    "..\\..\\images\\id.ico"
+IDI_APPICON_WARN        ICON                    "..\\..\\images\\app_state_warn.ico"
+IDI_APPICON_EXP         ICON                    "..\\..\\images\\app_state_exp.ico"
+IDI_APPICON_OK          ICON                    "..\\..\\images\\app_state_ok.ico"
+IDI_CFG_PLUGIN          ICON                    "..\\..\\images\\cfg_plugin.ico"
+IDI_CFG_PLUGIN_ERR      ICON                    "..\\..\\images\\cfg_plugin_err.ico"
+IDI_CFG_PLUGIN_DIS      ICON                    "..\\..\\images\\cfg_plugin_dis.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+IDB_TK_REFRESH          BITMAP                  "..\\..\\images\\tk-refresh.bmp"
+IDB_ID                  BITMAP                  "..\\..\\images\\id.bmp"
+IDB_ID_DELETE           BITMAP                  "..\\..\\images\\id-delete.bmp"
+IDB_ID_NEW              BITMAP                  "..\\..\\images\\id-new.bmp"
+IDB_ID_REFRESH          BITMAP                  "..\\..\\images\\id-refresh.bmp"
+IDB_TK                  BITMAP                  "..\\..\\images\\tk.bmp"
+IDB_TK_DELETE           BITMAP                  "..\\..\\images\\tk-delete.bmp"
+IDB_TK_NEW              BITMAP                  "..\\..\\images\\tk-new.bmp"
+IDB_VW_REFRESH_SM       BITMAP                  "..\\..\\images\\vw-refresh-sm.bmp"
+IDB_TB_BLANK            BITMAP                  "..\\..\\images\\tb-blank.bmp"
+IDB_TB_BLANK_SM         BITMAP                  "..\\..\\images\\tb-blank-small.bmp"
+IDB_VW_REFRESH          BITMAP                  "..\\..\\images\\vw-refresh.bmp"
+IDB_ID_DELETE_DIS       BITMAP                  "..\\..\\images\\id-delete-dis.bmp"
+IDB_ID_DELETE_DIS_SM    BITMAP                  "..\\..\\images\\id-delete-dis-sm.bmp"
+IDB_ID_DELETE_SM        BITMAP                  "..\\..\\images\\id-delete-sm.bmp"
+IDB_ID_DIS              BITMAP                  "..\\..\\images\\id-dis.bmp"
+IDB_ID_DIS_SM           BITMAP                  "..\\..\\images\\id-dis-sm.bmp"
+IDB_ID_NEW_DIS          BITMAP                  "..\\..\\images\\id-new-dis.bmp"
+IDB_ID_NEW_DIS_SM       BITMAP                  "..\\..\\images\\id-new-dis-sm.bmp"
+IDB_ID_NEW_SM           BITMAP                  "..\\..\\images\\id-new-sm.bmp"
+IDB_ID_REFRESH_DIS      BITMAP                  "..\\..\\images\\id-refresh-dis.bmp"
+IDB_ID_REFRESH_SM       BITMAP                  "..\\..\\images\\id-refresh-sm.bmp"
+IDB_ID_REFRESH_DIS_SM   BITMAP                  "..\\..\\images\\id-refresh-sm-dis.bmp"
+IDB_TK_DELETE_DIS       BITMAP                  "..\\..\\images\\tk-delete-dis.bmp"
+IDB_TK_DELETE_DIS_SM    BITMAP                  "..\\..\\images\\tk-delete-dis-sm.bmp"
+IDB_TK_DELETE_SM        BITMAP                  "..\\..\\images\\tk-delete-sm.bmp"
+IDB_TK_DIS_SM           BITMAP                  "..\\..\\images\\tk-dis-sm.bmp"
+IDB_TK_NEW_DIS          BITMAP                  "..\\..\\images\\tk-new-dis.bmp"
+IDB_TK_NEW_DIS_SM       BITMAP                  "..\\..\\images\\tk-new-dis-sm.bmp"
+IDB_TK_NEW_SM           BITMAP                  "..\\..\\images\\tk-new-sm.bmp"
+IDB_TK_REFRESH_DIS      BITMAP                  "..\\..\\images\\tk-refresh-dis.bmp"
+IDB_TK_REFRESH_DIS_SM   BITMAP                  "..\\..\\images\\tk-refresh-dis-sm.bmp"
+IDB_TK_REFRESH_SM       BITMAP                  "..\\..\\images\\tk-refresh-sm.bmp"
+IDB_TK_SM               BITMAP                  "..\\..\\images\\tk-sm.bmp"
+IDB_HELP_SM             BITMAP                  "..\\..\\images\\help-sm.bmp"
+IDB_HELP                BITMAP                  "..\\..\\images\\help.bmp"
+IDB_LOGO_SHADE          BITMAP                  "..\\..\\images\\logo_shade.bmp"
+IDB_WDG_EXPAND          BITMAP                  "..\\..\\images\\wdg_expanded.bmp"
+IDB_WDG_COLLAPSE        BITMAP                  "..\\..\\images\\wdg_collapsed.bmp"
+IDB_ID_SM               BITMAP                  "..\\..\\images\\id-sm.bmp"
+IDB_WDG_EXPAND_HI       BITMAP                  "..\\..\\images\\wdg_expanded_hi.bmp"
+IDB_WDG_COLLAPSE_HI     BITMAP                  "..\\..\\images\\wdg_collapsed_hi.bmp"
+IDB_WDG_CREDTYPE        BITMAP                  "..\\..\\images\\wdg_credtype.bmp"
+IDB_WDG_FLAG            BITMAP                  "..\\..\\images\\wdg_flag.bmp"
+IDB_FLAG_WARN           BITMAP                  "..\\..\\images\\flag-warning.bmp"
+IDB_FLAG_EXPIRED        BITMAP                  "..\\..\\images\\flag_expired.bmp"
+IDB_FLAG_CRITICAL       BITMAP                  "..\\..\\images\\flag-critical.bmp"
+IDB_LOGO_OPAQUE         BITMAP                  "..\\..\\images\\khimaira-cfg.bmp"
+IDB_IMPORT_SM_DIS       BITMAP                  "..\\..\\images\\import-sm-dis.bmp"
+IDB_IMPORT              BITMAP                  "..\\..\\images\\import.bmp"
+IDB_IMPORT_DIS          BITMAP                  "..\\..\\images\\import-dis.bmp"
+IDB_IMPORT_SM           BITMAP                  "..\\..\\images\\import-sm.bmp"
+IDB_CHPW_SM             BITMAP                  "..\\..\\images\\chpw-sm.bmp"
+IDB_CHPW                BITMAP                  "..\\..\\images\\chpw.bmp"
+IDB_CHPW_DIS            BITMAP                  "..\\..\\images\\chpw-dis.bmp"
+IDB_CHPW_DIS_SM         BITMAP                  "..\\..\\images\\chpw-dis-sm.bmp"
+IDB_TB_SPACE            BITMAP                  "..\\..\\images\\tb-space.bmp"
+IDB_WDG_STUCK_HI        BITMAP                  "..\\..\\images\\wdg_stuck_hi.bmp"
+IDB_WDG_STICK           BITMAP                  "..\\..\\images\\wdg_stick.bmp"
+IDB_WDG_STICK_HI        BITMAP                  "..\\..\\images\\wdg_stick_hi.bmp"
+IDB_WDG_STUCK           BITMAP                  "..\\..\\images\\wdg_stuck.bmp"
+IDB_FLAG_RENEW          BITMAP                  "..\\..\\images\\flag_renewable.bmp"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Accelerator
+//
+
+IDR_MENU_BAR ACCELERATORS 
+BEGIN
+    VK_F10,         IDA_ACTIVATE_MENU,      VIRTKEY, NOINVERT
+    VK_UP,          IDA_UP,                 VIRTKEY, NOINVERT
+    VK_DOWN,        IDA_DOWN,               VIRTKEY, NOINVERT
+    VK_LEFT,        IDA_LEFT,               VIRTKEY, NOINVERT
+    VK_RIGHT,       IDA_RIGHT,              VIRTKEY, NOINVERT
+    VK_ESCAPE,      IDA_ESC,                VIRTKEY, NOINVERT
+    VK_EXECUTE,     IDA_ENTER,              VIRTKEY, NOINVERT
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_NC_NEWCRED DIALOGEX 0, 0, 301, 167
+STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+    LTEXT           "UI Row2",IDC_NC_TPL_ROW_LG,7,31,287,18,NOT WS_VISIBLE | WS_BORDER
+    LTEXT           "TplPanel",IDC_NC_TPL_PANEL,7,7,287,153,NOT WS_VISIBLE | WS_BORDER
+    LTEXT           "UI Row",IDC_NC_TPL_ROW,7,7,287,18,NOT WS_VISIBLE | WS_BORDER
+    LTEXT           "TplLabel",IDC_NC_TPL_LABEL,7,8,45,10,NOT WS_VISIBLE | WS_BORDER
+    LTEXT           "TplInput",IDC_NC_TPL_INPUT,54,7,240,13,NOT WS_VISIBLE | WS_BORDER
+    LTEXT           "TplLabelLg",IDC_NC_TPL_LABEL_LG,7,33,146,10,NOT WS_VISIBLE | WS_BORDER
+    LTEXT           "TplInputLg",IDC_NC_TPL_INPUT_LG,155,31,139,13,NOT WS_VISIBLE | WS_BORDER
+    LTEXT           "&Credentials",IDC_NC_CREDTEXT_LABEL,7,66,41,10,NOT WS_VISIBLE | NOT WS_GROUP
+    CONTROL         "",IDC_NC_CREDTEXT,"KhmHtWnd",NOT WS_VISIBLE | WS_TABSTOP,54,65,240,95,WS_EX_CLIENTEDGE
+    PUSHBUTTON      "&Ok",IDOK,101,142,89,18,WS_DISABLED
+    PUSHBUTTON      "&Cancel",IDCANCEL,198,142,54,18
+    PUSHBUTTON      "&>>",IDC_NC_ADVANCED,260,142,34,18
+END
+
+IDD_NC_BBAR DIALOGEX 0, 0, 66, 190
+STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_SYSMENU
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+    DEFPUSHBUTTON   "&Ok",IDOK,7,7,52,41,WS_DISABLED
+    PUSHBUTTON      "&Cancel",IDCANCEL,7,58,52,19
+    PUSHBUTTON      "<<",IDC_NC_BASIC,7,144,52,14
+    PUSHBUTTON      "&Help",IDC_NC_HELP,7,164,52,19
+END
+
+IDD_PP_IDENT DIALOGEX 0, 0, 235, 156
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_CAPTION
+EXSTYLE WS_EX_CONTROLPARENT
+CAPTION "Identity"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+    LTEXT           "Name",IDC_STATIC,7,8,19,12
+    LTEXT           "IdentityName",IDC_PP_IDNAME,34,7,194,12,NOT WS_GROUP,WS_EX_CLIENTEDGE
+    CONTROL         "Default identity",IDC_PP_IDDEF,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,34,22,71,12
+    CONTROL         "Searchable",IDC_PP_IDSEARCH,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,117,36,74,12
+    CONTROL         "Custom1",IDC_PP_PROPLIST,"NetIDMgrPropertyWnd",WS_TABSTOP,7,51,221,80
+    CONTROL         "Always visible (sticky)",IDC_PP_STICKY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,117,22,85,12
+    PUSHBUTTON      "Identity configuration ...",IDC_PP_CONFIG,117,135,111,14
+END
+
+IDD_PP_CRED DIALOGEX 0, 0, 236, 158
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_CAPTION
+CAPTION "Credential"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+    CONTROL         "Check1",IDC_PP_DUMMY,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,0,1,39,10
+    CONTROL         "Custom1",IDC_PP_CPROPLIST,"NetIDMgrPropertyWnd",WS_TABSTOP,7,7,222,144
+END
+
+IDD_CFG_MAIN DIALOGEX 0, 0, 357, 222
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_CONTEXTHELP
+CAPTION "Network Identity Manager Configuration"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+    LTEXT           "Title",IDC_CFG_TITLE,0,0,357,20,SS_CENTERIMAGE
+    CONTROL         "",IDC_CFG_NODELIST,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_TRACKSELECT | WS_TABSTOP | 0x800,0,20,100,182
+    LTEXT           "Static",IDC_CFG_PANE,102,20,255,182,NOT WS_VISIBLE | WS_BORDER
+    PUSHBUTTON      "&Ok",IDOK,162,205,78,16
+    PUSHBUTTON      "&Cancel",IDCANCEL,246,205,51,16
+    PUSHBUTTON      "&Apply",IDAPPLY,303,205,51,16,WS_DISABLED
+END
+
+IDD_CFG_GENERIC DIALOGEX 0, 0, 255, 182
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+    CTEXT           "Please select one of the configuration categories on the left.",IDC_STATIC,21,17,212,18,SS_CENTERIMAGE,WS_EX_TRANSPARENT
+END
+
+IDD_CFG_GENERAL DIALOGEX 0, 0, 255, 182
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+    GROUPBOX        "Startup / Shutdown",IDC_CFG_STARTUP_GROUP,7,7,241,44
+    CONTROL         "&Obtain new credentials at startup (if none are present)",IDC_CFG_AUTOINIT,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,20,196,10
+    CONTROL         "&Destroy all credentials on exit",IDC_CFG_DESTROYALL,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,36,111,10
+    GROUPBOX        "Other",IDC_CFG_OTHER,7,55,241,120
+    CONTROL         "&Run from taskbar notification area after window close",IDC_CFG_KEEPRUNNING,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,68,230,10
+    LTEXT           "Clicking on the &notification icon",IDC_CFG_NOTACT_STATIC,26,87,99,8
+    COMBOBOX        IDC_CFG_NOTACTION,133,85,110,48,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "&Monitor network connectivity",IDC_CFG_NETDETECT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,104,106,10
+    CONTROL         "&Log trace events to trace log at the following location:",IDC_CFG_LOGTOFILE,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,121,225,10
+    EDITTEXT        IDC_CFG_LOGPATH,16,135,173,14,ES_AUTOHSCROLL | ES_READONLY
+    PUSHBUTTON      "&Show log",IDC_CFG_SHOWLOG,193,135,50,14
+    CONTROL         "A&utomatically import Windows logon identity",IDC_CFG_AUTOIMPORT,
+                    "Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,16,156,165,10
+    CONTROL         "&Start Network Identity Manager during Windows logon",IDC_CFG_AUTOSTART,
+                    "Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP,113,165,135,10
+END
+
+IDD_CFG_IDENTITIES DIALOGEX 0, 0, 255, 182
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+    CONTROL         "",IDC_CFG_TAB,"SysTabControl32",WS_TABSTOP,7,7,241,168
+    LTEXT           "Static",IDC_CFG_TARGET,10,21,235,151,NOT WS_VISIBLE | WS_BORDER
+END
+
+IDD_CFG_NOTIF DIALOGEX 0, 0, 255, 182
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+    CONTROL         "&Renew automatically at",IDC_NOTIF_RENEW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,9,100,10
+    EDITTEXT        IDC_NOTIF_RENEW_THR,122,7,126,14,ES_AUTOHSCROLL
+    CONTROL         "Renew at &half life intervals when possible",IDC_NOTIF_HALFLIFE,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,48,27,148,10
+    CONTROL         "Initial warning at",IDC_NOTIF_WARN1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,46,100,10
+    EDITTEXT        IDC_NOTIF_WARN1_THR,122,44,126,14,ES_AUTOHSCROLL
+    CONTROL         "Final warning at",IDC_NOTIF_WARN2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,68,100,10
+    EDITTEXT        IDC_NOTIF_WARN2_THR,122,66,126,14,ES_AUTOHSCROLL
+    CONTROL         "&Monitor credential expiration",IDC_NOTIF_MONITOR,
+                    "Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,7,103,139,10
+END
+
+IDD_CFG_PLUGINS DIALOGEX 0, 0, 255, 182
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+    CONTROL         "",IDC_CFG_PLUGINS,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,7,75,168
+    ICON            IDI_CFG_PLUGIN,IDC_CFG_ICON,87,11,20,20
+    EDITTEXT        IDC_CFG_DESC,128,7,120,30,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY
+    LTEXT           "&Module",IDC_CFG_LBL_MOD,87,43,24,8
+    EDITTEXT        IDC_CFG_MODULE,128,43,120,12,ES_AUTOHSCROLL | ES_READONLY
+    LTEXT           "&Version",IDC_STATIC,87,59,24,8
+    EDITTEXT        IDC_CFG_VERSION,128,59,120,12,ES_AUTOHSCROLL | ES_READONLY
+    LTEXT           "Ve&ndor",IDC_CFG_LBL_VEN,87,75,24,8
+    EDITTEXT        IDC_CFG_VENDOR,128,75,120,12,ES_AUTOHSCROLL | ES_READONLY
+    LTEXT           "De&pends on",IDC_CFG_LBL_DEPS,87,93,39,8
+    LISTBOX         IDC_CFG_DEPS,128,93,120,34,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
+    LTEXT           "&Status",IDC_CFG_LBL_STATE,87,129,22,8
+    EDITTEXT        IDC_CFG_STATE,128,129,120,12,ES_AUTOHSCROLL | ES_READONLY
+    PUSHBUTTON      "&Enable ...",IDC_CFG_ENABLE,128,144,50,14,WS_DISABLED
+    PUSHBUTTON      "&Disable ...",IDC_CFG_DISABLE,198,144,50,14,WS_DISABLED
+    PUSHBUTTON      "&Unregister plugin ...",IDC_CFG_UNREGISTER,87,161,72,14,WS_DISABLED
+    PUSHBUTTON      "&Register new plugin ...",IDC_CFG_REGISTER,169,161,79,14,NOT WS_VISIBLE | WS_DISABLED
+END
+
+IDD_CFG_IDENTITY DIALOGEX 0, 0, 255, 182
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+    CONTROL         "",IDC_CFG_TAB,"SysTabControl32",WS_TABSTOP,7,7,241,168
+    LTEXT           "Static",IDC_CFG_TARGET,10,21,235,151,NOT WS_VISIBLE | WS_BORDER
+END
+
+IDD_CFG_IDS_TAB DIALOGEX 0, 0, 235, 151
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+    CONTROL         "Monitor credential expiration",IDC_CFG_MONITOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,107,10
+    CONTROL         "Automatically renew",IDC_CFG_RENEW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,20,81,10
+    CONTROL         "Always show in the credentials list (Pinned)",IDC_CFG_STICKY,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,34,151,10
+    PUSHBUTTON      "&Add new identity...",IDC_CFG_ADDIDENT,17,120,86,14
+END
+
+IDD_CFG_ID_TAB DIALOGEX 0, 0, 235, 151
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+    CONTROL         "Always show in the credentials list (Pinned)",IDC_CFG_STICKY,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,34,151,10
+    CONTROL         "Monitor credential expiration",IDC_CFG_MONITOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,107,10
+    CONTROL         "Automatically renew",IDC_CFG_RENEW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,20,81,10
+    PUSHBUTTON      "Remove identity ...",IDC_CFG_REMOVE,139,122,78,14
+END
+
+IDD_ABOUT DIALOGEX 0, 0, 324, 238
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "About Network Identity Manager"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+    DEFPUSHBUTTON   "OK",IDOK,267,7,50,14
+    LTEXT           "Productname",IDC_PRODUCT,41,7,225,13,NOT WS_GROUP
+    LTEXT           "© 2005-2007 Massachusetts Institute of Technology\n© 2006-2007 Secure Endpoints Inc.",IDC_COPYRIGHT,41,23,276,23,NOT WS_GROUP
+    LTEXT           "BuildInfo",IDC_BUILDINFO,41,49,276,20,NOT WS_GROUP
+    ICON            IDI_MAIN_APP,IDC_STATIC,6,7,20,20
+    CONTROL         "",IDC_MODULES,"SysListView32",LVS_REPORT | LVS_SORTASCENDING | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,41,88,276,143
+    LTEXT           "Loaded modules",IDC_STATIC,41,76,52,8
+END
+
+IDD_CFG_APPEAR DIALOGEX 0, 0, 255, 182
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+    GROUPBOX        "Font for credentials display",IDC_STATIC,7,7,241,137
+    LTEXT           "&Font name",IDC_STATIC,17,22,35,8
+    COMBOBOX        IDC_CFG_FONTS,62,20,178,51,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+    LTEXT           "&Size",IDC_STATIC,62,43,14,8
+    COMBOBOX        IDC_CFG_SIZE,87,41,48,51,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "&Bold",IDC_CFG_BOLD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,162,42,29,10
+    CONTROL         "&Italics",IDC_CFG_ITALICS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,42,35,10
+    EDITTEXT        IDC_CFG_SAMPLE_NORMAL,62,66,178,21,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
+    EDITTEXT        IDC_CFG_SAMPLE_BOLD,62,91,178,21,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
+    PUSHBUTTON      "&Revert to default",IDC_CFG_REVERT,168,122,72,14
+END
+
+IDD_CFG_ADDIDENT DIALOGEX 0, 0, 279, 95
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Add new identity"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+    LTEXT           "&Identity name",IDC_SM_LBL,7,10,46,8,NOT WS_VISIBLE
+    EDITTEXT        IDC_SM_CTL,67,7,205,14,ES_AUTOHSCROLL | NOT WS_VISIBLE
+    DEFPUSHBUTTON   "OK",IDOK,145,74,71,14
+    PUSHBUTTON      "Cancel",IDCANCEL,222,74,50,14
+    LTEXT           "&Identity name",IDC_MED_LBL,7,27,130,8,NOT WS_VISIBLE
+    EDITTEXT        IDC_MED_CTL,141,24,131,14,ES_AUTOHSCROLL | NOT WS_VISIBLE
+    LTEXT           "&Identity name",IDC_LG_LBL,7,41,265,8,NOT WS_VISIBLE
+    EDITTEXT        IDC_LG_CTL,141,50,131,14,ES_AUTOHSCROLL | NOT WS_VISIBLE
+END
+
+IDD_CMDLINE DIALOGEX 0, 0, 309, 286
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_CAPTION | WS_SYSMENU
+CAPTION "Commandline options for Network Identity Manager"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+    DEFPUSHBUTTON   "OK",IDOK,252,265,50,14
+    ICON            IDI_MAIN_APP,IDC_STATIC,7,7,21,20
+    LTEXT           "Productname",IDC_PRODUCT,40,7,262,13,NOT WS_GROUP
+    CONTROL         "",IDC_CONTENT,"RichEdit20A",ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_BORDER | WS_VSCROLL | WS_TABSTOP,40,22,262,231
+    LTEXT           "© 2005-2007 Massachusetts Institute of Technology\n© 2006-2007 Secure Endpoints Inc.",IDC_COPYRIGHT,7,258,240,21,NOT WS_GROUP
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO 
+BEGIN
+    IDD_NC_NEWCRED, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 294
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 160
+    END
+
+    IDD_NC_BBAR, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 59
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 183
+    END
+
+    IDD_PP_IDENT, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 228
+        VERTGUIDE, 34
+        VERTGUIDE, 117
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 149
+    END
+
+    IDD_PP_CRED, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 229
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 151
+    END
+
+    IDD_CFG_GENERIC, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 248
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 175
+    END
+
+    IDD_CFG_GENERAL, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 248
+        VERTGUIDE, 16
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 175
+    END
+
+    IDD_CFG_IDENTITIES, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 248
+        VERTGUIDE, 10
+        VERTGUIDE, 244
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 175
+        HORZGUIDE, 22
+        HORZGUIDE, 171
+    END
+
+    IDD_CFG_NOTIF, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 248
+        VERTGUIDE, 22
+        VERTGUIDE, 122
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 175
+    END
+
+    IDD_CFG_PLUGINS, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 248
+        VERTGUIDE, 87
+        VERTGUIDE, 128
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 175
+    END
+
+    IDD_CFG_IDENTITY, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 248
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 175
+    END
+
+    IDD_CFG_IDS_TAB, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 228
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 144
+    END
+
+    IDD_CFG_ID_TAB, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 228
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 144
+    END
+
+    IDD_ABOUT, DIALOG
+    BEGIN
+        LEFTMARGIN, 6
+        RIGHTMARGIN, 317
+        VERTGUIDE, 41
+        VERTGUIDE, 266
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 231
+    END
+
+    IDD_CFG_APPEAR, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 248
+        VERTGUIDE, 7
+        VERTGUIDE, 62
+        VERTGUIDE, 240
+        VERTGUIDE, 248
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 175
+    END
+
+    IDD_CFG_ADDIDENT, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 272
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 88
+    END
+
+    IDD_CMDLINE, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 302
+        VERTGUIDE, 40
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 279
+    END
+END
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// KHMRTFRESOURCE
+//
+
+IDR_CMDLINERTF          KHMRTFRESOURCE          "cmdline.rtf"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE 
+BEGIN
+    IDS_MAIN_WINDOW_TITLE   "Network Identity Manager"
+    IDS_MENU_FILE           "&File"
+    IDS_MENU_CRED           "&Credential"
+    IDS_MENU_VIEW           "&View"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_MENU_OPTIONS        "&Options"
+    IDS_MENU_HELP           "&Help"
+    IDS_ACTION_PROPERTIES   "&Properties"
+    IDS_ACTION_EXIT         "E&xit"
+    IDS_CFG_ROOT_NAME       "Network Identity Manager"
+    IDS_ACTION_SET_DEF_ID   "Set as &default"
+    IDS_ACTION_SET_SRCH_ID  "Allow applications to &search"
+    IDS_CFG_ROOT_TITLE      "Network Identity Manager Configuration"
+    IDS_CFG_GENERAL_SHORT   "General"
+    IDS_ACTION_NEW_CRED     "Obtain &new credentials ..."
+    IDS_ACTION_PASSWD_ID    "Change &password"
+    IDS_ACTION_CHOOSE_COLS  "View columns"
+    IDS_ACTION_DEBUG_WINDOW "Debug window"
+    IDS_ACTION_VIEW_REFRESH "Refresh view"
+    IDS_MENU_LAYOUT         "Layout"
+    IDS_MENU_TOOLBARS       "Toolbars"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_ACTION_LAYOUT_ID    "By identity"
+    IDS_ACTION_LAYOUT_TYPE  "By type"
+    IDS_ACTION_LAYOUT_LOC   "By location"
+    IDS_ACTION_TB_STANDARD  "Standard"
+    IDS_ACTION_OPT_KHIM     "General"
+    IDS_ACTION_OPT_IDENTS   "Identities"
+    IDS_ACTION_OPT_NOTIF    "Notifications"
+    IDS_ACTION_HELP_CTX     "Help Contents"
+    IDS_ACTION_HELP_CONTENTS "Contents"
+    IDS_ACTION_HELP_INDEX   "Index"
+    IDS_ACTION_HELP_ABOUT   "About Network Identity Manager"
+    IDS_CFG_GENERAL_LONG    "General options"
+    IDS_SAMPLE_STRING       "Wxy"
+    IDS_NO_CREDS            "<large><p align=""center"">You currently have no credentials.</p><p align=""center"">Click <a id=""NewCreds"">here</a> to obtain new credentials.</p></large>"
+    IDS_WT_INIT_CREDS       "Obtain initial credentials"
+    IDS_WT_NEW_CREDS        "Obtain new credentials"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_NC_IDENTITY         "&Identity"
+    IDS_NC_IDENTS           "&Identities"
+    IDS_NC_CREDTEXT_ID_NONE "<p><b>(No identities specified)</b></p>"
+    IDS_NC_CREDTEXT_ID_ONE  "<p>Selected identity: <b>%s</b></p>"
+    IDS_NC_CREDTEXT_ID_MANY "<p>Primary identity: <b>%s</b></p><p>Additional identities: <b>%s</b></p>"
+    IDS_NC_CREDTEXT_ID_INVALID "<font color=""red"">%s (invalid)</font>"
+    IDS_WTPOST_INIT_CREDS   " - Initial credentials"
+    IDS_WTPOST_NEW_CREDS    " - New credentials"
+    IDS_ACTION_RENEW_CRED   "R&enew credentials"
+    IDS_ACTION_DESTROY_CRED "De&stroy credentials"
+    IDS_DEFAULT_FONT        "MS Shell Dlg"
+    IDS_NC_CREDTEXT_TABS    "<settab pos=""15""><settab pos=""30""><settab pos=""45"">"
+    IDS_NOTIFY_PREFIX       "Network Identity Manager - "
+    IDS_NOTIFY_READY        "Ready"
+    IDS_NOTIFY_ATTENTION    "Attention"
+    IDS_ALERT_DEFAULT       "Alert"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_PACTION_OK          "&Ok"
+    IDS_PACTION_CANCEL      "&Cancel"
+    IDS_PACTION_CLOSE       "&Close"
+    IDS_ALERT_NOSEL_TITLE   "No credentials selected"
+    IDS_ALERT_NOSEL         "Please select a credential, a credential type or an identity."
+    IDS_NC_CREDTEXT_ID_VALID "<font color=""blue"">%s</font>"
+    IDS_NC_CREDTEXT_ID_UNCHECKED "<font color=""grey"">%s (Unverified)</font>"
+    IDS_PROP_COL_PROPERTY   "Property"
+    IDS_PROP_COL_VALUE      "Value"
+    IDS_NC_NEW_IDENT        "( New identity ... )"
+    IDS_NC_CREDTEXT_ID_CHECKING "<font color=""grey"">%s (Checking...)</font>"
+    IDS_ACTION_OPEN_APP     "Show Network Identity Manager window"
+    IDS_CTX_NEW_IDENT       "Obaining new identity"
+    IDS_CTX_NEW_CREDS       "Obtaining new credentials"
+    IDS_CTX_RENEW_CREDS     "Renewing credentials"
+    IDS_CTX_PROC_NEW_IDENT  "Obtaining initial credentials for %1!s!"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_CTX_PROC_NEW_CREDS  "Obtaining new credentials for %1!s!"
+    IDS_CTX_PROC_RENEW_CREDS "Renewing credentials for %1!s!"
+    IDS_ACTION_CLOSE_APP    "Hide Network Identity Manager window"
+    IDS_NC_FAILED_TITLE     "Failed to acquire credentials"
+    IDS_CFG_IDENTITIES_SHORT "Identities"
+    IDS_CFG_IDENTITIES_LONG "Global Identity settings"
+    IDS_CFG_NOTIF_SHORT     "Notifications"
+    IDS_CFG_NOTIF_LONG      "Notifications"
+    IDS_CFG_PLUGINS_SHORT   "Plugins"
+    IDS_CFG_PLUGINS_LONG    "Plugins and Modules"
+    IDS_CFG_IDENTITY_SHORT  "%s"
+    IDS_CFG_IDENTITY_LONG   "Options for %s"
+    IDS_CTX_DESTROY_CREDS   "Destroying credentials"
+    IDS_WARN_EXPIRE         "Some of your credentials will expire in %s"
+    IDS_WARN_TITLE          "Credentials expiration warning"
+    IDS_ALERT_MOREINFO      "...\nClick here for more..."
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_WARN_EXPIRED        "Some of your credentials have expired."
+    IDS_WARN_EXPIRE_ID      "Credentials for %.180s will expire in %s"
+    IDS_WARN_EXPIRED_ID     "Credentials for %.220s have expired"
+    IDS_WARN_WM_TITLE       "Network Identity Manager is still running"
+    IDS_WARN_WM_MSG         "Click the Network Identity Manager icon below to open the application.\n\nOr right click the icon to access the Network Identity Manager menu."
+    IDS_CFG_ID_TAB_SHORT    "General"
+    IDS_CFG_ID_TAB_LONG     "General options for this identity"
+    IDS_CFG_IDS_TAB_SHORT   "General"
+    IDS_CFG_IDS_TAB_LONG    "General options for all identities"
+    IDS_CFG_IDS_IDENTITY    "Identity"
+    IDS_ACTION_IMPORT       "Import Credentials"
+    IDS_CTX_IMPORT          "Importing credentials from Windows"
+    IDS_CFG_PI_COL_PLUGINS  "Plugins"
+    IDS_PISTATE_FAILUNK     "Unknown failure"
+    IDS_PISTATE_FAILMAX     "Maximum failure count reached"
+    IDS_PISTATE_FAILREG     "Not properly registered"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_PISTATE_FAILDIS     "Disabled"
+    IDS_PISTATE_FAILLOD     "Failed to initialize"
+    IDS_PISTATE_PLACEHOLD   "Not loaded"
+    IDS_PISTATE_REG         "Not initialized"
+    IDS_PISTATE_HOLD        "Waiting for dependencies"
+    IDS_PISTATE_INIT        "Initializing"
+    IDS_PISTATE_RUN         "Running"
+    IDS_PISTATE_EXIT        "Stopped"
+    IDS_CTX_PASSWORD        "Changing password"
+    IDS_WT_PASSWORD         "Changing password"
+    IDS_WTPOST_PASSWORD     " - Changing password"
+    IDS_CTX_PROC_PASSWORD   "Changing password for %1!s!"
+    IDS_NC_PWD_FAILED_TITLE "Failed to change password"
+    IDS_PACTION_NEXT        "Next alert"
+    IDS_ERR_TITLE_NO_IDENTPRO "Cannot proceed without identity provider"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_ERR_MSG_NO_IDENTPRO "There is no identity provider currently loaded.  The identity provider is the component of Network Identity Manager that verifies and performs operations on actual identities.  Without this provider, many critical operations cannot be performed."
+    IDS_ERR_SUGG_NO_IDENTPRO 
+                            "This is quite possibly caused by the identity provider module failing to load properly."
+    IDS_NC_REN_FAILED_TITLE "Failed to renew credentials"
+    IDS_CW_DEFAULT          "(Default)"
+    IDS_ACTION_OPT_PLUGINS  "Plugins"
+    IDS_NC_SETDEF           "&Set as default identity"
+    IDS_NC_ID_DEF           "<p>This identity is the default</p>"
+    IDS_NC_ID_WDEF          "<p>Will be the default. (<a id=""NotDef"">Don't make default</a>)</p>"
+    IDS_NC_ID_NDEF          "<p>Not default identity.  (<a id=""MakeDef"">make default</a>)</p>"
+    IDS_PACTION_YES         "&Yes"
+    IDS_PACTION_NO          "&No"
+    IDS_PACTION_YESALL      "Y&es to all"
+    IDS_PACTION_NOALL       "N&o to all"
+    IDS_PACTION_KEEP        "&Keep"
+    IDS_PACTION_REMOVE      "&Remove"
+    IDS_PACTION_DISCARD     "&Discard"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_CFG_IT_MOD          "Changes need to be applied"
+    IDS_CFG_IT_APP          "Changes have been applied"
+    IDS_CFG_IT_NONE         "No changes"
+    IDS_CFG_NODESC          "(Description for plugin %s is not available)"
+    IDS_CFG_P_DELCNFT       "About to disable plugin %s"
+    IDS_CFG_P_DELCNFM       "Are you sure you want to disable plugin %s ?\n\nOnce disabled, the services provided by the plugin will no longer be available. In addition, any other plugins that depend on this plugin will also become non functional.\n\nNetwork Identity Manager will need to be restarted for the plugin to be deactivated."
+    IDS_CFG_P_DELCNFS       "The following plugins depend on this plugin : %s"
+    IDS_CFG_P_DELNDEP       "No other plugins depend on this plugin."
+    IDS_CFG_P_ENBCNFT       "About to enable plugin %s"
+    IDS_CFG_P_ENBCNFM       "The plugin %s will be marked as enabled.  The plugin will be come active the next time Network Identity Manager is started."
+    IDS_PISTATE_FAILINIT    "Failed to initialize"
+    IDS_CFG_P_UNRCNFT       "Unregistering plugin %s"
+    IDS_CFG_P_UNRCNFM       "Are you sure you want to unregister plugin %s? In addition to this plugin, any other plugins that are provided by the same module will also be unregistered.\n\nThe plugin will no longer be loaded for subsequent sessions of Network Identity Manager."
+    IDS_CFG_P_UNRCNFS       "Note that if the plugin was registered by a seprate installer, it should be unregistered by the same installer and not through Network Identity Manager.\n\nThe following plugins will be unregistered: %s"
+    IDS_ACTION_LAYOUT_CUST  "Custom"
+    IDS_APR_HEADER_TEXT     "Header text"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_APR_HEADER_TEXT_BOLD "Header text (selected)"
+    IDS_APR_TEXT            "Normal text"
+    IDS_APR_TEXT_BOLD       "Normal text (selected)"
+    IDS_APR_SAMPLE_TEXT_NORMAL "Sample text (normal). 01234567890"
+    IDS_CFG_APPEAR_SHORT    "Appearance"
+    IDS_CFG_APPEAR_LONG     "Appearance"
+    IDS_ACTION_OPT_APPEAR   "Appearance"
+    IDS_APR_SAMPLE_TEXT_SEL "Sample text (selected). 01234567890"
+    IDS_CFG_IDNAME_INV      "The identity name %s is invalid."
+    IDS_CFG_IDNAME_PRB      "Can't add new identity %s"
+    IDS_CFG_IDNAME_EXT      "The identity name %s already exists."
+    IDS_CFG_IDNAME_CCR      "Can't create new identity.  This may be caused by lack of resources or an unknown failure.  The code returned was %d."
+    IDS_CFG_IDNAME_CCC      "Can't create identity configuration.  This may be caused by lack or resources or not having the correct permissions to create the configuration space.  The code returned was %d."
+    IDS_CFG_LOGF_CS         "Can't show log file"
+    IDS_CFG_LOGF_CSR        "The log file %s does not exist."
+    IDS_ACTIONT_PROPERTIES  "Show properties for the current selection"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_ACTIONT_EXIT        "Exit Network Identity Manager"
+    IDS_ACTIONT_SET_DEF_ID  "Set the currently selected identity as the default identity"
+    IDS_ACTIONT_PASSWD_ID   "Change the password the currently selected identity"
+    IDS_ACTIONT_NEW_CRED    "Obtain new credentials"
+    IDS_ACTIONT_RENEW_CRED  "Renew or re-obtain credentials for the currently selected identity"
+    IDS_ACTIONT_DESTROY_CRED "Destroy the selected credentials or identities"
+    IDS_ACTIONT_VIEW_REFRESH 
+                            "Re-obtain information about credentials and refresh the credentials display"
+    IDS_ACTIONT_OPT_IDENTS  "Change options for identities"
+    IDS_ACTIONT_OPT_KHIM    "Change general application settings for Network Identity Manager"
+    IDS_ACTIONT_OPT_NOTIF   "Change notification options"
+    IDS_ACTIONT_OPT_PLUGINS "Change options for plug-ins and modules"
+    IDS_ACTIONT_OPT_APPEAR  "Change appearance and display settings"
+    IDS_ACTIONT_HELP_CTX    "Display user documentation"
+    IDS_ACTIONT_IMPORT      "Import credentials from external sources such as the Windows LSA"
+    IDS_NC_FAILED_TITLE_I   "Failed to get credentials for %s"
+    IDS_NC_PWD_FAILED_TITLE_I "Failed to change password for %s"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_NC_REN_FAILED_TITLE_I "Failed to renew credentials for %s"
+    IDS_CFG_IDNAME_NON      "No identity selected.  Please select an identity and try again."
+    IDS_MENU_DESTROY_CRED   "Destroy"
+    IDS_MENU_RENEW_CRED     "Renew"
+    IDS_ACTION_DESTROY_ALL  "Destroy all identities"
+    IDS_ACTION_RENEW_ALL    "Renew all identities"
+    IDS_IDACTION_RENEW      "Renew %s"
+    IDS_IDACTION_DESTROY    "Destroy %s"
+    IDS_CTX_DESTROY_ID      "Destroying identity %1!s!"
+    IDS_NCN_IDENT_INVALID   "Identity %s is invalid."
+    IDS_NCN_IDENT_CHECKING  "Checking identity %s ..."
+    IDS_NCN_IDENT_UNKNOWN   "Validity of identity %s coudn't be determined."
+    IDS_REMOTE_FAIL         "The instance of Network Identity Manager that is already running is not responding to the remote request properly.  Please check if you are running the latest version of Network Identity Manger software included with MIT Kerberos for Windows."
+    IDS_REMOTE_FAIL_TITLE   "Failed to communicate with Network Identity Manager"
+    IDS_IDACTION_NEW        "Obtain new credentials for %s"
+    IDS_IDACTIONT_NEW       "New credentials for %s"
+END
+
+STRINGTABLE 
+BEGIN
+    IDS_IDACTIONT_RENEW     "Renew credentials for %s"
+    IDS_IDACTIONT_DESTROY   "Destroy credentials for %s"
+    IDS_ALERTTYPE_PLUGIN    "Failed to load plug-in"
+    IDS_ALERTTYPE_EXPIRE    "Credential expiration warning"
+    IDS_ALERTTYPE_RENEWFAIL "Failed to renew credentials"
+    IDS_ALERTTYPE_ACQUIREFAIL "Failed to acquire credentials"
+    IDS_ALERTTYPE_CHPW      "Failed to change password"
+    IDS_ACTION_LAYOUT_MINI  "&Advanced"
+    IDS_IDEXPDISP_NOCRED    "(This identity has no credentials)"
+    IDS_IDEXPDISP_1CRED     "(This identity has 1 credential)"
+    IDS_IDEXPDISP_NCRED     "(This identity has %d credentials)"
+    IDS_CW_DEFAULTTF        "(Default, %s)"
+    IDS_CW_TYPEF            "(%s)"
+    IDS_CW_EXPIREF          "Expires in %s"
+    IDS_CW_EXPIRED          "(Expired)"
+END
+
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
+
+
index b3690422f12434047a868e40f2b1a1916d21553b..d6e5a86e58553a2d72ba8794412661ff5af984df 100644 (file)
@@ -28,6 +28,9 @@
 #include<khmapp.h>
 #include<netidmgr_intver.h>
 
+/* used for the command-line help dialog */
+#include<richedit.h>
+
 #if DEBUG
 #include<assert.h>
 
@@ -79,6 +82,107 @@ void khm_exit_gui(void) {
     }
 }
 
+/* This is passed into EnumResourceLanguages().  This returns the
+   language ID of the first resource of the type and name that's
+   passed into it.  For the resources types we care about, we only
+   expect there to be one resource for a given name.  At the moment we
+   don't support resource modules that contain resources for multiple
+   languages. */
+BOOL CALLBACK
+khm_enum_res_lang_proc_first(HANDLE hModule,
+                             LPCTSTR lpszType,
+                             LPCTSTR lpszName,
+                             WORD wIDLanguage,
+                             LONG_PTR lParam)
+{
+    WORD * plangid = (WORD *) lParam;
+
+    *plangid = wIDLanguage;
+
+    return FALSE;
+}
+
+#define KHM_RTF_RESOURCE L"KHMRTFRESOURCE"
+
+INT_PTR CALLBACK
+khm_cmdline_dlg_proc(HWND hwnd,
+                     UINT uMsg,
+                     WPARAM wParam,
+                     LPARAM lParam)
+{
+    switch(uMsg) {
+    case WM_INITDIALOG:
+        {
+            WORD langID = MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT);
+            HRSRC h_resinfo = NULL;
+            HGLOBAL h_resource = NULL;
+            LPVOID h_resmem = NULL;
+            SETTEXTEX ste;
+
+            SetDlgItemText(hwnd, IDC_PRODUCT,
+                           TEXT(KH_VERSTR_PRODUCT_1033));
+#ifdef OVERRIDE_COPYRIGHT
+            SetDlgItemText(hwnd, IDC_COPYRIGHT,
+                           TEXT(KH_VERSTR_COPYRIGHT_1033));
+#endif
+
+            EnumResourceLanguages(khm_hInstance,
+                                  KHM_RTF_RESOURCE,
+                                  MAKEINTRESOURCE(IDR_CMDLINERTF),
+                                  khm_enum_res_lang_proc_first,
+                                  (LONG_PTR) &langID);
+
+            h_resinfo = FindResourceEx(khm_hInstance,
+                                       KHM_RTF_RESOURCE,
+                                       MAKEINTRESOURCE(IDR_CMDLINERTF),
+                                       langID);
+            if (h_resinfo == NULL)
+                goto init_failed;
+
+            h_resource = LoadResource(khm_hInstance, h_resinfo);
+            if (h_resinfo == NULL)
+                goto init_failed;
+
+            h_resmem = LockResource(h_resource);
+            if (h_resmem == NULL)
+                goto init_failed;
+
+            ste.flags = ST_DEFAULT;
+            ste.codepage = CP_ACP;
+
+            SendDlgItemMessage(hwnd, IDC_CONTENT, EM_SETTEXTEX, (WPARAM) &ste, (LPARAM) h_resmem);
+        init_failed:
+            /* none of the above handles need to be freed. */
+
+            return TRUE;
+        }
+        break;
+
+    case WM_COMMAND:
+
+        if (wParam == MAKEWPARAM(IDOK, BN_CLICKED)) {
+            EndDialog(hwnd, KHM_ERROR_EXIT);
+        }
+
+        return TRUE;
+    }
+
+    return FALSE;
+}
+
+void khm_show_commandline_help(void) {
+    HMODULE hm_richedit;
+
+    hm_richedit = LoadLibrary(L"riched20.dll");
+    if (hm_richedit == NULL)
+        return;
+    
+    DialogBox(khm_hInstance, MAKEINTRESOURCE(IDD_CMDLINE),
+              NULL, khm_cmdline_dlg_proc);
+
+    FreeLibrary(hm_richedit);
+}
+
 void khm_parse_commandline(void) {
     LPWSTR wcmdline;
     LPWSTR * wargs;
@@ -97,6 +201,7 @@ void khm_parse_commandline(void) {
             khm_startup.init = TRUE;
             khm_startup.exit = TRUE;
             khm_startup.no_main_window = TRUE;
+            khm_startup.display |= SOPTS_DISPLAY_NODEF;
         }
         else if (!wcscmp(wargs[i], L"-m") ||
                  !wcscmp(wargs[i], L"--import") ||
@@ -104,6 +209,7 @@ void khm_parse_commandline(void) {
             khm_startup.import = TRUE;
             khm_startup.exit = TRUE;
             khm_startup.no_main_window = TRUE;
+            khm_startup.display |= SOPTS_DISPLAY_NODEF;
         }
         else if (!wcscmp(wargs[i], L"-r") ||
                  !wcscmp(wargs[i], L"--renew") ||
@@ -111,6 +217,7 @@ void khm_parse_commandline(void) {
             khm_startup.renew = TRUE;
             khm_startup.exit = TRUE;
             khm_startup.no_main_window = TRUE;
+            khm_startup.display |= SOPTS_DISPLAY_NODEF;
         }
         else if (!wcscmp(wargs[i], L"-d") ||
                  !wcscmp(wargs[i], L"--destroy") ||
@@ -118,11 +225,13 @@ void khm_parse_commandline(void) {
             khm_startup.destroy = TRUE;
             khm_startup.exit = TRUE;
             khm_startup.no_main_window = TRUE;
+            khm_startup.display |= SOPTS_DISPLAY_NODEF;
         }
         else if (!wcscmp(wargs[i], L"-a") ||
                  !wcscmp(wargs[i], L"--autoinit") ||
                  !wcscmp(wargs[i], L"-autoinit")) {
             khm_startup.autoinit = TRUE;
+            khm_startup.display |= SOPTS_DISPLAY_NODEF;
         }
         else if (!wcscmp(wargs[i], L"-x") ||
                  !wcscmp(wargs[i], L"--exit") ||
@@ -130,17 +239,33 @@ void khm_parse_commandline(void) {
             khm_startup.exit = TRUE;
             khm_startup.remote_exit = TRUE;
             khm_startup.no_main_window = TRUE;
+            khm_startup.display |= SOPTS_DISPLAY_NODEF;
         }
         else if (!wcscmp(wargs[i], L"--minimized")) {
             khm_startup.no_main_window = TRUE;
+            khm_startup.display |= SOPTS_DISPLAY_NODEF;
         }
-        else {
-            wchar_t help[2048];
+        else if (!wcscmp(wargs[i], L"--show")) {
+            if (khm_startup.display & SOPTS_DISPLAY_HIDE) {
+                khm_show_commandline_help();
+                khm_startup.error_exit = TRUE;
+                break;
+            }
 
-            LoadString(khm_hInstance, IDS_CMDLINE_HELP,
-                       help, ARRAYLENGTH(help));
+            khm_startup.display |= (SOPTS_DISPLAY_SHOW | SOPTS_DISPLAY_NODEF);
+        }
+        else if (!wcscmp(wargs[i], L"--hide")) {
+            if (khm_startup.display & SOPTS_DISPLAY_SHOW) {
+                khm_show_commandline_help();
+                khm_startup.error_exit = TRUE;
+                break;
+            }
 
-            MessageBox(NULL, help, L"NetIDMgr", MB_OK);
+            khm_startup.display |= (SOPTS_DISPLAY_HIDE | SOPTS_DISPLAY_NODEF);
+            khm_startup.no_main_window = TRUE;
+        }
+        else {
+            khm_show_commandline_help();
 
             khm_startup.error_exit = TRUE;
             break;
@@ -151,7 +276,8 @@ void khm_parse_commandline(void) {
     if (!khm_startup.exit &&
         !khm_startup.destroy &&
         !khm_startup.init &&
-        !khm_startup.remote_exit)
+        !khm_startup.remote_exit &&
+        !khm_startup.display)
         khm_startup.renew = TRUE;
 }
 
@@ -643,6 +769,9 @@ int WINAPI WinMain(HINSTANCE hInstance,
 
         CloseHandle(h_appmutex);
     } else {
+
+        /* There is an instance of NetIDMgr already running. */
+
         HWND hwnd = NULL;
         int retries = 5;
         HANDLE hmap;
@@ -651,7 +780,7 @@ int WINAPI WinMain(HINSTANCE hInstance,
         void * xfer;
         khm_query_app_version query_app_version;
         khm_version v;
-        BOOL use_cmd_v2 = TRUE;
+        BOOL use_cmd_v1 = FALSE;
         khm_size cb = 0;
 
         CloseHandle(h_appmutex);
@@ -766,16 +895,16 @@ int WINAPI WinMain(HINSTANCE hInstance,
 
         if (khm_compare_version(&query_app_version.ver_remote, &app_version) == 0 ||
             khm_compare_version(&query_app_version.ver_remote, &v) > 0)
-            use_cmd_v2 = TRUE;
+            use_cmd_v1 = FALSE;
         else
-            use_cmd_v2 = FALSE;
+            use_cmd_v1 = TRUE;
 
         StringCbPrintf(mapname, sizeof(mapname),
                        COMMANDLINE_MAP_FMT,
                        (tid = GetCurrentThreadId()));
 
-        cb = max(sizeof(struct tag_khm_startup_options_v1),
-                 sizeof(struct tag_khm_startup_options_v2));
+        cb = max(sizeof(khm_startup_options_v1),
+                 sizeof(khm_startup_options_v2));
 
         cb = UBOUNDSS(cb, 4096, 4096);
 
@@ -795,53 +924,82 @@ int WINAPI WinMain(HINSTANCE hInstance,
 
         /* make the call */
 
-        if (use_cmd_v2) {
+        if (!use_cmd_v1) {
             /* use the v2 structure */
-            struct tag_khm_startup_options_v2 v2opt;
+            khm_startup_options_v3 opt;
+            khm_startup_options_v3 *xferopt;
+
+            ZeroMemory(&opt, sizeof(opt));
 
-            ZeroMemory(&v2opt, sizeof(v2opt));
+            opt.v2opt.magic = STARTUP_OPTIONS_MAGIC;
 
-            v2opt.magic = STARTUP_OPTIONS_MAGIC;
-            v2opt.cb_size = sizeof(v2opt);
+            opt.v2opt.init = khm_startup.init;
+            opt.v2opt.import = khm_startup.import;
+            opt.v2opt.renew = khm_startup.renew;
+            opt.v2opt.destroy = khm_startup.destroy;
+            opt.v2opt.autoinit = khm_startup.autoinit;
+            opt.v2opt.remote_exit = khm_startup.remote_exit;
+            opt.remote_display = khm_startup.display;
 
-            v2opt.init = khm_startup.init;
-            v2opt.import = khm_startup.import;
-            v2opt.renew = khm_startup.renew;
-            v2opt.destroy = khm_startup.destroy;
+            opt.v2opt.code = KHM_ERROR_NOT_IMPLEMENTED;
 
-            v2opt.autoinit = khm_startup.autoinit;
-            v2opt.remote_exit = khm_startup.remote_exit;
+            /* check if we can use the v3 options structure.  This
+               should be possible for 1.3.1 and above. */
+            v.major = 1; v.minor = 3; v.patch = 1; v.aux = 0;
+            if (khm_compare_version(&query_app_version.ver_remote, &app_version) == 0 ||
+                khm_compare_version(&query_app_version.ver_remote, &v) >= 0) {
 
-            v2opt.code = KHM_ERROR_NOT_IMPLEMENTED;
+                opt.v2opt.cb_size = sizeof(opt);
+
+            } else {
+
+                opt.v2opt.cb_size = sizeof(opt.v2opt);
+
+            }
 
             xfer = MapViewOfFile(hmap,
                                  FILE_MAP_WRITE,
                                  0, 0,
-                                 sizeof(v2opt));
+                                 opt.v2opt.cb_size);
+
+            xferopt = (khm_startup_options_v3 *) xfer;
 
             if (xfer) {
-                memcpy(xfer, &v2opt, sizeof(v2opt));
+                memcpy(xfer, &opt, opt.v2opt.cb_size);
 
                 SendMessage(hwnd, WM_KHUI_ASSIGN_COMMANDLINE_V2,
                             0, (LPARAM) tid);
 
-                memcpy(&v2opt, xfer, sizeof(v2opt));
+                /* If it looks like the request was not processed, and
+                   we were using a v3 request, fail-over to a v2
+                   request. */
+                if (xferopt->v2opt.code == KHM_ERROR_NOT_IMPLEMENTED &&
+                    opt.v2opt.cb_size == sizeof(opt)) {
+
+                    opt.v2opt.cb_size = sizeof(opt.v2opt);
+                    memcpy(xfer, &opt, opt.v2opt.cb_size);
 
-                /* If the request looks like it wasn't processed, we
-                   fallback to the v1 request. */
+                    SendMessage(hwnd, WM_KHUI_ASSIGN_COMMANDLINE_V2,
+                                0, (LPARAM) tid);
+                }
 
-                if (v2opt.code == KHM_ERROR_NOT_IMPLEMENTED)
-                    use_cmd_v2 = FALSE;
+                /* if it still looks like the request was not
+                   processed, we failover to a v1 call */
+                if (xferopt->v2opt.code == KHM_ERROR_NOT_IMPLEMENTED) {
+                    use_cmd_v1 = TRUE;
+                } else {
+                    memcpy(&opt, xfer, opt.v2opt.cb_size);
+                }
 
                 UnmapViewOfFile(xfer);
                 xfer = NULL;
             }
         }
 
-        if (!use_cmd_v2) {
+        if (use_cmd_v1) {
             /* use the v1 structure */
 
-            struct tag_khm_startup_options_v1 v1opt;
+            khm_startup_options_v1 v1opt;
 
             ZeroMemory(&v1opt, sizeof(v1opt));
 
index 81d26673d21660f577f82c6701330ce10b2cdbaf..f647fa09534190abbdb3b78a04612b213c5b60a5 100644 (file)
@@ -148,19 +148,7 @@ khm_process_query_app_ver(khm_query_app_version * papp_ver) {
     if (papp_ver->request_swap) {
         khm_version ver_caller = papp_ver->ver_caller;
 
-        if (ver_caller.major >   app_version.major ||
-
-            (ver_caller.major == app_version.major &&
-             ver_caller.minor >  app_version.minor) ||
-
-            (ver_caller.major == app_version.major &&
-             ver_caller.minor == app_version.minor &&
-             ver_caller.aux >    app_version.aux) ||
-
-            (ver_caller.major == app_version.major &&
-             ver_caller.minor == app_version.minor &&
-             ver_caller.aux ==   app_version.aux &&
-             ver_caller.patch >  app_version.patch)) {
+        if (khm_compare_version(&ver_caller, &app_version) > 0) {
 
             papp_ver->request_swap = TRUE;
 
@@ -690,7 +678,7 @@ khm_main_wnd_proc(HWND hwnd,
             HANDLE hmap;
             void * xfer;
             wchar_t mapname[256];
-            struct tag_khm_startup_options_v1 * pv1opt;
+            khm_startup_options_v1 * pv1opt;
             int code = KHM_ERROR_SUCCESS;
 
             StringCbPrintf(mapname, sizeof(mapname),
@@ -705,7 +693,7 @@ khm_main_wnd_proc(HWND hwnd,
                                  sizeof(*pv1opt));
 
             if (xfer) {
-                pv1opt = (struct tag_khm_startup_options_v1 *) xfer;
+                pv1opt = (khm_startup_options_v1 *) xfer;
 
                 khm_startup.init = pv1opt->init;
                 khm_startup.import = pv1opt->import;
@@ -717,6 +705,7 @@ khm_main_wnd_proc(HWND hwnd,
 
                 khm_startup.no_main_window = FALSE;
                 khm_startup.remote_exit = FALSE;
+                khm_startup.display = 0;
 
                 UnmapViewOfFile(xfer);
             } else {
@@ -749,7 +738,8 @@ khm_main_wnd_proc(HWND hwnd,
             HANDLE hmap;
             void * xfer;
             wchar_t mapname[256];
-            struct tag_khm_startup_options_v2 *pv2opt;
+            khm_startup_options_v2 *pv2opt = NULL;
+            khm_startup_options_v3 *pv3opt = NULL;
             int code = KHM_ERROR_SUCCESS;
 
             StringCbPrintf(mapname, sizeof(mapname),
@@ -764,10 +754,11 @@ khm_main_wnd_proc(HWND hwnd,
                                  sizeof(*pv2opt));
 
             if (xfer) {
-                pv2opt = (struct tag_khm_startup_options_v2 *) xfer;
+                pv2opt = (khm_startup_options_v2 *) xfer;
 
                 if (pv2opt->magic != STARTUP_OPTIONS_MAGIC ||
-                    pv2opt->cb_size != sizeof(*pv2opt)) {
+                    (pv2opt->cb_size != sizeof(*pv2opt) &&
+                     pv2opt->cb_size != sizeof(*pv3opt))) {
                     code = KHM_ERROR_INVALID_PARAM;
                     goto done_with_v2_opt;
                 }
@@ -782,6 +773,14 @@ khm_main_wnd_proc(HWND hwnd,
 
                 pv2opt->code = KHM_ERROR_SUCCESS;
 
+                if (pv2opt->cb_size == sizeof(*pv3opt)) {
+                    pv3opt = (khm_startup_options_v3 *) xfer;
+
+                    khm_startup.display = pv3opt->remote_display;
+                } else {
+                    khm_startup.display = 0;
+                }
+
             done_with_v2_opt:
                 UnmapViewOfFile(xfer);
             } else {
index f1df06992545147b18af87c96220fd5c95fea19f..8b351efb84afd665dbcba3fd4b8d74c7478e0849 100644 (file)
@@ -91,9 +91,6 @@ alert_consolidate(alert_list * alist,
                   khui_alert * alert,
                   khm_boolean add_from_queue);
 
-static khm_int32
-get_default_notifier_action(void);
-
 /* Globals */
 
 /* window class registration atom for message only notifier window
@@ -421,7 +418,7 @@ notifier_wnd_proc(HWND hwnd,
                    icon is present in the menu and that it is marked
                    as the default. */
 
-                def_cmd = get_default_notifier_action();
+                def_cmd = khm_get_default_notifier_action();
 
                 if (khm_is_main_window_visible()) {
                     menu_id = KHUI_MENU_ICO_CTX_NORMAL;
@@ -2969,8 +2966,8 @@ void khm_notify_icon_remove(void) {
     Shell_NotifyIcon(NIM_DELETE, &ni);
 }
 
-static khm_int32
-get_default_notifier_action(void) {
+khm_int32
+khm_get_default_notifier_action(void) {
     khm_int32 def_cmd = KHUI_ACTION_OPEN_APP;
     khm_handle csp_cw = NULL;
     khm_size i;
@@ -3049,7 +3046,7 @@ void khm_notify_icon_activate(void) {
     {
         khm_int32 cmd = 0;
 
-        cmd = get_default_notifier_action();
+        cmd = khm_get_default_notifier_action();
 
         if (cmd == KHUI_ACTION_OPEN_APP) {
             if (khm_is_main_window_visible()) {
index b0cd5dc2c87e2fd8d97ac3b1a782ab1e1fd9f9d2..449ad65cfaed9f04ea6aa61defc9d46786d6a089 100644 (file)
@@ -60,4 +60,7 @@ khm_notify_icon_expstate(enum khm_notif_expstate expseverity);
 void
 khm_notify_icon_activate(void);
 
+khm_int32
+khm_get_default_notifier_action(void);
+
 #endif
index 1a3c35b23937ab679e1f905929e5af97714d8160..c696656c71445314142547c510f1abc725f274f7 100644 (file)
 #define IDS_PISTATE_REG                 211
 #define IDD_CFG_ADDIDENT                211
 #define IDS_PISTATE_HOLD                212
+#define IDD_CMDLINE                     212
 #define IDS_PISTATE_INIT                213
+#define IDR_CMDLINERTF                  213
 #define IDS_PISTATE_RUN                 214
 #define IDS_PISTATE_EXIT                215
 #define IDS_CTX_PASSWORD                216
 #define IDC_CFG_NOTACTION               1141
 #define IDC_CFG_NOTACT_STATIC           1142
 #define IDC_NC_BASIC                    1143
+#define IDC_RICHEDIT21                  1144
+#define IDC_CONTENT                     1144
 #define IDA_ACTIVATE_MENU               40003
 #define IDA_UP                          40004
 #define IDA_DOWN                        40005
 // 
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        212
+#define _APS_NEXT_RESOURCE_VALUE        214
 #define _APS_NEXT_COMMAND_VALUE         40010
-#define _APS_NEXT_CONTROL_VALUE         1144
+#define _APS_NEXT_CONTROL_VALUE         1145
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif