78
Is it possible to change the line's height

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutText(L"(1+6.25)/4*6/3");
spCalcEdit1->InsertText(L"(2+6.25)/4*6/3\\r\\n",long(1));
spCalcEdit1->InsertText(L"(3+6.25)/4*6/3\\r\\n",long(1));
spCalcEdit1->InsertText(L"(4+6.25)/4*6/3\\r\\n",long(1));
spCalcEdit1->InsertText(L"Total",vtMissing);
spCalcEdit1->PutLineHeight(L"value + 8 * dpi");
spCalcEdit1->PutDrawGridLines(VARIANT_TRUE);

77
How do I put a picture on the control's background

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutPicture(IPictureDispPtr(((IDispatch*)(spCalcEdit1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)")))));
spCalcEdit1->PutPictureDisplay(EXCALCEDITLib::exUpperLeft);
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutText(L"(1+6.25)/4*6/3");
spCalcEdit1->InsertText(L"\\r\\n",long(1));
spCalcEdit1->InsertText(L"\\r\\n",long(1));
spCalcEdit1->InsertText(L"\\r\\n",long(1));
OutputDebugStringW( L"Expression: " );
OutputDebugStringW( spCalcEdit1->GetText() );
OutputDebugStringW( L"Result: " );
OutputDebugStringW( _bstr_t(spCalcEdit1->GetResult(vtMissing)) );

76
How do I get the numbers only, with no Total fields (method 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutFormatResult(L"<fgcolor=808080><r> = %%");
spCalcEdit1->InsertText(L"100 * 200",vtMissing);
spCalcEdit1->InsertText(L"300 * 400 * 1.5",vtMissing);
spCalcEdit1->InsertText(L"200 + ( 400 * 1.5 + 300 / 1.19)",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);
OutputDebugStringW( _bstr_t(spCalcEdit1->ExecuteTemplate(L"FormatABC(\"lower(A) replace `total` with ``\", Text)")) );

75
How do I get the numbers only, with no Total fields (method 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutFormatResult(L"<fgcolor=808080><r> = %%");
spCalcEdit1->InsertText(L"100 * 200",vtMissing);
spCalcEdit1->InsertText(L"300 * 400 * 1.5",vtMissing);
spCalcEdit1->InsertText(L"200 + ( 400 * 1.5 + 300 / 1.19)",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);
OutputDebugStringW( _bstr_t(spCalcEdit1->FormatABC(L"lower(A) replace `total` with ``",spCalcEdit1->GetText(),vtMissing,vtMissing)) );

74
How do I customize the format to display the result (right,local,2 decimals,less,font)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutLineHeight(L"value + 8 * dpi");
spCalcEdit1->PutFormatLocal(L"( value < 10000 ? `<fgcolor=000000><b><font ;16>` : ``) + (value format `2`)");
spCalcEdit1->PutFormatResult(L"<fgcolor=808080><r> = %l%");
spCalcEdit1->InsertText(L"100 * 200",vtMissing);
spCalcEdit1->InsertText(L"300 * 400 * 1.5",vtMissing);
spCalcEdit1->InsertText(L"200 + ( 400 * 1.5 + 300 / 1.19)",vtMissing);

73
How do I customize the format to display the result (right,local,2 decimals,greater,color)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutFormatLocal(L"( value > 10000 ? `<fgcolor=FF0000><b>` : ``) + (value format `2`)");
spCalcEdit1->PutFormatResult(L"<fgcolor=808080><r> = %l%");
spCalcEdit1->InsertText(L"100 * 200",vtMissing);
spCalcEdit1->InsertText(L"300 * 400 * 1.5",vtMissing);
spCalcEdit1->InsertText(L"200 + ( 400 * 1.5 + 300 / 1.19)",vtMissing);

72
How do I customize the format to display the result (right,local,all decimals)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutFormatLocal(L"value");
spCalcEdit1->PutFormatResult(L"<fgcolor=808080><r> = %l%");
spCalcEdit1->InsertText(L"100 * 200",vtMissing);
spCalcEdit1->InsertText(L"300 * 400 * 1.5",vtMissing);
spCalcEdit1->InsertText(L"200 + ( 400 * 1.5 + 300 / 1.19)",vtMissing);

71
How do I customize the format to display the result (right,local,2 decimals)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutFormatLocal(L"value format `2`");
spCalcEdit1->PutFormatResult(L"<fgcolor=808080><r> = %l%");
spCalcEdit1->InsertText(L"100 * 200",vtMissing);
spCalcEdit1->InsertText(L"300 * 400 * 1.5",vtMissing);
spCalcEdit1->InsertText(L"200 + ( 400 * 1.5 + 300 / 1.19)",vtMissing);

70
How do I customize the format to display the result (right,local,curency)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutFormatLocal(L"currency(value)");
spCalcEdit1->PutFormatResult(L"<fgcolor=808080><r> = %l%");
spCalcEdit1->InsertText(L"100 * 200",vtMissing);
spCalcEdit1->InsertText(L"300 * 400 * 1.5",vtMissing);
spCalcEdit1->InsertText(L"200 + ( 400 * 1.5 + 300 / 1.19)",vtMissing);

69
How do I customize the format to display the result (right,local)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutFormatResult(L"<fgcolor=808080><r> = %l%");
spCalcEdit1->InsertText(L"100 * 200",vtMissing);
spCalcEdit1->InsertText(L"300 * 400 * 1.5",vtMissing);
spCalcEdit1->InsertText(L"200 + ( 400 * 1.5 + 300 / 1.19)",vtMissing);

68
How do I customize the format to display the result (right)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutFormatResult(L"<fgcolor=808080><r> = %%");
spCalcEdit1->InsertText(L"100 * 200",vtMissing);
spCalcEdit1->InsertText(L"300 * 400 * 1.5",vtMissing);
spCalcEdit1->InsertText(L"200 + ( 400 * 1.5 + 300 / 1.19)",vtMissing);

67
How do I customize the format to display the result (default)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->InsertText(L"100 * 200",vtMissing);
spCalcEdit1->InsertText(L"300 * 400 * 1.5",vtMissing);
spCalcEdit1->InsertText(L"200 + ( 400 * 1.5 + 300 / 1.19)",vtMissing);

66
How can I force a line to be there all the time, so user can not delete it, for instance Total

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->InsertLockedText(L"Total",vtMissing);
spCalcEdit1->InsertText(L"100",vtMissing);
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);

65
Is it possible to get the value of specified variable

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->InsertText(L"100",vtMissing);
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);
spCalcEdit1->InsertText(L"TVA = Total * 0.19",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);
OutputDebugStringW( L"The TVA is: " );
OutputDebugStringW( _bstr_t(spCalcEdit1->GetVariable(L"TVA")) );

64
How do I get the total

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->InsertText(L"100",vtMissing);
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);
OutputDebugStringW( L"The total is: " );
OutputDebugStringW( _bstr_t(spCalcEdit1->GetVariable(L"Total")) );

63
How do I get the easter date

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutCalcType(EXCALCEDITLib::exCalcIncludeAll);
spCalcEdit1->ClearWildFormats();
spCalcEdit1->PutFormatResult(L"<r><fgcolor=008000><b>(%%)");
spCalcEdit1->PutAllowComments(L"<fgcolor=008000>//");
spCalcEdit1->AddWildFormat(L"*=*<fgcolor=008000>//*");
spCalcEdit1->AddWildFormat(L"<fgcolor=808080>V*=*");
spCalcEdit1->AddWildFormat(L"<b>EasterSundayDay*=*");
spCalcEdit1->PutBackColorLockedLine(RGB(0,0,0));
spCalcEdit1->PutForeColorLockedLine(RGB(0,0,0));
spCalcEdit1->PutText(L"Year = 2018 // change here the year, to get the Easter Sunday for giving year");
spCalcEdit1->InsertLockedText(L"V1 = (((255 - 11 * (Year mod 19)) - 21) mod 30)",vtMissing);
spCalcEdit1->InsertLockedText(L"V2 = ((V1 + 21) + (V1 > 48 ? -1 : 0) + 6 - ((Year + int(Year / 4)) + V1 + (V1 > 48 ? -1 : 0) + 1) mod 7)",vtMissing);
spCalcEdit1->InsertLockedText(L"EasterSundayDay = date(dateS('3/1/' + Year)  + V2)",vtMissing);
OutputDebugStringW( L"Easter Sunday Day is " );
OutputDebugStringW( _bstr_t(spCalcEdit1->GetVariable(L"EasterSundayDay")) );
OutputDebugStringW( L" for year " );
OutputDebugStringW( _bstr_t(spCalcEdit1->GetVariable(L"Year")) );

62
I've got a red line while I type into the control. How can I disable that (sample 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutAllowFormatInvalidOnTyping(VARIANT_FALSE);
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutText(L"100 + 200(invalid)");

61
I've got a red line while I type into the control. How can I disable that (sample 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutFormatInvalid(L"");
spCalcEdit1->PutText(L"100 + 200(invalid)");

60
How do I specify the color to show the locked lines

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutAllowVariables(L"=");
spCalcEdit1->PutDrawGridLines(VARIANT_TRUE);
spCalcEdit1->PutLineHeight(L"value + 8 * dpi");
spCalcEdit1->PutGridLineColor(RGB(196,196,196));
spCalcEdit1->PutFormatResult(L"<r>[=%l%]");
spCalcEdit1->PutFormatLocal(L"currency(value)");
spCalcEdit1->PutFormatTotalResult(L"<r><b> <fgcolor=FFFFFF>= %l%</b>");
spCalcEdit1->PutBackColorLockedLine(RGB(0,0,1));
spCalcEdit1->PutForeColorLockedLine(RGB(255,255,255));
spCalcEdit1->InsertText(L"100",vtMissing);
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertLockedText(L"VAT = Total * 0.20",vtMissing);
spCalcEdit1->InsertLockedText(L"Total",vtMissing);

59
Can I remove the colors that indicates locked lines

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutAllowVariables(L"=");
spCalcEdit1->PutDrawGridLines(VARIANT_TRUE);
spCalcEdit1->PutLineHeight(L"value + 8 * dpi");
spCalcEdit1->PutGridLineColor(RGB(196,196,196));
spCalcEdit1->PutFormatResult(L"<r><fgcolor=808080>[=%l%]");
spCalcEdit1->PutFormatLocal(L"currency(value)");
spCalcEdit1->PutFormatTotalResult(L"<r><b> = %l%</b>");
spCalcEdit1->PutBackColorLockedLine(RGB(0,0,0));
spCalcEdit1->PutForeColorLockedLine(RGB(0,0,0));
spCalcEdit1->InsertText(L"100",vtMissing);
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertLockedText(L"VAT = Total * 0.20",vtMissing);
spCalcEdit1->InsertLockedText(L"Total",vtMissing);

58
Can I add lines to the control, so the user can not remove/delete them ( locked lines )

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutCalcType(EXCALCEDITLib::exCalcIncludeAll);
spCalcEdit1->PutAllowVariables(L"=");
spCalcEdit1->PutDrawGridLines(VARIANT_TRUE);
spCalcEdit1->PutLineHeight(L"value + 8 * dpi");
spCalcEdit1->PutGridLineColor(RGB(196,196,196));
spCalcEdit1->PutFormatResult(L"<r><fgcolor=808080>[=%l%]");
spCalcEdit1->PutFormatLocal(L"currency(value)");
spCalcEdit1->PutFormatTotalResult(L"<r><b> = %l%</b>");
spCalcEdit1->PutText(L"1000");
spCalcEdit1->InsertText(L"2000",vtMissing);
spCalcEdit1->InsertLockedText(L"Commission = Total * 0.05 + (Total ? 2.95 : 0)",vtMissing);
spCalcEdit1->InsertLockedText(L"Total",vtMissing);

57
Is it possible to highlight a specified line

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutAllowVariables(L"=");
spCalcEdit1->PutDrawGridLines(VARIANT_TRUE);
spCalcEdit1->PutLineHeight(L"value + 8 * dpi");
spCalcEdit1->PutGridLineColor(RGB(196,196,196));
spCalcEdit1->PutFormatResult(L"<r><fgcolor=808080>[=%l%]");
spCalcEdit1->PutFormatLocal(L"currency(value)");
spCalcEdit1->PutFormatTotalResult(L"<r><b> = %l%</b>");
spCalcEdit1->AddWildFormat(L"<fgcolor=00FF00>*<b>Commission</b>*=*");
spCalcEdit1->PutText(L"100.50 + 123");
spCalcEdit1->InsertText(L"200 + 20/5",vtMissing);
spCalcEdit1->InsertText(L"300 + 3 * 15",vtMissing);
spCalcEdit1->InsertText(L"400 + 200 * (10 + 12/45)",vtMissing);
spCalcEdit1->InsertText(L"50 * 45",vtMissing);
spCalcEdit1->InsertText(L"VAT = Total * 0.19",vtMissing);
spCalcEdit1->InsertText(L"NET = Total - VAT",vtMissing);
spCalcEdit1->InsertText(L"Monthly = Total / 12",vtMissing);
spCalcEdit1->InsertText(L"Commission = Total * 0.05 + 2.95",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);

56
Is it possible to display the result as currency

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutAllowVariables(L"=");
spCalcEdit1->PutDrawGridLines(VARIANT_TRUE);
spCalcEdit1->PutLineHeight(L"value + 8 * dpi");
spCalcEdit1->PutGridLineColor(RGB(196,196,196));
spCalcEdit1->PutFormatLocal(L"currency(value)");
spCalcEdit1->PutFormatTotalResult(L"<r><b> = %l%</b>");
spCalcEdit1->PutBackColorTotal(RGB(240,240,240));
spCalcEdit1->PutText(L"100.50");
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);
spCalcEdit1->InsertText(L"400",vtMissing);
spCalcEdit1->InsertText(L"VAT = Total * 0.19",vtMissing);
spCalcEdit1->InsertText(L"NET = Total - VAT",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);

55
Is it possible to display the result with no decimals

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutAllowVariables(L"=");
spCalcEdit1->PutDrawGridLines(VARIANT_TRUE);
spCalcEdit1->PutLineHeight(L"value + 8 * dpi");
spCalcEdit1->PutGridLineColor(RGB(196,196,196));
spCalcEdit1->PutFormatLocal(L"value format `0`");
spCalcEdit1->PutFormatTotalResult(L"<r><b> = %l%</b>");
spCalcEdit1->PutBackColorTotal(RGB(240,240,240));
spCalcEdit1->PutText(L"100.50");
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);
spCalcEdit1->InsertText(L"400",vtMissing);
spCalcEdit1->InsertText(L"VAT = Total * 0.19",vtMissing);
spCalcEdit1->InsertText(L"NET = Total - VAT",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);

54
Is it possible to display the result exactly how it is defined in the control panel

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutAllowVariables(L"=");
spCalcEdit1->PutDrawGridLines(VARIANT_TRUE);
spCalcEdit1->PutLineHeight(L"value + 8 * dpi");
spCalcEdit1->PutGridLineColor(RGB(196,196,196));
spCalcEdit1->PutFormatLocal(L"value format ``");
spCalcEdit1->PutFormatTotalResult(L"<r><b> = %l%</b>");
spCalcEdit1->PutBackColorTotal(RGB(240,240,240));
spCalcEdit1->PutText(L"100.50");
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);
spCalcEdit1->InsertText(L"400",vtMissing);
spCalcEdit1->InsertText(L"VAT = Total * 0.19",vtMissing);
spCalcEdit1->InsertText(L"NET = Total - VAT",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);

53
How can I count the lines

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutAllowCount(L"count");
spCalcEdit1->PutAllowSubCount(L"subcount");
spCalcEdit1->PutDrawGridLines(VARIANT_TRUE);
spCalcEdit1->PutLineHeight(L"value + 8 * dpi");
spCalcEdit1->PutGridLineColor(RGB(196,196,196));
spCalcEdit1->InsertText(L"100",vtMissing);
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"SubCount",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);
spCalcEdit1->InsertText(L"400",vtMissing);
spCalcEdit1->InsertText(L"500",vtMissing);
spCalcEdit1->InsertText(L"SubCount",vtMissing);
spCalcEdit1->InsertText(L"Count",vtMissing);

52
How can I compute the average
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutAllowVariables(L"=");
spCalcEdit1->PutDrawGridLines(VARIANT_TRUE);
spCalcEdit1->PutLineHeight(L"value + 8 * dpi");
spCalcEdit1->PutGridLineColor(RGB(196,196,196));
spCalcEdit1->PutFormatTotalResult(L"<r><b> = %l%</b>");
spCalcEdit1->PutBackColorTotal(RGB(240,240,240));
spCalcEdit1->PutText(L"Average = Total / Count");
spCalcEdit1->InsertText(L"100",vtMissing);
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);
spCalcEdit1->InsertText(L"400",vtMissing);
spCalcEdit1->InsertText(L"VAT = Total * 0.19",vtMissing);
spCalcEdit1->InsertText(L"NET = Total - VAT",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);

51
Variables or Computed Fields

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutAllowVariables(L"=");
spCalcEdit1->PutDrawGridLines(VARIANT_TRUE);
spCalcEdit1->PutLineHeight(L"value + 8 * dpi");
spCalcEdit1->PutGridLineColor(RGB(196,196,196));
spCalcEdit1->PutFormatTotalResult(L"<r><b> = %l%</b>");
spCalcEdit1->PutBackColorTotal(RGB(240,240,240));
spCalcEdit1->PutText(L"100");
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);
spCalcEdit1->InsertText(L"400",vtMissing);
spCalcEdit1->InsertText(L"VAT = Total * 0.19",vtMissing);
spCalcEdit1->InsertText(L"NET = Total - VAT",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);

50
I have noticed that definition of the variable is shown in italics. Can I change that

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutAllowVariables(L"=");
spCalcEdit1->ClearWildFormats();
spCalcEdit1->AddWildFormat(L"<b>*=*");
spCalcEdit1->PutText(L"A = 400");
spCalcEdit1->InsertText(L"",vtMissing);
spCalcEdit1->InsertText(L"B = A + 0.22",vtMissing);
spCalcEdit1->InsertText(L"A + B",vtMissing);
spCalcEdit1->InsertText(L"B = B * .19",vtMissing);
spCalcEdit1->InsertText(L"A + B",vtMissing);

49
I have noticed that definition of the variable is shown in italics. Can I remove that

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutAllowVariables(L"=");
spCalcEdit1->ClearWildFormats();
spCalcEdit1->PutText(L"A = 300");
spCalcEdit1->InsertText(L"",vtMissing);
spCalcEdit1->InsertText(L"B = A + 0.22",vtMissing);
spCalcEdit1->InsertText(L"A + B",vtMissing);
spCalcEdit1->InsertText(L"B = B * .19",vtMissing);
spCalcEdit1->InsertText(L"A + B",vtMissing);

48
Can I define variables (sample 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutAllowVariables(L"is");
spCalcEdit1->ClearWildFormats();
spCalcEdit1->AddWildFormat(L"<b>*is*");
spCalcEdit1->PutText(L"A is 200");
spCalcEdit1->InsertText(L"",vtMissing);
spCalcEdit1->InsertText(L"B is A + 0.22",vtMissing);
spCalcEdit1->InsertText(L"A + B",vtMissing);
spCalcEdit1->InsertText(L"B is B * .19",vtMissing);
spCalcEdit1->InsertText(L"A + B",vtMissing);

47
Can I define variables (sample 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutAllowVariables(L"=");
spCalcEdit1->PutText(L"A = 100.22");
spCalcEdit1->InsertText(L"",vtMissing);
spCalcEdit1->InsertText(L"B = A + 0.22",vtMissing);
spCalcEdit1->InsertText(L"A + B",vtMissing);
spCalcEdit1->InsertText(L"B = B * .19",vtMissing);
spCalcEdit1->InsertText(L"A + B",vtMissing);

46
Comments and Prefixes

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutAllowPrefixes(L"<fgcolor=808080>:</fgcolor>");
spCalcEdit1->PutAllowComments(L"<fgcolor=008080>'</fgcolor>");
spCalcEdit1->PutText(L"Field A: 100 ' this is the field A");
spCalcEdit1->InsertText(L"Field B: 200 ' this is the field B",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);

45
Can I display something at the start of each line

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutAllowPrefixes(L"<b>:</b>");
spCalcEdit1->PutText(L"Field A: 100");
spCalcEdit1->InsertText(L"Field B: 200",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);

44
I can not use TAB key. Is it possible
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutUseTabKey(VARIANT_TRUE);

43
Does your control support comments

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutCalcType(EXCALCEDITLib::exCalcIncludeAll);
spCalcEdit1->PutAllowComments(L"<fgcolor=008080>//</fgcolor>");
spCalcEdit1->PutText(L"104 mod 51 // modulo function");
spCalcEdit1->InsertText(L"int(104/51)  // int function",vtMissing);
spCalcEdit1->InsertText(L"51 * int(104/51) + (104 mod 51)  // check",vtMissing);

42
Can I use the modulo function ( rest )

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutCalcType(EXCALCEDITLib::exCalcIncludeAll);
spCalcEdit1->PutText(L"104 mod 51");
spCalcEdit1->InsertText(L"int(104/51)",vtMissing);
spCalcEdit1->InsertText(L"51 * int(104/51) + (104 mod 51)",vtMissing);

41
Can I use acos function

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutCalcType(EXCALCEDITLib::exCalcIncludeAll);
spCalcEdit1->PutText(L"acos(cos(1))");

40
Can I use asin function

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutCalcType(EXCALCEDITLib::exCalcIncludeAll);
spCalcEdit1->PutText(L"asin(sin(1))");

39
Can I use cos function

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutCalcType(EXCALCEDITLib::exCalcIncludeAll);
spCalcEdit1->PutText(L"cos(1)");

38
Can I use sin function

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutCalcType(EXCALCEDITLib::exCalcIncludeAll);
spCalcEdit1->PutText(L"sin(1)");

37
Can I use abs function (absolute part of the number)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutCalcType(EXCALCEDITLib::exCalcIncludeAll);
spCalcEdit1->PutText(L"abs(-100.99)");

36
Can I use round function

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutCalcType(EXCALCEDITLib::exCalcIncludeAll);
spCalcEdit1->PutText(L"round(100.99)");

35
Can I use int function (integer part of a number)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutCalcType(EXCALCEDITLib::exCalcIncludeAll);
spCalcEdit1->PutText(L"int(100.99)");

34
Can I use sqrt function (square root of a number)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutCalcType(EXCALCEDITLib::exCalcIncludeAll);
spCalcEdit1->PutText(L"sqrt(100)");

33
How can I show invalid lines with a larger font

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutLineHeight(L"value + 8 *dpi");
spCalcEdit1->PutDrawGridLines(VARIANT_TRUE);
spCalcEdit1->PutFormatInvalid(L"<u><font ;12> </font></u>");
spCalcEdit1->InsertText(L"100",vtMissing);
spCalcEdit1->InsertText(L"k200",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);

32
I've noticed that while I type the text is shown in red. How can I change that

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutFormatInvalid(L"");
spCalcEdit1->PutText(L"100 * 200");

31
Can I enlarge the height of each line

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutLineHeight(L"value + 8 * dpi");
spCalcEdit1->PutDrawGridLines(VARIANT_TRUE);
spCalcEdit1->InsertText(L"100",vtMissing);
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);

30
How can I show grid lines

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutDrawGridLines(VARIANT_TRUE);
spCalcEdit1->PutGridLineColor(RGB(0,0,0));
spCalcEdit1->InsertText(L"100",vtMissing);
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);

29
How can I display the result of the total with a larger font

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutDrawGridLines(VARIANT_TRUE);
spCalcEdit1->PutLineHeight(L"value  + 8 * dpi");
spCalcEdit1->PutFormatTotalResult(L"<r><b><font ;14>%l%</font></b>");
spCalcEdit1->PutAllowTotal(L"<b><font ;14>Total</font></b>");
spCalcEdit1->InsertText(L"100",vtMissing);
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);

28
Is it possible to show the Total / SubTotal with a different background color

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutAllowTotal(L"<bgcolor=A0A0A0><b>Total</b></bgcolor>");
spCalcEdit1->PutAllowSubTotal(L"<bgcolor=E0E0E0><b>SubTotal</b></bgcolor>");
spCalcEdit1->InsertText(L"100",vtMissing);
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"SubTotal",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);
spCalcEdit1->InsertText(L"400 * 1.5",vtMissing);
spCalcEdit1->InsertText(L"SubTotal",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);

27
Is it possible to show the Total / SubTotal with a different background color

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutBackColorTotal(RGB(196,196,196));
spCalcEdit1->PutBackColorSubTotal(RGB(240,240,240));
spCalcEdit1->InsertText(L"100",vtMissing);
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"SubTotal",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);
spCalcEdit1->InsertText(L"400 * 1.5",vtMissing);
spCalcEdit1->InsertText(L"SubTotal",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);

26
How can I change the color to show the numbers

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutFormatNumbers(L"<fgcolor=FF0000> </fgcolor>");
spCalcEdit1->PutText(L"1 + 2 + 3 + 4");

25
The numbers are shown in blue. How can I remove that

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutFormatNumbers(L"");
spCalcEdit1->PutText(L"1 + 2 + 3 + 4");

24
How can I export the entire text, including the result

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutText(L"100 * 1.5");
spCalcEdit1->InsertText(L"120 * 1.5",vtMissing);
spCalcEdit1->InsertText(L"130 * 1.5",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);
OutputDebugStringW( spCalcEdit1->GetExport() );

23
Is it possible to display the result, using the current regional locale

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutDrawGridLines(VARIANT_TRUE);
spCalcEdit1->PutFormatResult(L" <fgcolor=808080>[=%l%]</fgcolor>");
spCalcEdit1->PutFormatTotalResult(L" <b>[=%l%]</b>");
spCalcEdit1->InsertText(L"100 * 100",vtMissing);
spCalcEdit1->InsertText(L"200 * 200",vtMissing);
spCalcEdit1->InsertText(L"300 * 300",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);

22
How can I change the format to display the total result (right)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutDrawGridLines(VARIANT_TRUE);
spCalcEdit1->PutFormatTotalResult(L"<b><fgcolor=FF0000> = %l%</fgcolor></b>");
spCalcEdit1->PutAllowTotal(L"<b><fgcolor=00FF00>Total</fgcolor></b>");
spCalcEdit1->InsertText(L"100",vtMissing);
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);

21
How can I change the format to display the total result (right)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutDrawGridLines(VARIANT_TRUE);
spCalcEdit1->PutLineHeight(L"value  + 4 * dpi");
spCalcEdit1->PutFormatTotalResult(L"<r><b><font ;12>%l%</font></b>");
spCalcEdit1->PutAllowTotal(L"<b><font ;12>Total</font></b>");
spCalcEdit1->InsertText(L"100",vtMissing);
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);

20
Is it possible to rename the SubTotal

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutAllowSubTotal(L"<fgcolor=FF0000>Current Amount");
spCalcEdit1->InsertText(L"100",vtMissing);
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"Current Amount",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);
spCalcEdit1->InsertText(L"400",vtMissing);
spCalcEdit1->InsertText(L"Current Amount",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);

19
How can I disable the sub-totals

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutAllowSubTotal(L"");
spCalcEdit1->InsertText(L"100",vtMissing);
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"SubTotal",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);
spCalcEdit1->InsertText(L"400",vtMissing);
spCalcEdit1->InsertText(L"SubTotal",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);

18
How can I add sub-totals

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutAllowComments(L"<fgcolor=008000>'");
spCalcEdit1->AddWildFormat(L"<i>*=*<fgcolor=008000>'*");
spCalcEdit1->PutAllowVariables(L"=");
spCalcEdit1->PutDrawGridLines(VARIANT_TRUE);
spCalcEdit1->PutLineHeight(L"value + 8 * dpi");
spCalcEdit1->PutGridLineColor(RGB(196,196,196));
spCalcEdit1->PutFormatLocal(L"currency(value)");
spCalcEdit1->PutFormatTotalResult(L"<r><b> = %l%</b>");
spCalcEdit1->PutFormatSubTotalResult(L"<r><fgcolor=808080>[<b> = %l%</b>]");
spCalcEdit1->PutFormatResult(L"<r><fgcolor=808080>(%l%)");
spCalcEdit1->PutBackColorTotal(RGB(240,240,240));
spCalcEdit1->PutBackColorLockedLine(RGB(0,0,0));
spCalcEdit1->PutForeColorLockedLine(RGB(0,0,0));
spCalcEdit1->PutCalcType(EXCALCEDITLib::exCalcIncludeAll);
spCalcEdit1->PutText(L"100 + 200");
spCalcEdit1->InsertText(L"200 * 1.5",vtMissing);
spCalcEdit1->InsertText(L"SubA = SubTotal ' first subtotal",vtMissing);
spCalcEdit1->InsertText(L"300 + (200+300)/2",vtMissing);
spCalcEdit1->InsertText(L"400 + 500",vtMissing);
spCalcEdit1->InsertText(L"SubB = SubTotal ' second subtotal",vtMissing);
spCalcEdit1->InsertLockedText(L"VAT = Total * 0.19",vtMissing);
spCalcEdit1->InsertLockedText(L"Commision = Total * 0.05",vtMissing);
spCalcEdit1->InsertLockedText(L"NET = (Total - VAT) - Commision",vtMissing);
spCalcEdit1->InsertLockedText(L"Total",vtMissing);

17
Is it possible to disable the Total

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutAllowTotal(L"");
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->InsertText(L"100",vtMissing);
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);

16
Is it possible to rename the Total to Sum

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutAllowTotal(L"<fgcolor=FF0000><b>Sum</b></fgcolor>");
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->InsertText(L"100",vtMissing);
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);
spCalcEdit1->InsertText(L"Sum",vtMissing);

15
Is it possible to add all lines

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->InsertText(L"100",vtMissing);
spCalcEdit1->InsertText(L"200",vtMissing);
spCalcEdit1->InsertText(L"300",vtMissing);
spCalcEdit1->InsertText(L"Total",vtMissing);

14
How do I insert / add a new line

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutText(L"100 * 1.5");
spCalcEdit1->InsertText(L"120 * 2.5\\r\\n",long(1));
spCalcEdit1->InsertText(L"200 * 1.5",vtMissing);

13
How do I find out if a specified line is valid

// SelChange event - Occurs when the user selects text in the control.
void OnSelChangeCalcEdit1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'
		#import <ExCalcEdit.dll>
		using namespace EXCALCEDITLib;
	*/
	EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
	OutputDebugStringW( L"CurrentLine: " );
	OutputDebugStringW( _bstr_t(spCalcEdit1->GetCaretLine()) );
	OutputDebugStringW( L"CurrentLine: " );
	OutputDebugStringW( spCalcEdit1->GetTextLine(spCalcEdit1->GetCaretLine()) );
	OutputDebugStringW( L"IsValid: " );
	OutputDebugStringW( _bstr_t(spCalcEdit1->GetIsValid(spCalcEdit1->GetCaretLine())) );
}

EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutText(L"100 * 1.5");
spCalcEdit1->InsertText(L"invalid",vtMissing);
spCalcEdit1->InsertText(L"120 * 1.5",vtMissing);
spCalcEdit1->InsertText(L"130 * 1.5",vtMissing);

12
How do I get the current line

// SelChange event - Occurs when the user selects text in the control.
void OnSelChangeCalcEdit1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'
		#import <ExCalcEdit.dll>
		using namespace EXCALCEDITLib;
	*/
	EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
	OutputDebugStringW( L"CurrentLine: " );
	OutputDebugStringW( _bstr_t(spCalcEdit1->GetCaretLine()) );
	OutputDebugStringW( L"CurrentLine: " );
	OutputDebugStringW( spCalcEdit1->GetTextLine(spCalcEdit1->GetCaretLine()) );
	OutputDebugStringW( L"CurrentResult: " );
	OutputDebugStringW( _bstr_t(spCalcEdit1->GetResult(spCalcEdit1->GetCaretLine())) );
}

EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutText(L"100 * 1.5");
spCalcEdit1->InsertText(L"120 * 1.5",vtMissing);
spCalcEdit1->InsertText(L"130 * 1.5",vtMissing);

11
How do I get the line one by one, including the result

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutText(L"100 * 1.5");
spCalcEdit1->InsertText(L"120 * 1.5",vtMissing);
spCalcEdit1->InsertText(L"130 * 1.5",vtMissing);
OutputDebugStringW( L"Lines:" );
OutputDebugStringW( _bstr_t(spCalcEdit1->GetCount()) );
OutputDebugStringW( L"TextLine(1):" );
OutputDebugStringW( spCalcEdit1->GetTextLine(1) );
OutputDebugStringW( L"Result(1)" );
OutputDebugStringW( _bstr_t(spCalcEdit1->GetResult(long(1))) );
OutputDebugStringW( L"TextLine(2):" );
OutputDebugStringW( spCalcEdit1->GetTextLine(2) );
OutputDebugStringW( L"Result(2)" );
OutputDebugStringW( _bstr_t(spCalcEdit1->GetResult(long(2))) );
OutputDebugStringW( L"TextLine(3):" );
OutputDebugStringW( spCalcEdit1->GetTextLine(3) );
OutputDebugStringW( L"Result(3)" );
OutputDebugStringW( _bstr_t(spCalcEdit1->GetResult(long(3))) );

10
Does the control supports multiple lines

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutMultiLine(VARIANT_TRUE);
spCalcEdit1->PutText(L"100 * 1.5");
spCalcEdit1->InsertText(L"120 * 1.5",vtMissing);
spCalcEdit1->InsertText(L"130 * 1.5",vtMissing);

9
Is it possible to display the result without brakets

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutFormatResult(L"<fgcolor=808080> = %%</fgcolor>");
spCalcEdit1->PutText(L"12 + (12 / 100)/2");

8
How can I display the result on the right side of the control

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutFormatResult(L"<r> <fgcolor=808080>[=%%]</fgcolor>");
spCalcEdit1->PutText(L"12 + (12 / 100)/2");

7
Can you please advise how to change fontname and size (sample 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutTemplate(L"Font.Size = 20; Font.Name = `Tahoma`; Refresh");
spCalcEdit1->PutText(L"1/2");

6
Can you please advise how to change fontname and size (sample 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->GetFont()->PutSize(_variant_t(long(20)));
spCalcEdit1->PutText(L"1/2");
spCalcEdit1->Refresh();

5
How can I disable evaluating the selection

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutEvaluateSel(VARIANT_FALSE);
spCalcEdit1->PutHideSelection(VARIANT_FALSE);
spCalcEdit1->PutText(L"(1+6.25)/4*6/3");
spCalcEdit1->PutSelStart(1);
spCalcEdit1->PutSelLength(6);
spCalcEdit1->PutSelBackColor(RGB(0,0,0));

4
Can I define a different decimal separator

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutAddDecimalSep(L",");
spCalcEdit1->PutText(L"(1+6,25)/4*6/3");

3
How do I change the color of the entire control, if the expression is not valid

// Change event - Indicates that the control's text has changed.
void OnChangeCalcEdit1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'
		#import <ExCalcEdit.dll>
		using namespace EXCALCEDITLib;
	*/
	EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
	OutputDebugStringW( L"Valid:" );
	OutputDebugStringW( _bstr_t(spCalcEdit1->GetIsValid(vtMissing)) );
	spCalcEdit1->PutForeColor(RGB(255,0,0));
	spCalcEdit1->PutFormatNumbers(L"<fgcolor FF0000>");
	spCalcEdit1->PutFormatResult(L"");
}

EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutFormatInvalid(L"");
spCalcEdit1->PutText(L"invalid(1+6.25)/4*6/3");

2
Is there any function to know if the expression is valid

// Change event - Indicates that the control's text has changed.
void OnChangeCalcEdit1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'
		#import <ExCalcEdit.dll>
		using namespace EXCALCEDITLib;
	*/
	EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
	OutputDebugStringW( L"Valid:" );
	OutputDebugStringW( _bstr_t(spCalcEdit1->GetIsValid(vtMissing)) );
	OutputDebugStringW( L"Expression: " );
	OutputDebugStringW( spCalcEdit1->GetText() );
	OutputDebugStringW( L"Result: " );
	OutputDebugStringW( _bstr_t(spCalcEdit1->GetResult(vtMissing)) );
}

EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutText(L"(1+6.25)/4*6/3");

1
How do I programatically save / load the expression and the result

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXCALCEDITLib' for the library: 'ExCalcEdit 1.0 Control Library'

	#import <ExCalcEdit.dll>
	using namespace EXCALCEDITLib;
*/
EXCALCEDITLib::ICalcEditPtr spCalcEdit1 = GetDlgItem(IDC_CALCEDIT1)->GetControlUnknown();
spCalcEdit1->PutText(L"(1+6.25)/4*6/3");
OutputDebugStringW( L"Expression: " );
OutputDebugStringW( spCalcEdit1->GetText() );
OutputDebugStringW( L"Result: " );
OutputDebugStringW( _bstr_t(spCalcEdit1->GetResult(vtMissing)) );