Click here to Skip to main content
15,883,818 members
Articles / Desktop Programming / MFC

Multi platform plug-in development made easy!

Rate me:
Please Sign up or sign in to vote.
4.04/5 (25 votes)
7 Mar 20065 min read 100.6K   1.9K   63  
How to use and develop plug-ins for multiple platforms.
// MfcPluginDllTestDlg.h : Headerdatei
//

#pragma once

#include "spl.h"
#include "afxwin.h"


class CMfcPluginDllTestDlg : public CDialog
{
	//
	//-----------------------------------------------------------------------------------------------------------------------
	//***********************************************     CON/DESTRUCTION     ***********************************************
	//-----------------------------------------------------------------------------------------------------------------------
	//
public:
	//-----------------------------------------------------------------------------------------------------------------------
	///	@brief		Default constructor.
	//-----------------------------------------------------------------------------------------------------------------------
	CMfcPluginDllTestDlg(CWnd* pParent = NULL);	

	//
	//-----------------------------------------------------------------------------------------------------------------------
	//************************************************     MODIFICATION     *************************************************
	//-----------------------------------------------------------------------------------------------------------------------
	//

	//
	// DIALOG FIELD DATA
	//
	enum DIALOG_ID { IDD = IDD_MFCPLUGINTEST_DIALOG };

protected:
	//
	// DDX/DDV-SUPPORT
	//
	virtual void DoDataExchange(CDataExchange* pDX);	


private:

	/************************************************************************************************/
	//
	// MESSAGE-HANDLER
	//
	/************************************************************************************************/
	virtual BOOL	OnInitDialog();
	afx_msg void	OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void	OnPluginsExit();
	afx_msg void	OnPluginsLoadall();
	afx_msg void	OnPluginsLoadone();
	afx_msg void	OnPluginsUnloadall();
	afx_msg void	OnPluginsUnloadone();
	afx_msg void	OnBnClickedOk();
	afx_msg void	OnBnClickedCancel();
	afx_msg void	OnLbnSelchangeLoadedPlugins();
	afx_msg void	OnPluginsRefresh();
	afx_msg void	OnPluginsLoadallFrompath();
	DECLARE_MESSAGE_MAP()


	/************************************************************************************************/
	//
	// HELPER FUNCTIONS
	//
	/************************************************************************************************/

	//
	// PUT AN PLUGININFO TO INFO VIEW CONTROL
	//
	void PutPluginInfo( slcPluginInfo& pluginInfo );

	//
	// MAKE A NEW LIST OF LOADED PLUGINS
	//
	void PutLoadedPlugins( void );



	/************************************************************************************************/
	//
	// ATTRIBUTES
	//
	/************************************************************************************************/

	//
	// NEEDED SPL-OBJECTS
	//
	slcPluginServer m_pluginServer;
	slcPluginArgs   m_pluginArgs;
	slcPluginInfo   m_pluginInfo;

	//
	// SHOWS INFOS FROM SELECTED PLUGIN
	//
	CListBox m_ctrlListPluginInfo;

	//
	// SHOWS A LIST OF ALL LOADED PLUGINS
	//
	CListBox m_ctrlListLoadedPlugins;

	//
	// OUTPUT STRING
	//
	CString m_strOutput;

	//
	// INPUT STRING
	//
	CString m_strInput;

	//
	// CONTROL FOR OUTPUT
	//
	CEdit m_ctrlEditOutput;
	
	//
	// CONTROL FOR INPUT
	//
	CEdit m_ctrlEditInput;

	//
	// DIALOG ICON HANDLE
	//
	HICON m_hIcon;
};

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
Germany Germany
I was born in 1982 near Stuttgart / Germany and began my first steps in programming computers at the age of only nine years on an old Commodore CBM 7072. In 2002 I finished my education as IT specialist for software engineering and did my civillian service afterwards. Currently I'm working as leader of the software division in a bigger company located in south west Germany, mainly on software development and research projects for multimedia terminals and user recognition/verification systems.

Comments and Discussions