Click here to Skip to main content
12,458,005 members (54,190 online)
Click here to Skip to main content

Stats

1.1M views
4.8K downloads
221 bookmarked
Posted

Building an Office2K COM addin with VC++/ATL

, 30 Apr 2003
This article shows how to program an Outlook2000/2K+ COM addin using a pure ATL COM object.
OutlookAddinps.mk
OutlookAddin.dsp
OutlookAddin.dsw
Addin.rgs
LitePage.rgs
Page.rgs
PropPage.rgs
OutlookAddin.tlb
bitmap1.bmp
litepage.bmp
proppage.bmp
OutlookAddin.def
OutlookAddinps.def
OutlookAddin.plg
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.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 ""winres.h""\r\n"
    "\0"
END

3 TEXTINCLUDE DISCARDABLE 
BEGIN
    "1 TYPELIB ""OutlookAddin.tlb""\r\n"
    "\0"
END

#endif    // APSTUDIO_INVOKED


#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", "OutlookAddin Module\0"
            VALUE "FileVersion", "1, 0, 0, 1\0"
            VALUE "InternalName", "OutlookAddin\0"
            VALUE "LegalCopyright", "Copyright 2002\0"
            VALUE "OriginalFilename", "OutlookAddin.DLL\0"
            VALUE "ProductName", "OutlookAddin Module\0"
            VALUE "ProductVersion", "1, 0, 0, 1\0"
            VALUE "OLESelfRegister", "\0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
END

#endif    // !_MAC


/////////////////////////////////////////////////////////////////////////////
//
// REGISTRY
//

IDR_ADDIN               REGISTRY DISCARDABLE    "Addin.rgs"
IDR_PROPPAGE            REGISTRY DISCARDABLE    "PropPage.rgs"
IDR_PAGE                REGISTRY DISCARDABLE    "Page.rgs"
IDR_LITEPAGE            REGISTRY DISCARDABLE    "LitePage.rgs"

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

IDB_BITMAP1             BITMAP  DISCARDABLE     "bitmap1.bmp"
IDB_PROPPAGE            BITMAP  DISCARDABLE     "proppage.bmp"

IDB_LITEPAGE            BITMAP  DISCARDABLE     "litepage.bmp"


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

IDD_PROPPAGE DIALOGEX 0, 0, 225, 220
STYLE WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Sans Serif"
BEGIN
    GROUPBOX        "Static",IDC_STATIC,18,18,183,127
    CONTROL         "Red",IDC_RED,"Button",BS_AUTORADIOBUTTON,34,34,99,17
    CONTROL         "Blue",IDC_BLUE,"Button",BS_AUTORADIOBUTTON,34,64,99,17
    CONTROL         "Green",IDC_GREEN,"Button",BS_AUTORADIOBUTTON,34,94,99,
                    17
END

IDD_LITEPAGE DIALOGEX 0, 0, 242, 214
STYLE WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Sans Serif"
BEGIN
    LTEXT           "Outlook Addin LitePage",IDC_LABEL,22,57,161,20
END


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

STRINGTABLE DISCARDABLE 
BEGIN
    IDS_PROJNAME            "OutlookAddin"
    IDS_TITLEPage           "Title"
    IDS_HELPFILEPage        "Help File Name"
    IDS_DOCSTRINGPage       "Your Help String"
END

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



#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
1 TYPELIB "OutlookAddin.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

Share

About the Author

Amit Dey
Web Developer
India India
Amit Dey is a freelance programmer from Bangalore,India. Chiefly programming VC++/MFC, ATL/COM and PocketPC and Palm platforms. Apart from programming and CP, he is a self-taught guitar and keyboard player.

He can be contacted at visualcdev@hotmail.com


You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160826.1 | Last Updated 1 May 2003
Article Copyright 2002 by Amit Dey
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid