Click here to Skip to main content
15,886,362 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 279K   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.
///////////////////////////////////////////////////////////////////////////////
//
// CeWinDLMain - The application frame window
//
///////////////////////////////////////////////////////////////////////////////

#ifndef __WinDLMain_h__
#define __WinDLMain_h__

#include "CeTab.h"
#include "BeamExPages.h"

class CeBeamExMain: public CeWnd
{
private:
	TCHAR m_szAppTitle[256];
#if defined(_WIN32_WCE)
	CeCmdBar m_cmdbar;
#endif

	int m_nFirstStd;
	int m_nFirstLocal;

	CeTabSheet m_panelSheet;
		CeLayoutPage m_pageLayout;
		CeActualsPage m_pageActuals;
		CeMaterialsPage m_pageMaterials;

	CeResultsPanel m_panelResults;

	CeString m_strScenario;

protected:
	virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam, bool& bHandled);
	virtual BOOL OnCreate(LPCREATESTRUCT lpCS, bool& bHandled);
	virtual void OnDestroy(bool& bHandled);
	virtual void OnClose(bool& bHandled);
	virtual LRESULT OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);
	virtual void OnSettingChange( WORD wFlags, LPCTSTR lpszSection, bool& bHandled );
	virtual void OnSize(UINT nType, int cx, int cy, bool& bHandled);

	void OnAbout();
	void OnOptions();
	void OnOpen();
	void OnDownload();
	void OnSave();
	void OnSaveAs();
	void OnCalc();
	void OnFileClose();

	void SaveScenario(LPCTSTR lpszScenario);
	void OpenScenario(LPCTSTR lpszScenario);

public:
	CeBeamExMain();
	virtual ~CeBeamExMain();
};


///////////////////////////////////////////////////////////////////////////////
//
//
///////////////////////////////////////////////////////////////////////////////
class CeScenarioListDlg: public CeDialog
{
public:
	CeString m_str;
	bool m_bSave;
	
	//
	// required for tell if we're changing the controls of the user is,
	// notifications happen if they are provoced by the user or though code
	//
	bool m_bChanging;

	CeScenarioListDlg(LPCTSTR lpszScene, bool bSave=false)
	{
		if (NULL != lpszScene)
			m_str = lpszScene;
		m_bSave = bSave;
		m_bChanging = false;
	}

protected:
	virtual BOOL OnInitDialog();
	virtual void OnOK();
	virtual void OnCancel();
	virtual LRESULT OnNotify(int nCtrlId, LPNMHDR pNMH, bool& bHandled);
	virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam, bool& bHandled);
};


#endif // __WinDLMain_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