Click here to Skip to main content
15,898,134 members
Articles / Containers / Virtual Machine

An extendable report editor

Rate me:
Please Sign up or sign in to vote.
5.00/5 (11 votes)
3 Sep 2008CPOL3 min read 41.3K   2K   35  
An extendable report editor. You can simply add your own controls without recompiling the program or writing annoying plug-ins.
// Misc.h: interface for the CMisc class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MISC_H__886ED6AD_5EEC_4593_8333_9EB77699295F__INCLUDED_)
#define AFX_MISC_H__886ED6AD_5EEC_4593_8333_9EB77699295F__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "common.h"

#define MAX_INT		((int)(0x7FFFFFFF))
#define MIN_INT		((int)(0x80000000))
#define MAX_CHAR	((char)(0x7F))
#define MIN_CHAR	((char)(0x80))
#define MAX_SHORT	((short)(0x7FFF))
#define MIN_SHORT	((short)(0x8000))

class CMisc  
{
public:
	static int div_overflow(DWORD a,DWORD b);
	static int div_overflow(int a,int b);
	static int mult(long op1, long op2, long *prod_hi, long *prod_lo);
	static QWORD hex2dec_64(char *shex);
	static int add_overflow(DWORD a,DWORD b);
	static int add_overflow(int a,int b);
	static int hex2dec_32(char *shex);
	static int multi_overflow(DWORD a, DWORD b);
	static int multi_overflow(int a,int b);
	static int sub_overflow(BYTE a,BYTE b);
	static int sub_overflow(DWORD a, DWORD b);
	static int sub_overflow(char a,char b);
	static int sub_overflow(int a,int b);
	static int sub_overflow(short a,short b);
	static int sub_overflow(WORD a,WORD b);
	static int wild_cmp(char *wild,char *string);
};

#endif // !defined(AFX_MISC_H__886ED6AD_5EEC_4593_8333_9EB77699295F__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
Software Developer
China China
26 years old, 2 years work experience.

Comments and Discussions