Click here to Skip to main content
15,880,725 members
Articles / Web Development / HTML

A Comprehensive CE Class Library to Replace ATL and MFC

Rate me:
Please Sign up or sign in to vote.
4.48/5 (14 votes)
4 Oct 2000CPOL 277.8K   998   70  
A collection of classes for CE that do not use ATL or MFC, plus an FTP client, database viewer, and sample application that solves beam deflection equations.
#ifndef __PropertyDlg_h__
#define __PropertyDlg_h__

#include <CeTab.h>
#include <CeFtp.h>
#include <CeRes.h>

#include "ftpSite.h"
#include "ftpViewRes.h"

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

class CeFtpPage: public CeTabPage
{
private:
	CeChildMgr		m_mgr;

	CeLabelEdit m_labelName;
	CeLabelEdit m_labelIP;
	CeLabelEdit m_labelUser;
	CeLabelEdit m_labelPassword;

public:
	CeFtpSite m_site;

// Construction
	CeFtpPage();

// Windows messages
	virtual BOOL OnInitDialog();
	virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam, bool& bHandled);
	virtual void OnSize( UINT nType, int cx, int cy, bool& bHandled );
	virtual void OnApply();

// Operations
	void SetFtp(CeFtpSite & site)
	{
		m_site.m_strName = site.m_strName;
		m_site.m_strAddress = site.m_strAddress;
		m_site.m_strUser = site.m_strUser;
		m_site.m_strPassword = site.m_strPassword;
		m_site.m_bAnon = site.m_bAnon;
		m_site.m_bPassive = site.m_bPassive;
	}
};

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

class CeFilePage: public CeTabPage
{
private:
	CeChildMgr		m_mgr;

public:
	bool m_bLocal;
	bool m_bChangedAttributes;
	CeString m_strDirectory;
	WIN32_FIND_DATA m_finddata;
	SHFILEINFO m_shinfo;

public:
// Construction
	CeFilePage();

// Windows messages
	virtual BOOL OnInitDialog();
	virtual void OnSize(UINT nType, int cx, int cy, bool & bHandled);
	virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam, bool& bHandled);
	virtual void OnApply();

// Operations
	void SetFile(CeString & strDir, WIN32_FIND_DATA & findData, bool bLocal);
	bool IsShortcut() const;
};

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

class CeShortcutPage: public CeTabPage
{
private:
	CeChildMgr		m_mgr;

public:
	CeString m_strDirectory;
	SHFILEINFO m_shinfo;
	WIN32_FIND_DATA m_finddata;

public:
// Construction
	CeShortcutPage();

// Windows messages
	virtual BOOL OnInitDialog();
	virtual void OnSize( UINT nType, int cx, int cy, bool& bHandled );
	virtual void OnApply();

// Operations
	void SetFile(CeString & strDir, WIN32_FIND_DATA & findData);
};


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


class CeVersionPage: public CeTabPage
{
private:
	CeChildMgr		m_mgr;

public:
// Construction
	CeVersionPage();

	CeVersionInfo* m_pVersion;

// Windows messages
	virtual BOOL OnInitDialog();
	virtual void OnSize( UINT nType, int cx, int cy, bool& bHandled );
};


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

class CeSystemPage: public CeTabPage
{
private:
	CeChildMgr		m_mgr;
	CeStaticGroup m_groupVersion;
	CeStaticGroup m_groupSystem;

public:
// Construction
	CeSystemPage();

// Windows messages
	virtual BOOL OnInitDialog();
	virtual void OnSize( UINT nType, int cx, int cy, bool& bHandled );
};


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

class CeTasksPage: public CeTabPage
{
private:
	CeChildMgr		m_mgr;

public:
// Construction
	CeTasksPage();

// Windows messages
	virtual BOOL OnInitDialog();
	virtual void OnSize( UINT nType, int cx, int cy, bool& bHandled );
};


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

class CePropertyDlg: public CeDialog
{
private:
	CeChildMgr		m_mgr;
	CeTabSheet		m_sheet;
	bool			m_bGeneral;

public:
	CeFilePage		m_pageFile;
	CeFtpPage		m_pageFtp;
	CeShortcutPage	m_pageShortcut;
	CeSystemPage	m_pageSystem;
	CeVersionPage	m_pageVersion;
	CeTasksPage		m_pageTask;

// Construction/Destruction
	CePropertyDlg();
	virtual ~CePropertyDlg();

// Windows messages
	virtual BOOL OnInitDialog();
	virtual LRESULT OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);
	virtual void OnTimer( UINT nTimer, bool& bHandled );
	virtual void OnSize(UINT nType, int cx, int cy, bool& bHandled);
	virtual void OnSettingChange( WORD wFlag, LPCTSTR pszSection, bool& bHandled );

	virtual void OnOK();
	virtual void OnCancel();

// Operations
	void AddFtpSiteProperty(CeFtpSite& site);
	void AddFileProperty(CeString & strDir, WIN32_FIND_DATA & findData, bool bLocal);
	void AddSystemProperty();
	void AddTaskProperty();
};


#endif // __PropertyDlg_h__

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
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions