⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 demobasicmain.cpp

📁 delphi的的三方控件
💻 CPP
字号:
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "DemoBasicMain.h"
#include "DemoRating.h"
#include "DemoBasicAbout.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxLookAndFeels"
#pragma resource "*.dfm"
TDemoBasicMainForm *DemoBasicMainForm;
//---------------------------------------------------------------------------
__fastcall TDemoBasicMainForm::TDemoBasicMainForm(TComponent* Owner)
  : TForm(Owner)
{
  Application->HelpFile = "..\\..\\Help\\cxVertGrid.hlp";  
}
//---------------------------------------------------------------------------

void __fastcall TDemoBasicMainForm::actProductsExecute(TObject *Sender)
{
  OpenWebPage("http://www.devexpress.com/products/index.asp");
}
//---------------------------------------------------------------------------

void __fastcall TDemoBasicMainForm::actDownloadsExecute(TObject *Sender)
{
  OpenWebPage("http://www.devexpress.com/downloads/index.asp");
}
//---------------------------------------------------------------------------

void __fastcall TDemoBasicMainForm::actForumExecute(TObject *Sender)
{
  OpenWebPage("http://24.234.251.34/dxforum/dxforumisapi.dll/");
}
//---------------------------------------------------------------------------

void __fastcall TDemoBasicMainForm::actDXOnTheWebExecute(TObject *Sender)
{
  OpenWebPage("http://www.devexpress.com/index.shtm");
}
//---------------------------------------------------------------------------

void __fastcall TDemoBasicMainForm::actExitExecute(TObject *Sender)
{
  Close();
}
//---------------------------------------------------------------------------

void __fastcall TDemoBasicMainForm::actShowDemoDescriptionExecute(TObject *Sender)
{
  lbDescrip->Visible = !lbDescrip->Visible;
  ((TCustomAction*)Sender)->Checked = !((TCustomAction*)Sender)->Checked;
}
//---------------------------------------------------------------------------

void __fastcall TDemoBasicMainForm::actHelpExecute(TObject *Sender)
{
  Application->HelpCommand(HELP_FINDER, 0);
}
//---------------------------------------------------------------------------

void __fastcall TDemoBasicMainForm::actRateDemoExecute(TObject *Sender)
{
  TDemoRatingForm *AForm = new TDemoRatingForm(this);
  try{
    AForm->ShowModal();
  }
  __finally{
    delete AForm;
  }
}
//---------------------------------------------------------------------------

void __fastcall TDemoBasicMainForm::actAboutExecute(TObject *Sender)
{
  ShowAbout(true, false);
}
//---------------------------------------------------------------------------

void __fastcall TDemoBasicMainForm::actMyDevExpressExecute(TObject *Sender)
{
  OpenWebPage("http://www->mydevexpress->com");
}
//---------------------------------------------------------------------------

void __fastcall TDemoBasicMainForm::LookAndFeelChange(TObject *Sender)
{
  if (((TMenuItem*)Sender)->Tag > 3){
    cxLookAndFeelController->NativeStyle =
      !cxLookAndFeelController->NativeStyle;
    ((TMenuItem*)Sender)->Checked = cxLookAndFeelController->NativeStyle;
  }
  else{
    ((TMenuItem*)Sender)->Checked = true;
    cxLookAndFeelController->Kind = (TcxLookAndFeelKind)((TMenuItem*)Sender)->Tag;
    cxLookAndFeelController->NativeStyle = false;
    miNativeStyle->Checked = false;
  }
}
//---------------------------------------------------------------------------

void __fastcall TDemoBasicMainForm::AdjustAboutText(TStrings *AAboutText)
{
  AAboutText->Assign(memAboutText->Lines);
}
//---------------------------------------------------------------------------

void __fastcall TDemoBasicMainForm::ShowAbout(bool AModal, bool AOnTop)
{
  if (DemoBasicAboutForm == NULL)
    DemoBasicAboutForm = new TDemoBasicAboutForm(this);
  AdjustAboutText(DemoBasicAboutForm->reDemoInfo->Lines);
  DemoBasicAboutForm->lbDemoName->Caption =
    ChangeFileExt(ExtractFileName(Application->ExeName),"");
  if (AOnTop)
    DemoBasicAboutForm->FormStyle = fsStayOnTop;
  else
    DemoBasicAboutForm->FormStyle = fsNormal;
  if (AModal)
    DemoBasicAboutForm->ShowModal();
  else
    DemoBasicAboutForm->Show();
}
//---------------------------------------------------------------------------


⌨️ 快捷键说明

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