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

📄 about.cpp

📁 this is also a unix programme book ,you can find many code in it
💻 CPP
字号:
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "About.h"
#include "Main.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
#pragma resource "myres.res"
TFormAbout *FormAbout;
//---------------------------------------------------------------------------
__fastcall TFormAbout::TFormAbout(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TFormAbout::OnWMActive(TMessage &Msg)
{
    TForm::Dispatch(&Msg);
    switch(Msg.WParamLo)
    {
        case WA_ACTIVE:
        case WA_CLICKACTIVE:
            LabelTitle->Font->Color = clGreen;
            ShapeClient->Pen->Color = clGreen;
            ImageTitle->Picture->Bitmap->Handle = LoadBitmap(HInstance,"TITLE_ACTIVE");
            ImageClose->Picture->Bitmap->Handle = LoadBitmap(HInstance,"CLOSE_ACTIVE");
            break;
        case WA_INACTIVE:
            LabelTitle->Font->Color = clMoneyGreen;
            ShapeClient->Pen->Color = clMoneyGreen;
            ImageTitle->Picture->Bitmap->Handle = LoadBitmap(HInstance,"TITLE_INACTIVE");
            ImageClose->Picture->Bitmap->Handle = LoadBitmap(HInstance,"_INACTIVE");
            break;
    }
}

void __fastcall TFormAbout::ImageCloseClick(TObject *Sender)
{
    Close();    
}
//---------------------------------------------------------------------------

void __fastcall TFormAbout::ImageTitleMouseDown(TObject *Sender,
      TMouseButton Button, TShiftState Shift, int X, int Y)
{
    Refresh();
    if(Button == mbLeft)
    {
        ReleaseCapture();
        Perform(WM_SYSCOMMAND, 0xf017, 0);
    }    
}
//---------------------------------------------------------------------------

void __fastcall TFormAbout::FormShow(TObject *Sender)
{
    ImageTitle->Width = Width - 2;
    ImageClose->Left = Width - 16;    
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

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