BlankerNew.rar

  • DemoTester
    了解作者
  • Windows_Unix
    开发工具
  • 54KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 2
    下载次数
  • 2010-02-09 17:36
    上传日期
Draw and fill up template documents
BlankerNew.rar
  • UMain.dfm
    27.5KB
  • UBlock.dfm
    4KB
  • Blanker.cfg
    291B
  • UEditMsk.dfm
    2.3KB
  • UMasks.dfm
    1.6KB
  • UFormat1.dfm
    418B
  • SmallIco.ico
    318B
  • UFormat1.cpp
    532B
  • UFormat.cpp
    11.2KB
  • UAbout.cpp
    791B
  • UAlign.h
    1.8KB
  • UMain.h
    6.3KB
  • USize.dfm
    3KB
  • UTxtEdit.dfm
    1004B
  • UInspect.cpp
    13.6KB
  • Blanker.cpp
    1.5KB
  • UEditMsk.cpp
    5.1KB
  • Blanker.bpr
    4KB
  • UTxtEdit.h
    1.1KB
  • UBlock.cpp
    5.7KB
  • USize.h
    1.5KB
  • USysInfo.h
    1.3KB
  • UPreff.cpp
    3.8KB
  • UDlgFunc.h
    2.1KB
  • USize.cpp
    2.7KB
  • UBlank.dfm
    6.4KB
  • UAbout.dfm
    7KB
  • UPos.dfm
    2.5KB
  • UInspect.h
    2.6KB
  • UMasks.cpp
    8.3KB
  • UMain.cpp
    44.1KB
  • UPreff.h
    1.7KB
  • UAlign.cpp
    3.5KB
  • UPos.cpp
    1.7KB
  • UTxtEdit.cpp
    1.5KB
  • UBlank.cpp
    3.9KB
  • UAlign.dfm
    2.7KB
  • UEditMsk.h
    1.5KB
  • UAbout.h
    1.1KB
  • Blanker.res
    888B
  • UFormat.dfm
    7.7KB
  • UPreff.dfm
    4.3KB
  • UPos.h
    1.3KB
  • UFormat1.h
    761B
  • USysInfo.dfm
    1.9KB
  • USysInfo.cpp
    4.9KB
  • UInspect.dfm
    4.9KB
  • UBlank.h
    2.3KB
  • UDlgFunc.cpp
    12KB
  • UMasks.h
    1.6KB
  • UFormat.h
    4.2KB
  • UBlock.h
    2KB
内容介绍
//--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include "UMain.h" #include "UBlank.h" #include "UMasks.h" #include "UBlock.h" #include "UFormat.h" #include "UEditMsk.h" #include "UPreff.h" #include "UAlign.h" #include "USize.h" #include "UPos.h" #include "UInspect.h" #include "UDlgFunc.h" #include "UAbout.h" #include "DiskMan.h" #include "SmlBlank.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TFMain *FMain; SmallBlank *Blank = NULL; HDC hFormatDC = NULL; #define MOUSE_MOVES_BLOCK #define MOUSE_DRAWING #define MOUSE_STATUS_DO_NOTHING 0 #define MOUSE_STATUS_MOVE_BLOCK 1 #define MOUSE_STATUS_DRAW_RECT 2 //--------------------------------------------------------------------------- #pragma pack(push, 1) struct BLANKER_CONFIGURATION { DESIGN_MODE_SETTINGS DesignModeSettings; BYTE ShowInspector; int InspectorLeft; int InspectorTop; BYTE InspectorCollapsed; char FileName[MAX_PATH]; }; #pragma pack(pop) BLANKER_CONFIGURATION BlankerConfiguration; char ConfigFileName[] = "Blanker.cfg"; //--------------------------------------------------------------------------- void DefaultConfiguration(BLANKER_CONFIGURATION *Configuration) { ZeroMemory(Configuration, sizeof(BLANKER_CONFIGURATION)); Configuration->DesignModeSettings = DesignModeSettings; Configuration->ShowInspector = 1; } //--------------------------------------------------------------------------- void ReadConfiguration() { DefaultConfiguration(&BlankerConfiguration); char FileName[MAX_PATH]; GetExeDirectory(FileName); wsprintf(FileName + strlen(FileName), "\\%s", ConfigFileName); BLANKER_CONFIGURATION Configuration; if ( ReadDiskFile(FileName, &Configuration, sizeof(BLANKER_CONFIGURATION)) != sizeof(BLANKER_CONFIGURATION) ) return; BlankerConfiguration = Configuration; //ShowMessage(BlankerConfiguration.DesignModeSettings.Mode); } //--------------------------------------------------------------------------- void SaveConfiguration() { char FileName[MAX_PATH]; GetExeDirectory(FileName); wsprintf(FileName + strlen(FileName), "\\%s", ConfigFileName); MakeDiskFileSafe(FileName, &BlankerConfiguration, sizeof(BLANKER_CONFIGURATION)); } //--------------------------------------------------------------------------- __fastcall TFMain::TFMain(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- // �癩� false 甦� 頡隧稔摘粱�� 篦 � 褕蒙頑� 褕 複綑皖��錶 bool __fastcall TFMain::CmSaveBlankAs() { if ( !Blank ) return true; char FileName[MAX_PATH]; Blank->GetFileName(FileName); SaveDialog->FileName = FileName; if ( !SaveDialog->Execute() ) return false; Blank->SaveAs(SaveDialog->FileName.c_str()); return true; } //--------------------------------------------------------------------------- bool __fastcall TFMain::CmSaveBlank() { if ( !Blank ) return true; char FileName[MAX_PATH]; Blank->GetFileName(FileName); if ( !FileName[0] ) return CmSaveBlankAs(); Blank->Save(); return true; } //--------------------------------------------------------------------------- // �癩� false 甦� 頡隧稔摘粱�� 篦 � 褕蒙頑� 褕 複綑皖��錶 bool __fastcall TFMain::SaveChanges() { if ( !Blank || !Blank->IsChanged() ) return true; int Result = MessageBox(Handle, "� 鋼蝕麴錶 萄痢蒙 築 熱頜琵粵� 頜衛粵�.\r\n佞蒙鋼 鞅 滓 媲 頑震羅鋼 ?", Caption.c_str(), MB_YESNOCANCEL | MB_ICONQUESTION); if ( Result == IDCANCEL ) return false; if ( Result == IDNO ) return true; // Result = IDYES return CmSaveBlank(); } //--------------------------------------------------------------------------- void __fastcall TFMain::EnableMenuItems() { bool Flag = true; if ( DesignModeSettings.Mode != MODE_DESIGN ) Flag = false; CmBlank->Enabled = Flag; CmMasks->Enabled = Flag; CmNewBlock->Enabled = Flag; CmEditBlock->Enabled = Flag; CmDeleteBlock->Enabled = Flag; CmCopyBlock->Enabled = Flag; CmAlign->Enabled = Flag; CmBlocksSize->Enabled = Flag; CmPosition->Enabled = Flag; CmInspector->Enabled = Flag; } //--------------------------------------------------------------------------- void __fastcall TFMain::SetPaintBoxDimensions() { if ( !Blank ) return; BLOCK_DIMENSIONS Dimensions; Blank->GetBlankDimensions(hFormatDC, &Dimensions); HorzScrollBar->Range = Dimensions.Left + Dimensions.Width + 4; VertScrollBar->Range = Dimensions.Top + Dimensions.Height + 4; /* PaintBox->Left = Dimensions.Left; PaintBox->Width = Dimensions.Width; PaintBox->Top = Dimensions.Top; PaintBox->Height = Dimensions.Height; */ } //--------------------------------------------------------------------------- void __fastcall TFMain::FormCreate(TObject *Sender) { hFormatDC = GetDC(Handle); MouseStatus = MOUSE_STATUS_DO_NOTHING; MouseDoubleClicked = false; Blank = new SmallBlank(); if ( !Blank ) return; ReadConfiguration(); DesignModeSettings = BlankerConfiguration.DesignModeSettings; EnableMenuItems(); if ( DesignModeSettings.Mode == MODE_SHOW ) CmModeShow->Checked = true; else CmModeDesign->Checked = true; if ( BlankerConfiguration.ShowInspector ) CmInspector->Checked = true; else CmInspector->Checked = false; // 阻擋慮隧� 褕 蜻影獎璃� 擇� while ( CmdLine ) { int Len = strlen(CmdLine); if ( !Len ) break; char *Text = new char[Len + 1]; if ( !Text ) break; strcpy(Text, CmdLine); Len = RemoveSpaces(Text); int n; for (n = 0; n < Len; n++) if ( Text[n] == ' ' ) { strcpy(Text, Text + n + 1); Len = RemoveSpaces(Text); if ( Blank->Load(Text) ) { delete Text; SetPaintBoxDimensions(); return; } break; } delete Text; break; } if ( !BlankerConfiguration.FileName[0] || !Blank->Load(BlankerConfiguration.FileName) ) { ZeroMemory(BlankerConfiguration.FileName, MAX_PATH); return; } SetPaintBoxDimensions(); } //--------------------------------------------------------------------------- void __fastcall TFMain::FormShow(TObject *Sender) { // hFormatDC = GetDC(ScrollBox->HandleNeeded); if ( BlankerConfiguration.InspectorCollapsed ) FInspect->Collapse(); FInspect->UpdateBlockData(); int ScreenWidth = GetSystemMetrics(SM_CXSCREEN); int ScreenHeight = GetSystemMetrics(SM_CYSCREEN); if ( BlankerConfiguration.InspectorLeft <= 0 || BlankerConfiguration.InspectorTop <= 0 ) { BlankerConfiguration.InspectorLeft = ScreenWidth - FInspect->Width; BlankerConfiguration.InspectorTop = ScreenHeight - FInspect->Height; BlankerConfiguration.InspectorLeft -= 20; BlankerConfiguration.InspectorTop -= 32; } FInspect->Left = BlankerConfiguration.InspectorLeft; FInspect->Top = BlankerConfiguration.InspectorTop; if ( BlankerConfiguration.ShowInspector && DesignModeSettings.Mode == MODE_DESIGN ) FInspect->Show(); } //--------------------------------------------------------------------------- void __fastcall TFMain::FormClose(TObject *Sender, TCloseAction &Action) { if ( Blank ) { if ( !SaveChanges() ) { Action = caNone; return; } delete Blank; Blank = NULL; } if ( FInspect->Left != BlankerConfiguration.InspectorLeft || FInspect->Top != BlankerConfiguration.InspectorTop ) { BlankerConfiguration.InspectorLeft =
评论
    相关推荐
    • up.rar
      自己写的注册系统服务源码 vc6.0编写
    • Windows Clean Up
      安装软件的时候出现提示“Microsoft Visual C++运行库出错”,使用Windows Clean Up删除报错库可以解决报错,让软件正常安装。
    • ProjectUP100
      UP100 有关项目的更新 2020年6月13日更新: 首先运行python GridWorld_n_Agents_Ayodhya.py生成trajectory.xlsx文件 然后运行python plotTrajectry.py绘制轨迹 2020年3月10日更新: 可以在“结果”文件夹中找到该...
    • signUp
      signUp
    • NextUp TextAloud
      文本转语音软件(NextUp TextAloud)是一款相当新颖的多媒体应用程序,NextUp TextAloud 可以转换任何应用程序中的文字成为声音或MP3文件。平常是常驻在Windows系统列中,随时等待使用者利用它来读取Email、Web page或...
    • signup-course
      它旨在为课程创建SignUp并提供一些有关其的统计信息。 目的是提供一种处理多个注册请求的方法,以避免超过课程的总空缺。 建筑概述 我将列出此解决方案中使用的所有模式和工具: DDD CQRS 中介者模式 消息总线 ...
    • VLOOKUP
      NULL 博文链接:https://weixing.iteye.com/blog/1851429
    • Windows Installer CleanUp
       Windows Installer Cleanup Utility(Windows Installer 清除工具)。Windows Installer CleanUp Utility,可以删除某个程序地Windows Installer配置信息。如果您在安装程序的时候遇到了Windows Installer方面的...
    • Windows Install Clean Up
      Windows Installer Cleanup Utility(Windows Installer 清除工具)。Windows Installer CleanUp Utility,可以删除某个程序地Windows Installer配置信息。如果您在安装程序的时候遇到了Windows Installer方面的...
    • Blow-Up_DOS_EN.zip
      blowup game for dos xdd