customfunctionfrm.cpp

来自「DevExpress公司出品的Borland Delphi和C++ Builde」· C++ 代码 · 共 35 行

CPP
35
字号
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop

#include "CustomFunctionFrm.h"
#include "AreaCustomFunc.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxControls"
#pragma link "cxSSheet"
#pragma resource "*.dfm"
TCustomFunctionForm *CustomFunctionForm;
//---------------------------------------------------------------------------
__fastcall TCustomFunctionForm::TCustomFunctionForm(TComponent* Owner)
  : TForm(Owner)
{
  TcxSSCellObject *CellObject;
  try {

    cxSpreadSheet->LoadFromFile(ExtractFilePath(Application->ExeName) + "\CustomFunctionEx.xls");
    CellObject = cxSpreadSheet->Sheet->GetCellObject(1,4);
    try {
      CellObject->Text = "=Area(B3:B4)";
    }
    __finally {
      delete CellObject;
    }
  }
  catch (Exception &err) {
    Application->ShowException(&err);
    ActiveMDIChild->Close();
  }
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?