Click here to Skip to main content
15,885,278 members
Articles / Desktop Programming / WTL

Form Designer

26 Jul 2021CPOL24 min read 351.2K   82.5K   230  
Component for adding scriptable forms capabilities to an application.
// Class1.h : header file
//
// Author : David Shepherd
//			Copyright (c) 2002, DaeDoe-Software
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_CLASS1_H__84263CC6_F049_48C2_B24A_4C63492CCF94__INCLUDED_)
#define AFX_CLASS1_H__84263CC6_F049_48C2_B24A_4C63492CCF94__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Interfaces.h"

/////////////////////////////////////////////////////////////////////////////
// CClass1 command target

class CClass1 : public CCmdTarget
{
	DECLARE_DYNCREATE(CClass1)

	CClass1();           // protected constructor used by dynamic creation

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CClass1)
	public:
	virtual void OnFinalRelease();
	//}}AFX_VIRTUAL

// Implementation
protected:
	virtual ~CClass1();

	BOOL GetDispatchIID(IID* pIID)
	{
		*pIID = DIID_IClass1;
		return TRUE;
	}

	// Generated message map functions
	//{{AFX_MSG(CClass1)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
	DECLARE_OLECREATE(CClass1)

	// Generated OLE dispatch map functions
	//{{AFX_DISPATCH(CClass1)
	afx_msg BSTR GetText();
	afx_msg void SetText(LPCTSTR lpszNewValue);
	afx_msg void ShowText();
	//}}AFX_DISPATCH
	DECLARE_DISPATCH_MAP()
	DECLARE_INTERFACE_MAP()

	DECLARE_CONNECTION_MAP()

	BEGIN_CONNECTION_PART(CClass1,Class1CP)
		CONNECTION_IID(DIID_IClass1Events)
	END_CONNECTION_PART(Class1CP)

	DECLARE_OLETYPELIB(CClass1)

private:
	CString m_Text;
};

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

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

#endif // !defined(AFX_CLASS1_H__84263CC6_F049_48C2_B24A_4C63492CCF94__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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions