Click here to Skip to main content
15,886,518 members
Articles / Desktop Programming / MFC

Using a Doc/View exported from a dynamically loaded DLL (SDI)

Rate me:
Please Sign up or sign in to vote.
4.93/5 (13 votes)
6 May 20025 min read 200.7K   4.8K   75  
An article on on how to load DLLs which export views into a SDI Application
#if !defined(AFX_CUSTOMERCONTACT_H__152609BB_2715_4E40_B931_306D4B0CD6B6__INCLUDED_)
#define AFX_CUSTOMERCONTACT_H__152609BB_2715_4E40_B931_306D4B0CD6B6__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// CustomerContact.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CCustomerContact form view

#ifndef __AFXEXT_H__
#include <afxext.h>
#endif

#include "resource.h"

class CCustomerContact : public CFormView
{
protected:
	CCustomerContact();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(CCustomerContact)

// Form Data
public:
	//{{AFX_DATA(CCustomerContact)
	enum { IDD = IDD_INITIALCONTACT };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCustomerContact)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	virtual ~CCustomerContact();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
	//{{AFX_MSG(CCustomerContact)
	afx_msg void OnButton1();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CUSTOMERCONTACT_H__152609BB_2715_4E40_B931_306D4B0CD6B6__INCLUDED_)

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
Web Developer
United States United States
Dave has been programming for the past 20+ years first on a variety of platforms and operating systems using various languages. As a hobbyist Dave cut his teeth on the Commodore Pet and the 64 coding in basic and then moving to 6502 ASM. Dave moved to the Amiga using 68000 ASM and then C. His knowledge of the C language offered the stepping stone for him to make his hobby his profession taking a position coding C on an AIX Unix platform. Since then he has worked on many flavors of Unix, QNX, Windows (3.11 – present), and has been coding games for his Pocket PC in his spare time.

Dave lives in Indiana with his two teenage daughters and two cats.

Comments and Discussions