//--------------------------------------------------------------------------- #include #pragma hdrstop #include "CustomerSettingFormUnit.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma link "PNGButton" #pragma resource "*.dfm" TCustomerSettingForm *CustomerSettingForm; //--------------------------------------------------------------------------- #define LEN_BKG_EXTERNAL_ROUND (1) #define LEN_BKG_EXTERNAL_FRMAE (1) #define LEN_BKG_INTERNAL_LINE (23) //--------------------------------------------------------------------------- __fastcall TCustomerSettingForm::TCustomerSettingForm(TComponent* Owner) : TForm(Owner) { int nHeightTmp = m_pTextButtonOK->Top - CSPANEL_START - CSPANEL_HEIGHT; m_pCSPanel = new TCustmerSettingPanel(this); m_pCSPanel->Parent = this; m_pCSPanel->Left = CSPANEL_LEFT; m_pCSPanel->Top = CSPANEL_START + nHeightTmp/2; m_pCSPanel->Width = Width - CSPANEL_LEFT - CSPANEL_RIGHT; m_pCSPanel->Height = CSPANEL_HEIGHT; //»æÖÆÔ²½Ç´°Ìå HRGN hRgn = CreateRoundRectRgn( 0, 0, Width+1, Height+1, 16, 16 ); SetWindowRgn( Handle, hRgn, false ); DeleteObject( hRgn ); SetTransparent( this ); } //--------------------------------------------------------------------------- __fastcall TCustomerSettingForm::~TCustomerSettingForm() { if( m_pCSPanel ){ delete m_pCSPanel; m_pCSPanel = NULL; } } //--------------------------------------------------------------------------- void __fastcall TCustomerSettingForm::FormShow(TObject *Sender) { m_pCSPanel->SetContent(); } //--------------------------------------------------------------------------- void __fastcall TCustomerSettingForm::WMNCHitTest(TWMNCHitTest &Msg) { TForm::Dispatch(&Msg); if( Msg.Result==HTCLIENT && (Msg.YPosLeft) ) ) { Msg.Result = HTCAPTION; } } //---------------------------------------------------------------------------