OSDN Git Service

Option to disable Splash Screen
authorDennis Lim <dlkj@users.sourceforge.net>
Wed, 20 Jun 2001 15:44:19 +0000 (15:44 +0000)
committerDennis Lim <dlkj@users.sourceforge.net>
Wed, 20 Jun 2001 15:44:19 +0000 (15:44 +0000)
Src/Merge.cpp
Src/Merge.h
Src/Merge.rc
Src/PropGeneral.cpp
Src/PropGeneral.h
Src/resource.h

index 08bec2b..b05cdcc 100644 (file)
@@ -96,13 +96,6 @@ BOOL CMergeApp::InitInstance()
                TRACE(_T("AfxOleInitFailed. OLE functionality disabled"));
        }
 
-       // CG: The following block was added by the Splash Screen component.
-       {
-               CCommandLineInfo cmdInfo;
-               ParseCommandLine(cmdInfo);
-               CSplashWnd::EnableSplashScreen(cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew);
-       }
-
        // Standard initialization
        // If you are not using these features and wish to reduce the size
        //  of your final executable, you should remove from the following
@@ -121,6 +114,15 @@ BOOL CMergeApp::InitInstance()
 
        LoadStdProfileSettings();  // Load standard INI file options (including MRU)
 
+       m_bDisableSplash = GetProfileInt(_T("Settings"), _T("DisableSplash"), FALSE);
+
+       // CG: The following block was added by the Splash Screen component.
+       {
+               CCommandLineInfo cmdInfo;
+               ParseCommandLine(cmdInfo);
+               CSplashWnd::EnableSplashScreen(m_bDisableSplash==FALSE && cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew);
+       }
+
        // Register the application's document templates.  Document templates
        //  serve as the connection between documents, frame windows and views.
 
index 313a76c..3f5ae52 100644 (file)
@@ -43,6 +43,7 @@
 class CMergeApp : public CWinApp
 {
 public:
+       BOOL m_bDisableSplash;
        virtual BOOL PreTranslateMessage(MSG* pMsg);
        CLanguageSelect m_lang;
        CMergeApp();
index 8ac9f36..931a43f 100644 (file)
@@ -292,7 +292,7 @@ STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
 CAPTION "General"
 FONT 8, "MS Sans Serif"
 BEGIN
-    GROUPBOX        "Settings",IDC_STATIC,7,7,221,78
+    GROUPBOX        "Settings",IDC_STATIC,7,7,221,92
     CONTROL         "&Backup original file",IDC_BACKUP_CHECK,"Button",
                     BS_AUTOCHECKBOX | WS_TABSTOP,17,21,75,10
     CONTROL         "Automatically &scroll to first difference",
@@ -304,9 +304,11 @@ BEGIN
                     BS_AUTOCHECKBOX | WS_TABSTOP,17,57,71,10
     CONTROL         "Ignore &case",IDC_IGNCASE_CHECK,"Button",
                     BS_AUTOCHECKBOX | WS_TABSTOP,17,69,53,10
-    GROUPBOX        "Tabs",IDC_STATIC,7,92,221,30
-    LTEXT           "&Tab size:",IDC_STATIC,15,106,30,8
-    EDITTEXT        IDC_TAB_EDIT,47,105,27,12,ES_AUTOHSCROLL
+    GROUPBOX        "Tabs",IDC_STATIC,7,105,221,30
+    LTEXT           "&Tab size:",IDC_STATIC,15,119,30,8
+    EDITTEXT        IDC_TAB_EDIT,47,118,27,12,ES_AUTOHSCROLL
+    CONTROL         "&Disable Splash Screen",IDC_DISABLE_SPLASH,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,17,81,87,10
 END
 
 IDD_LANGUAGE_SELECT DIALOG DISCARDABLE  0, 0, 213, 111
index 0c68078..b757f11 100644 (file)
@@ -45,6 +45,7 @@ CPropGeneral::CPropGeneral() : CPropertyPage(CPropGeneral::IDD)
        m_nTabSize = 0;
        m_bIgnoreCase = FALSE;
        m_bIgnoreBlankLines = FALSE;
+       m_bDisableSplash = FALSE;
        //}}AFX_DATA_INIT
 }
 
@@ -62,6 +63,7 @@ void CPropGeneral::DoDataExchange(CDataExchange* pDX)
        DDX_Text(pDX, IDC_TAB_EDIT, m_nTabSize);
        DDX_Check(pDX, IDC_IGNCASE_CHECK, m_bIgnoreCase);
        DDX_Check(pDX, IDC_IGNBLANKS_CHECK, m_bIgnoreBlankLines);
+       DDX_Check(pDX, IDC_DISABLE_SPLASH, m_bDisableSplash);
        //}}AFX_DATA_MAP
 }
 
index ebcb195..3e84a1c 100644 (file)
@@ -28,6 +28,7 @@ public:
        UINT    m_nTabSize;
        BOOL    m_bIgnoreCase;
        BOOL    m_bIgnoreBlankLines;
+       BOOL    m_bDisableSplash;
        //}}AFX_DATA
 
 
index 1e812d1..1627515 100644 (file)
 #define IDC_HILITE_CHECK                1019
 #define IDC_IGNOREREGEXP                1020
 #define IDC_EDITPATTERN                 1021
+#define IDC_DISABLE_SPLASH              1023
 #define IDR_MARGIN_CURSOR               22900
 #define IDD_LANGUAGE_SELECT             30000
 #define IDD_PROPSYNTAX                  30001
 #define _APS_3D_CONTROLS                     1
 #define _APS_NEXT_RESOURCE_VALUE        135
 #define _APS_NEXT_COMMAND_VALUE         32807
-#define _APS_NEXT_CONTROL_VALUE         1023
+#define _APS_NEXT_CONTROL_VALUE         1024
 #define _APS_NEXT_SYMED_VALUE           106
 #endif
 #endif