Click here to Skip to main content
15,892,674 members
Articles / Desktop Programming / MFC

Visual Studio Source Code Control Provider Switcher Add-in

Rate me:
Please Sign up or sign in to vote.
4.56/5 (2 votes)
29 May 20023 min read 76.5K   975   13  
This article shows how to create a VS Add-in that allow you to change the source code control provider
//Microsoft Developer Studio 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 DISCARDABLE 
BEGIN
    "resource.h\0"
END

2 TEXTINCLUDE DISCARDABLE 
BEGIN
    "#include ""afxres.h""\r\n"
    "\0"
END

3 TEXTINCLUDE DISCARDABLE 
BEGIN
    "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
    "#define _AFX_NO_OLE_RESOURCES\r\n"
    "#define _AFX_NO_TRACKER_RESOURCES\r\n"
    "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
    "\r\n"
    "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
    "#ifdef _WIN32\r\n"
    "LANGUAGE 9, 1\r\n"
    "#pragma code_page(1252)\r\n"
    "#endif //_WIN32\r\n"
    "#include ""res\\SCCProvider.rc2""  // non-Microsoft Visual C++ edited resources\r\n"
    "#include ""afxres.rc""         // Standard components\r\n"
    "#endif\r\n"
    "1 TYPELIB ""SCCProvider.tlb""\r\n"
    "\0"
END

#endif    // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//

IDR_TOOLBAR_MEDIUM      BITMAP  MOVEABLE PURE   "res\\TBarMedm.bmp"
IDR_TOOLBAR_LARGE       BITMAP  MOVEABLE PURE   "res\\TBarLrge.bmp"
IDB_EMAIL               BITMAP  DISCARDABLE     "res\\Email.bmp"
IDB_PICTURE             BITMAP  DISCARDABLE     "res\\Picture.bmp"

#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,0,1
 PRODUCTVERSION 1,0,0,1
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x2L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904B0"
        BEGIN
            VALUE "CompanyName", "\0"
            VALUE "FileDescription", "SCCProvider DLL\0"
            VALUE "FileVersion", "1, 0, 0, 1\0"
            VALUE "InternalName", "SCCProvider\0"
            VALUE "LegalCopyright", "Copyright (C) 2002\0"
            VALUE "LegalTrademarks", "\0"
            VALUE "OriginalFilename", "SCCProvider.DLL\0"
            VALUE "ProductName", "SCCProvider Dynamic Link Library\0"
            VALUE "ProductVersion", "1, 0, 0, 1\0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
END

#endif    // !_MAC


/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_SCC_DIALOG DIALOG DISCARDABLE  0, 0, 226, 90
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Select Source Code Control Provider"
FONT 8, "MS Sans Serif"
BEGIN
    LTEXT           "Current Source Code Control Provider:",IDC_STATIC,7,7,
                    212,8
    EDITTEXT        IDC_CURRENT_SCC,7,18,212,14,ES_AUTOHSCROLL | ES_READONLY | 
                    NOT WS_TABSTOP
    LTEXT           "Select a Source Code Control Provider:",IDC_STATIC,7,39,
                    212,8
    COMBOBOX        IDC_SCC_COMBO,7,50,212,84,CBS_DROPDOWNLIST | WS_VSCROLL | 
                    WS_TABSTOP
    PUSHBUTTON      "&Apply",IDC_APPLY,7,69,50,14,WS_DISABLED
    PUSHBUTTON      "&Close",IDOK,115,69,50,14
    PUSHBUTTON      "&Options",IDC_OPTIONS,61,69,50,14
    PUSHBUTTON      "Abou&t",IDC_ABOUT,169,69,50,14
END

IDD_SCC_OPTIONS DIALOG DISCARDABLE  0, 0, 184, 163
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Source Code Control Options"
FONT 8, "MS Sans Serif"
BEGIN
    COMBOBOX        IDC_ADDFILE,7,7,30,67,CBS_DROPDOWN | CBS_SORT | 
                    WS_VSCROLL | WS_TABSTOP
    LTEXT           "Add file to SCC when added to host.",IDC_STATIC,43,9,
                    131,8
    COMBOBOX        IDC_CHECKIN,7,29,30,66,CBS_DROPDOWN | CBS_SORT | 
                    WS_VSCROLL | WS_TABSTOP
    LTEXT           "Check in all files on close project.",IDC_STATIC,43,31,
                    131,8
    COMBOBOX        IDC_CHECKOUT,7,51,30,68,CBS_DROPDOWN | CBS_SORT | 
                    WS_VSCROLL | WS_TABSTOP
    LTEXT           "Check out makefile on open project.",IDC_STATIC,43,53,
                    131,8
    COMBOBOX        IDC_DELETEFILES,7,73,30,76,CBS_DROPDOWN | CBS_SORT | 
                    WS_VSCROLL | WS_TABSTOP
    LTEXT           "Delete files from SCC on remove from VB.",IDC_STATIC,43,
                    75,131,8
    COMBOBOX        IDC_GETONOPEN,7,95,30,69,CBS_DROPDOWN | CBS_SORT | 
                    WS_VSCROLL | WS_TABSTOP
    LTEXT           "Get files on open project.",IDC_STATIC,43,97,131,8
    COMBOBOX        IDC_WARNONFAILURE,7,118,30,69,CBS_DROPDOWN | CBS_SORT | 
                    WS_VSCROLL | WS_TABSTOP
    LTEXT           "Warn on failure to load SCC provider.",IDC_STATIC,43,
                    120,131,8
    PUSHBUTTON      "&Apply",IDC_APPLYOPTIONS,7,142,50,14
    PUSHBUTTON      "&Close",IDCANCEL,127,142,50,14
END

IDD_SCC_ABOUT DIALOGEX 0, 0, 185, 65
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About Source Code Control Provider"
FONT 8, "MS Sans Serif"
BEGIN
    DEFPUSHBUTTON   "OK",IDOK,128,44,50,14
    LTEXT           "http://mywebpages.comcast.net/babdulbaki/",
                    IDC_HYPERLINK,13,15,145,8
    CONTROL         132,IDC_HYPERLINK_EMAIL,"Static",SS_BITMAP,13,36,37,17
    CONTROL         133,IDC_STATIC,"Static",SS_BITMAP,82,28,27,30
    GROUPBOX        "Homepage:",IDC_STATIC,7,7,171,19,0,WS_EX_TRANSPARENT
    GROUPBOX        "E-mail:",IDC_STATIC,7,25,56,33,0,WS_EX_TRANSPARENT
END


/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//

#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE 
BEGIN
    IDD_SCC_DIALOG, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 219
        TOPMARGIN, 7
        BOTTOMMARGIN, 83
    END

    IDD_SCC_OPTIONS, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 177
        TOPMARGIN, 7
        BOTTOMMARGIN, 156
    END

    IDD_SCC_ABOUT, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 178
        TOPMARGIN, 7
        BOTTOMMARGIN, 58
    END
END
#endif    // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// Dialog Info
//

IDD_SCC_OPTIONS DLGINIT
BEGIN
    IDC_ADDFILE, 0x403, 2, 0
0x0030, 
    IDC_ADDFILE, 0x403, 2, 0
0x0031, 
    IDC_ADDFILE, 0x403, 2, 0
0x0032, 
    IDC_CHECKIN, 0x403, 2, 0
0x0030, 
    IDC_CHECKIN, 0x403, 2, 0
0x0031, 
    IDC_CHECKIN, 0x403, 2, 0
0x0032, 
    IDC_CHECKOUT, 0x403, 2, 0
0x0030, 
    IDC_CHECKOUT, 0x403, 2, 0
0x0031, 
    IDC_CHECKOUT, 0x403, 2, 0
0x0032, 
    IDC_DELETEFILES, 0x403, 2, 0
0x0030, 
    IDC_DELETEFILES, 0x403, 2, 0
0x0031, 
    IDC_DELETEFILES, 0x403, 2, 0
0x0032, 
    IDC_GETONOPEN, 0x403, 2, 0
0x0030, 
    IDC_GETONOPEN, 0x403, 2, 0
0x0031, 
    IDC_GETONOPEN, 0x403, 2, 0
0x0032, 
    IDC_WARNONFAILURE, 0x403, 2, 0
0x0030, 
    IDC_WARNONFAILURE, 0x403, 2, 0
0x0031, 
    IDC_WARNONFAILURE, 0x403, 2, 0
0x0032, 
    0
END


/////////////////////////////////////////////////////////////////////////////
//
// String Table
//

STRINGTABLE DISCARDABLE 
BEGIN
    IDS_SCCPROVIDER_LONGNAME "Source Code Control Provider Add-in"
    IDS_SCCPROVIDER_DESCRIPTION 
                            "Change Visual Studio's source code control provider."
    IDS_CMD_STRING          "\nSCCProvider Sample Command\nDisplays a message box\nSource Code Control Provider Switcher"
END

#endif    // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////


/////////////////////////////////////////////////////////////////////////////
// Italian (Italy) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ITA)
#ifdef _WIN32
LANGUAGE LANG_ITALIAN, SUBLANG_ITALIAN
#pragma code_page(1252)
#endif //_WIN32

/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME           ICON    DISCARDABLE     "res\\HypLnkEx.ico"
#endif    // Italian (Italy) resources
/////////////////////////////////////////////////////////////////////////////



#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif //_WIN32
#include "res\SCCProvider.rc2"  // non-Microsoft Visual C++ edited resources
#include "afxres.rc"         // Standard components
#endif
1 TYPELIB "SCCProvider.tlb"

/////////////////////////////////////////////////////////////////////////////
#endif    // not APSTUDIO_INVOKED

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Systems Engineer
United States United States
Bassam Abdul-Baki has a Bachelor of Science (BS) degree and a Master of Science (MS) degree in Mathematics and another MS in Technology Management. He's an analyst by trade. He started out in Quality Assurance (QA) and analysis, then dabbled in Visual C++ and Visual C# programming for a while, and then came back to QA and analysis again. He's not sure where he'll be five years from now, but is looking into data analytics.

Bassam is into mathematics, technology, astronomy, archaeology, and genealogy.

Comments and Discussions