Click here to Skip to main content
15,881,898 members
Articles / Desktop Programming / WTL

Form Designer

26 Jul 2021CPOL24 min read 351K   82.5K   230  
Component for adding scriptable forms capabilities to an application.
#if !defined(AFX_FORMVIEWER_H__A2E53FDF_8F99_4EF0_B16A_002E189986C3__INCLUDED_)
#define AFX_FORMVIEWER_H__A2E53FDF_8F99_4EF0_B16A_002E189986C3__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++

// NOTE: Do not modify the contents of this file.  If this class is regenerated by
//  Microsoft Visual C++, your modifications will be overwritten.


// Dispatch interfaces referenced by this interface
class CViewableForm;
class CFormViewerItemDetails;
class CFormViewerItemCollection;

/////////////////////////////////////////////////////////////////////////////
// CFormViewer wrapper class

class CFormViewer : public CWnd
{
protected:
	DECLARE_DYNCREATE(CFormViewer)
public:
	CLSID const& GetClsid()
	{
		static CLSID const clsid
			= { 0xe78fc0e8, 0x1c8e, 0x11d6, { 0xb6, 0xa6, 0xb8, 0x64, 0xd1, 0x4c, 0xd0, 0x46 } };
		return clsid;
	}
	virtual BOOL Create(LPCTSTR lpszClassName,
		LPCTSTR lpszWindowName, DWORD dwStyle,
		const RECT& rect,
		CWnd* pParentWnd, UINT nID,
		CCreateContext* pContext = NULL)
	{ return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID); }

    BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle,
		const RECT& rect, CWnd* pParentWnd, UINT nID,
		CFile* pPersist = NULL, BOOL bStorage = FALSE,
		BSTR bstrLicKey = NULL)
	{ return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID,
		pPersist, bStorage, bstrLicKey); }

// Attributes
public:

// Operations
public:
	void About();
	void LoadFromFile(LPCTSTR FileName);
	void Unload();
	void Expose(LPCTSTR Name, LPDISPATCH pDisp);
	CViewableForm GetForm();
	BOOL GetBorderVisible();
	void SetBorderVisible(BOOL bNewValue);
	unsigned long GetBackColor();
	void SetBackColor(unsigned long newValue);
	CFormViewerItemDetails GetItemDetails(LPDISPATCH pDisp);
	CFormViewerItemCollection GetItems();
};

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

#endif // !defined(AFX_FORMVIEWER_H__A2E53FDF_8F99_4EF0_B16A_002E189986C3__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