📄 mainform.h
字号:
//---------------------------------------------------------------------------
#ifndef MAINFORMH
#define MAINFORMH
//---------------------------------------------------------------------------
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include <vcl\ExtCtrls.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TTimer *Timer1;
void __fastcall FormCreate(TObject *Sender);
void __fastcall FormDestroy(TObject *Sender);
void __fastcall FormKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
void __fastcall FormMouseDown(TObject *Sender, TMouseButton Button,
TShiftState Shift, int X, int Y);
void __fastcall FormMouseMove(TObject *Sender, TShiftState Shift, int X, int Y);
void __fastcall Timer1Timer(TObject *Sender);
void __fastcall FormPaint(TObject *Sender);
private: // User declarations
void __fastcall CreateParams(TCreateParams &Params);
void __fastcall WMEraseBkgnd(TWMEraseBkgnd &Msg);
void __fastcall WMActivate(TWMActivate &Msg);
void __fastcall WMSysCommand(TWMSysCommand &Msg);
TPoint AnchorPoint;
Graphics::TBitmap *ScreenBitmap;
Graphics::TBitmap *SpaceShipBitmap;
void DrawShipOnBackground(void);
void MoveBitmapToScreen(void);
void MoveShipLocation(void);
void PatchBackground(void);
TPoint Location;
TPoint OldLocation;
TRect LocationRect;
int XSpeed;
int YSpeed;
int XDirection;
int YDirection;
TRect ShipRect;
public: // User declarations
__fastcall TForm1(TComponent* Owner);
BEGIN_MESSAGE_MAP
MESSAGE_HANDLER(WM_ERASEBKGND,TWMEraseBkgnd,WMEraseBkgnd)
MESSAGE_HANDLER(WM_ACTIVATE,TWMActivate,WMActivate)
MESSAGE_HANDLER(WM_SYSCOMMAND,TWMSysCommand,WMSysCommand)
END_MESSAGE_MAP(TForm)
};
//---------------------------------------------------------------------------
extern TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -