Click here to Skip to main content
11,706,979 members (51,199 online)
Click here to Skip to main content
Add your own
alternative version

CatchCulator

, 18 Oct 2005 CPOL 93K 1.7K 69
A tool used to catch and combine values output by different applications.
catchculator_demo.zip
TestValues2.exe
TestValues1.exe
CatchCulator.exe
catchculator_sourcecode.zip
CatchCulator.clw
CatchCulator.dsp
CatchCulator.dsw
res
bitmap1.bmp
bmp00001.bmp
bmp00002.bmp
bmp00003.bmp
bmp00004.bmp
bmp00005.bmp
bmp00006.bmp
bmp00007.bmp
bmp00008.bmp
bmp00009.bmp
bmp00010.bmp
CatchCulator.ico
catchd1.bmp
catchu1.bmp
catchu2.bmp
catchu3.bmp
d1u1.bmp
d1u2.bmp
d1u3.bmp
d2u1.bmp
d2u2.bmp
d2u3.bmp
d3u1.bmp
d3u2.bmp
d3u3.bmp
delitemu.bmp
delu1.bmp
delu2.bmp
delu3.bmp
display_1.bmp
display_2.bmp
display_3.bmp
grad.bmp
settimer.bmp
timerset.bmp
timeru2.bmp
timeru3.bmp
// Author: Dr. Mircea Puiu
// Created on: October 2005 for CodeProject
//
#if !defined(AFX_SCRIPTDLG_H__D69CC9BD_873F_4D3F_A283_F841067EA527__INCLUDED_)
#define AFX_SCRIPTDLG_H__D69CC9BD_873F_4D3F_A283_F841067EA527__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ScriptDlg.h : header file
//

#include <afxtempl.h>


/////////////////////////////////////////////////////////////////////////////
// Calculation class
class Calculation
{
public:
	Calculation() { result = 0; opL = ""; opR = ""; }
	~Calculation() {}
	CString resultName;
	CString	operation;
	CString opL; // 1-opName, 2-opName (1 for caught var, 2 for computed value)
	CString opR; // or 3-value (for constant value)
	double result;
};


/////////////////////////////////////////////////////////////////////////////
// CScriptDlg dialog

class CScriptDlg : public CDialog
{
// Construction
public:
	int m_nID;
	void UpdateScript();
	POSITION FindVariable(char *varName);
	double ComputedValue(char far* resultName);
	CList <Calculation, Calculation> m_listToDo;
	CString m_strCaption;
	COLORREF m_colorBkGnd;
	CBrush m_brushBkGnd;
	CScriptDlg(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CScriptDlg)
	enum { IDD = IDD_DIALOG_SCRIPT };
	CEdit	m_script;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CScriptDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CScriptDlg)
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	virtual BOOL OnInitDialog();
	afx_msg void OnButtonUpdateScript();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

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

Share

About the Author

Mircea Puiu
Software Developer (Senior)
Europe Europe
More than 22 years of software development experience.
SCRUM Master nowadays

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150819.1 | Last Updated 18 Oct 2005
Article Copyright 2005 by Mircea Puiu
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid