请大家帮忙看一下这个问题
#ifndef ImageLabelH
#define ImageLabelH
//---------------------------------------
#include <SysUtils.hpp>
#include <Classes.hpp>
#include <Controls.hpp>
#include <ExtCtrls.hpp>
//---------------------------------------
typedef enum { vaTop, vaCenter, vaBottom } TVertAlign;
typedef enum { haLeft, haCenter, haRight } THoriAlign;
class PACKAGE TImageLabel : public TImage
{
private:
Graphics::TBitmap *FTitleBitmap ;
TFont *FTitleFont ;
TColor FTitleBackColor ;
AnsiString FTitle ;
TVertAlign FTitleVertAlign ;
THoriAlign FTitleHoriAlign ;
protected:
public:
__fastcall TImageLabel(TComponent* Owner);
__fastcall ~TImageLabel();
void __fastcall SetTitleBackColor(TColor color) ;
void __fastcall SetTitleFont( TFont * font );
void __fastcall SetTitle(AnsiString title) ;
void __fastcall SetTitleVertAlign(TVertAlign align) ;
void __fastcall SetTitleHoriAlign(THoriAlign align) ;
//刷新ImageLabel 重新绘制背景颜色,显示Title
void __fastcall TextOutTitle() ;
__published:
__property TColor TitleBackColor =
{read=FTitleBackColor, write=SetTitleBackColor, default=clWhite};
__property TFont *TitleFont =
{read=FTitleFont, write=SetTitleFont};
__property AnsiString Title =
{read=FTitle, write=SetTitle};
__property TVertAlign TitleVertAlign =
{read=FTitleVertAlign, write=SetTitleVertAlign};
__property THoriAlign TitleHoriAlign =
{read=FTitleHoriAlign, write=SetTitleHoriAlign};
};
//---------------------------------------
#endif
//**** .cpp文件 ****//
void __fastcall TImageLabel::SetTitleFont( TFont * font )
{
FTitleFont->Assign( font ) ;
TextOutTitle() ;
}
//---------------------------------------
void __fastcall TImageLabel::SetTitle(AnsiString title)
{
FTitle = title ;
TextOutTitle() ;
}