Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Undocumented Visual C++

, 17 Sep 2000
Spelunking in the Badlands of MSDEV
// ---------------
// You may use, compile or redistribute this source as part of your application 
// for free. You may not redistribute it as a part of a software development 
// library without the agreement of the author. If the sources are 
// distributed along with the application, you should leave the original 
// copyright notes in the source code without any changes.
// This code can be used WITHOUT ANY WARRANTIES on your own risk.
// Nick Hodapp

// cstm1dlg.cpp : implementation file

#include "stdafx.h"
#include "ExtensionAddin.h"
#include "cstm1dlg.h"
#include "ExtensionAddinAw.h"

#undef THIS_FILE
static char THIS_FILE[] = __FILE__;

// CDlgExtAddin1 dialog

: CAppWizStepDlg(CDlgExtAddin1::IDD)
	m_strDescription = _T("CoDeveloper Generated Addin");

void CDlgExtAddin1::DoDataExchange(CDataExchange* pDX)
	DDX_Control(pDX, IDC_STATIC_URL, m_staticUrl);
	DDX_Control(pDX, IDC_CDBITMAP, m_staticBmp);
	DDX_Text(pDX, IDC_EDIT_ADDIN_DESCRIPTION, m_strDescription);
	DDX_Text(pDX, IDC_EDIT_ADDIN_NAME, m_strName);

// This is called whenever the user presses Next, Back, or Finish with this step
//  present.  Do all validation & data exchange from the dialog in this function.
BOOL CDlgExtAddin1::OnDismiss()
	if (!UpdateData(TRUE))
		return FALSE;



	// simple validation:
	for (int i = 0, iMax = m_strObjName.GetLength() ; i < iMax ; i++)
		int c = m_strObjName.GetAt(i);

		if ((!isalpha(c) && !isdigit(c)) || (i == 0 && isdigit(c)))
			AfxMessageBox("Invalid object name.  Use letters and digits only.", MB_OK, 0);
			return FALSE;

	ExtensionAddinAW.m_Dictionary[_T("ADDIN_NAME")] = m_strName;
	ExtensionAddinAW.m_Dictionary[_T("ADDIN_OBJNAME")] = m_strObjName;
	ExtensionAddinAW.m_Dictionary[_T("ADDIN_DESCRIPTION")] = m_strDescription;

	return TRUE;	// return FALSE if the dialog shouldn't be dismissed

BEGIN_MESSAGE_MAP(CDlgExtAddin1, CAppWizStepDlg)

// CDlgExtAddin1 message handlers

BOOL CDlgExtAddin1::OnInitDialog() 
	// Init bitmap

	CRect	rclClient; GetClientRect(&rclClient);
	CRect rcl; m_staticBmp.GetClientRect(&rcl);
	m_staticBmp.SetWindowPos(NULL, (rclClient.Width()/2)-rcl.Width()/2, 5, 0, 0, SWP_NOSIZE | SWP_NOZORDER);

	ExtensionAddinAW.m_Dictionary.Lookup(_T("root"), m_strName);
	ExtensionAddinAW.m_Dictionary.Lookup(_T("root"), m_strObjName);


	return TRUE;

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.


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


About the Author

Nick Hodapp
Web Developer
United States United States
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.141220.1 | Last Updated 18 Sep 2000
Article Copyright 2000 by Nick Hodapp
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid