main.h

来自「C++通讯录源代码」· C头文件 代码 · 共 60 行

H
60
字号
//---------------------------------------------------------------------------

#ifndef MainH
#define MainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
//---------------------------------------------------------------------------

// the form's height
const int FORMHEIGHT = 240;

class TFormMain : public TForm
{
__published:	// IDE-managed Components
    TImage *Image1;
    TShape *ShapeClient;
    TImage *ImageClose;
    TImage *ImageTitle;
    TLabel *LabelTitle;
    TImage *ImageSystem;
    TImage *ImageMinimize;
    TImage *ImageZoom;
    void __fastcall FormCreate(TObject *Sender);
    void __fastcall ImageTitleMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
    void __fastcall FormDestroy(TObject *Sender);
    void __fastcall ImageSystemMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
    void __fastcall ImageSystemDblClick(TObject *Sender);
    void __fastcall ImageSystemClick(TObject *Sender);
private:	// User declarations
    // == 界面代码 ==========================================================
    Graphics::TBitmap *bmpTitleAct;
    Graphics::TBitmap *bmpTitleInact;
    Graphics::TBitmap *bmpSysAct;
    Graphics::TBitmap *bmpSysInact;
    Graphics::TBitmap *bmpClose;
    Graphics::TBitmap *bmpMinimize;
    Graphics::TBitmap *bmpZoom;
    Graphics::TBitmap *bmp_Inact;
    void __fastcall LoadBitmaps();
    void __fastcall FreeBitmaps();
    void __fastcall OnWMActive(TMessage &Msg);
    BEGIN_MESSAGE_MAP
        MESSAGE_HANDLER(WM_ACTIVATE,TMessage,OnWMActive)
    END_MESSAGE_MAP(TForm);
    // == 界面代码 结束 =====================================================
public:		// User declarations
    __fastcall TFormMain(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TFormMain *FormMain;
//---------------------------------------------------------------------------
#endif

⌨️ 快捷键说明

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