Click here to Skip to main content
15,895,142 members
Articles / Desktop Programming / ATL

A Beginner Tutorial for Writing Simple COM/ATL DLL For VS2012

Rate me:
Please Sign up or sign in to vote.
4.90/5 (30 votes)
19 Dec 2012CPOL9 min read 161.9K   5.4K   79  
Article touching simple programming instrument like Property, Method, Event and invoking ATL Dialogs from ATL/COM Component
��// Microsoft Visual C++ generated resource script.

//

#include "resource.h"



#define APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////

//

// Generated from the TEXTINCLUDE 2 resource.

//

#ifndef APSTUDIO_INVOKED

#include "targetver.h"

#endif

#include "winres.h"

#include "verrsrc.h"



/////////////////////////////////////////////////////////////////////////////

#undef APSTUDIO_READONLY_SYMBOLS



/////////////////////////////////////////////////////////////////////////////

// English (United States) resources



#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)

LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US



#ifdef APSTUDIO_INVOKED

/////////////////////////////////////////////////////////////////////////////

//

// TEXTINCLUDE

//



1 TEXTINCLUDE 

BEGIN

    "resource.h\0"

END



2 TEXTINCLUDE 

BEGIN

    "#ifndef APSTUDIO_INVOKED\r\n"

    "#include ""targetver.h""\r\n"

    "#endif\r\n"

    "#include ""winres.h""\r\n"

    "#include ""verrsrc.h""\r\n"

    "\0"

END



3 TEXTINCLUDE 

BEGIN

    "1 TYPELIB ""SimpleATLCom.tlb""\r\n"

    "\0"

END



#endif    // APSTUDIO_INVOKED





/////////////////////////////////////////////////////////////////////////////

//

// 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 0x40004L

 FILETYPE 0x2L

 FILESUBTYPE 0x0L

BEGIN

    BLOCK "StringFileInfo"

    BEGIN

        BLOCK "040904B0"

        BEGIN

            VALUE "CompanyName", "TODO: <Company name>"

            VALUE "FileDescription", "TODO: <File description>"

            VALUE "FileVersion", "1.0.0.1"

            VALUE "LegalCopyright", "TODO: (c) <Company name>.  All rights reserved."

            VALUE "InternalName", "SimpleATLCom.dll"

            VALUE "OriginalFilename", "SimpleATLCom.dll"

            VALUE "ProductName", "TODO: <Product name>"

            VALUE "ProductVersion", "1.0.0.1"

        END

    END

    BLOCK "VarFileInfo"

    BEGIN

        VALUE "Translation", 0x409, 1200

    END

END





/////////////////////////////////////////////////////////////////////////////

//

// REGISTRY

//



IDR_SIMPLEATLCOM        REGISTRY                "SimpleATLCom.rgs"



/////////////////////////////////////////////////////////////////////////////

//

// String Table

//



STRINGTABLE

BEGIN

    IDS_PROJNAME            "SimpleATLCom"

END



#endif    // English (United States) resources

/////////////////////////////////////////////////////////////////////////////





/////////////////////////////////////////////////////////////////////////////

// English (India) resources



#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENN)

LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_INDIA



/////////////////////////////////////////////////////////////////////////////

//

// REGISTRY

//



IDR_SIMPLECOM           REGISTRY                "SimpleCom.rgs"

IDR_SIMPLEATLDLGCONTROLLER REGISTRY                "SimpleATLDLGController.rgs"



/////////////////////////////////////////////////////////////////////////////

//

// Dialog

//



IDD_SIMPLEATLDIALOG DIALOGEX 0, 0, 321, 102

STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU

CAPTION "Dialog"

FONT 8, "MS Shell Dlg", 0, 0, 0x0

BEGIN

    DEFPUSHBUTTON   "OK",IDOK,209,81,50,14

    PUSHBUTTON      "Cancel",IDCANCEL,264,81,50,14

    GROUPBOX        "Set Values",IDC_STATIC,7,7,307,68

    LTEXT           "Name:",IDC_STATIC,23,22,22,8

    LTEXT           "ATL Marks",IDC_STATIC,23,45,34,8

    LTEXT           "COM Marks",IDC_STATIC,157,45,37,8

    EDITTEXT        IDC_EDIT_NAME,81,22,139,14,ES_AUTOHSCROLL

    EDITTEXT        IDC_EDIT_ATLMARKS,23,56,70,14,ES_AUTOHSCROLL

    EDITTEXT        IDC_EDIT_COMMARKS,157,57,70,14,ES_AUTOHSCROLL

    PUSHBUTTON      "Calculate",IDC_BUTTON_CALCULATE,236,57,65,14

END





/////////////////////////////////////////////////////////////////////////////

//

// DESIGNINFO

//



#ifdef APSTUDIO_INVOKED

GUIDELINES DESIGNINFO

BEGIN

    IDD_SIMPLEATLDIALOG, DIALOG

    BEGIN

        LEFTMARGIN, 7

        RIGHTMARGIN, 314

        TOPMARGIN, 7

        BOTTOMMARGIN, 95

    END

END

#endif    // APSTUDIO_INVOKED



#endif    // English (India) resources

/////////////////////////////////////////////////////////////////////////////







#ifndef APSTUDIO_INVOKED

/////////////////////////////////////////////////////////////////////////////

//

// Generated from the TEXTINCLUDE 3 resource.

//

1 TYPELIB "SimpleATLCom.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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
India India
He used to have biography here Smile | :) , but now he will hire someone (for free offcourse Big Grin | :-D ), Who writes his biography on his behalf Smile | :)

He is Great Fan of Mr. Johan Rosengren (his idol),Lim Bio Liong, Nishant S and DavidCrow and Believes that, he will EXCEL in his life by following there steps!!!

He started with Visual C++ then moved to C# then he become language agnostic, you give him task,tell him the language or platform, he we start immediately, if he knows the language otherwise he quickly learn it and start contributing productively

Last but not the least, For good 8 years he was Visual CPP MSMVP!

Comments and Discussions