ccmetricviewer_dll.zip
Program Files
CCMetricViewer
1033
Resource.dll
CCMetricViewer.dll
ccmetricviewer_src.zip
C++ Programs
CCMetricViewer
AddIn.def
AddIn.rgs
ccmlogo.bmp
logo.bmp
mlogo.bmp
Resource
ccmlogo.bmp
mlogo.bmp
vc6_dll.zip
Microsoft Visual Studio
COMMON
MSDev98
AddIns
CycloComplexViewer.dll
vc6_source.zip
CycloComplexViewer
CycloComplexViewer.clw
CycloComplexViewer.def
CycloComplexViewer.dsp
CycloComplexViewer.dsw
CycloComplexViewer.odl
res
logo.ico
TBarLrge.bmp
TBarMedm.bmp
|
// AddInMod.cpp : Implementierungsdatei
//
#include "stdafx.h"
#include "CycloComplexViewer.h"
#include "DSAddIn.h"
#include "Commands.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
// Dieser Code wird beim ersten Laden des Add-Ins und beim Starten der Anwendung aufgerufen
// jeder nachfolgenden Developer Studio-Sitzung
STDMETHODIMP CDSAddIn::OnConnection(IApplication* pApp, VARIANT_BOOL bFirstTime,
long dwCookie, VARIANT_BOOL* OnConnection)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
// An uns �bergebene Info speichern
IApplication* pApplication = NULL;
if (FAILED(pApp->QueryInterface(IID_IApplication, (void**) &pApplication))
|| pApplication == NULL)
{
*OnConnection = VARIANT_FALSE;
return S_OK;
}
m_dwCookie = dwCookie;
// Befehlsverteilung erzeugen, R�ckmeldung an DevStudio
CCommandsObj::CreateInstance(&m_pCommands);
m_pCommands->AddRef();
// Das obige QueryInterface hat AddRef auf das Objekt Application angewendet. Es
// wird im Destruktor von CCommand freigegeben.
m_pCommands->SetApplicationObject(pApplication);
// (siehe Definition von VERIFY_OK in stdafx.h)
VERIFY_OK(pApplication->SetAddInInfo((long) AfxGetInstanceHandle(),
(LPDISPATCH) m_pCommands, IDR_TOOLBAR_MEDIUM, IDR_TOOLBAR_LARGE, m_dwCookie));
// DevStudio �ber die implementierten Befehle informieren
// ZU ERLEDIGEN: Ersetzen Sie den nachstehenden Aufruf von AddCommand durch je einen Aufruf,
// f�r jeden durch Ihr Add-In hinzugef�gten Befehl.
// Der Befehlsname sollte nicht in andere Sprachen �bersetzt werden. Die
// QuickInfo, Befehlsbeschreibung und andere Zeichenfolgen, die mit diesem Befehl verkn�pft sind,
// werden in der String-Tabelle (IDS_CMD_STRING) gespeichert und sollten
// lokalisiert werden.
LPCTSTR szCommand = _T("CycloComplexViewerCommand");
VARIANT_BOOL bRet;
CString strCmdString;
strCmdString.LoadString(IDS_CMD_STRING);
strCmdString = szCommand + strCmdString;
CComBSTR bszCmdString(strCmdString);
CComBSTR bszMethod(_T("CycloComplexViewerCommandMethod"));
CComBSTR bszCmdName(szCommand);
VERIFY_OK(pApplication->AddCommand(bszCmdString, bszMethod, 0, m_dwCookie, &bRet));
if (bRet == VARIANT_FALSE)
{
// AddCommand fehlgeschlagen, da ein Befehl dieses Namens bereits
// existiert. Sie k�nnen versuchen, Ihren Befehl unter einem anderen Namen hinzuzuf�gen.
// Oder das Laden schl�gt fehl, wie wir hier demonstrieren werden.
*OnConnection = VARIANT_FALSE;
return S_OK;
}
// F�gen Sie die Schaltfl�chen f�r die Symbolleiste nur beim ersten Laden des Add-Ins hinzu.
// Die Schaltfl�chen der Symbolleiste werden von Developer Studio automatisch
// zwischen den Sitzungen gespeichert, deshalb sollten Sie die Schaltfl�chen der
// Symbolleisten-Schaltfl�che nur einmal hinzuf�gen.
if (bFirstTime == VARIANT_TRUE)
{
VERIFY_OK(pApplication->
AddCommandBarButton(dsGlyph, bszCmdName, m_dwCookie));
}
*OnConnection = VARIANT_TRUE;
return S_OK;
}
// Dieser Code wird bei Shut-Down-Vorg�ngen und beim Entfernen des Add-Ins aus dem Speicher aufgerufen
STDMETHODIMP CDSAddIn::OnDisconnection(VARIANT_BOOL bLastTime)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
m_pCommands->UnadviseFromEvents();
m_pCommands->Release();
m_pCommands = NULL;
// ZU ERLEDIGEN: Hier alle anfallenden Bereinigungsarbeiten durchf�hren
return S_OK;
}
|
By viewing downloads associated with this article you agree to the Terms of use 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.
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
I am a qualified Veterinary Surgeon who prefers treating computers with viruses than animals with viruses. I have recently completed a MEng German Informatics degree at the University of Reading with a 2:1. I also have the ISEB Foundation Certificate in Software Testing.
Currently I am umemployed and desparately looking for a job in the IT industry.