📄 lcform.cpp
字号:
// 《不规则窗体组件》
// 作者:林华锋
// 版权:LC工作室
// 日期:2000/05
// 修改:2000/05
//
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "LcForm.h"
#pragma package(smart_init)
//---------------------------------------------------------------------------
// ValidCtrCheck is used to assure that the components created do not have
// any pure virtual functions.
//
static inline void ValidCtrCheck(TLcForm *)
{
new TLcForm(NULL);
}
//---------------------------------------------------------------------------
__fastcall TLcForm::TLcForm(TComponent* Owner)
: TImage(Owner)
{
Align=alClient;
Stretch=true;
CanElliptic=true;
if(ComponentState.Contains(csDesigning))
{
ShowMessage("LcForm正处于设计阶段!");
}
else
{
ShowMessage("LcForm正处于运行阶段!");
}
}
//---------------------------------------------------------------------------
namespace Lcform
{
void __fastcall PACKAGE Register()
{
TComponentClass classes[1] = {__classid(TLcForm)};
RegisterComponents("Samples", classes, 0);
}
}
//---------------------------------------------------------------------------
void __fastcall TLcForm::CreateEllipticForm(void)
{
if(CanElliptic)
{
HRGN hRgn=CreateEllipticRgn(0,0,Parent->Width,Parent->Height);
SetWindowRgn(Parent->Handle,hRgn,true);
}
}
//---------------------------------------------------------------------------
void __fastcall TLcForm::CreateEllipticForm(int x1,int y1,int x2,int y2)
{
if(CanElliptic)
{
HRGN hRgn=CreateEllipticRgn(x1,y1,x2,y2);
SetWindowRgn(Parent->Handle,hRgn,true);
}
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -