Board index » cppbuilder » not load Bitmap data

not load Bitmap data


2006-02-28 05:12:11 AM
cppbuilder78
I have a component
why it will not load the Bitmap data when runing the program?
class TP1:public TPanel
{ protected:
Graphics::TBitmap*FGlyph;
Graphics::TBitmap* __fastcall GetGlyph()
{return FGlyph;
}
void __fastcall SetGlyph(Graphics::TBitmap* Value)
{FGlyph->Assign(Value);
}
public:
__fastcall TP1(TComponent* Owner)
{FGlyph=new Graphics::TBitmap;
}
__fastcall ~TP1()
{delete FGlyph;
}
__published:
__property
Graphics::TBitmap*Glyph={read=GetGlyph,write=SetGlyph,stored=true};
};
 
 

Re:not load Bitmap data

"Emmanuel" < XXXX@XXXXX.COM >wrote in message
Quote
why it will not load the Bitmap data when runing the program?
You did not show how you are actually using the FGlyph member in the
component's code, or how you are trying load data into the FGlyph member.
There is nothing wrong with the code you have shown so far, but the code
does not show enough to diagnose your problem.
Gambit
 

Re:not load Bitmap data

Quote
>why it will not load the Bitmap data when runing the program?

You did not show how you are actually using the FGlyph member in the
component's code, or how you are trying load data into the FGlyph member.
There is nothing wrong with the code you have shown so far, but the code
does not show enough to diagnose your problem.


Gambit


class PACKAGE TBLDBBitBtn : public TBLPanel
{private:
protected:
TBitBtn*BitBtn;
Graphics::TBitmap* __fastcall GetGlyph();
void __fastcall SetGlyph(Graphics::TBitmap* Value);
public:
__fastcall TBLDBBitBtn(TComponent* Owner);
__fastcall ~TBLDBBitBtn();
__published:
__property
Graphics::TBitmap*Glyph={read=GetGlyph,write=SetGlyph,stored=true};
};
__fastcall TBLDBBitBtn::TBLDBBitBtn(TComponent* Owner)
: TBLPanel(Owner)
{BitBtn=new TBitBtn(this);
BitBtn->Parent=this;
BitBtn->Top=0;
BitBtn->Left=0;
BitBtn->Width=Width;
BitBtn->Height=Height;
}
__fastcall TBLDBBitBtn::~TBLDBBitBtn()
{delete BitBtn;
}
Graphics::TBitmap* __fastcall TBLDBBitBtn::GetGlyph()
{return BitBtn->Glyph;
}
void __fastcall TBLDBBitBtn::SetGlyph(Graphics::TBitmap* Value)
{BitBtn->Glyph=Value;
}
 

{smallsort}

Re:not load Bitmap data

"Emmanuel" < XXXX@XXXXX.COM >wrote in message
Quote
TBitBtn*BitBtn;
That is not what you showed earlier. Now you are changing the dynamics of
the situation. Also, you did not answer my answer my earlier questions -
what the the rest of the component actually trying to do with the
glyph/button? How exactly are you trying to load data into it? Why exactly
do you think it is not loading anything?
Quote
BitBtn->Top=0;
BitBtn->Left=0;
BitBtn->Width=Width;
BitBtn->Height=Height;
If you are going to completely hide the Panel with the button, then why use
a panel at all?
What EXACTLY are you trying to accomplish in the first place?
Gambit
 

Re:not load Bitmap data

I am just testing
"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >写入消息新闻:4403fea1$ XXXX@XXXXX.COM ...
Quote

"Emmanuel" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...

>TBitBtn*BitBtn;

That is not what you showed earlier. Now you are changing the dynamics of
the situation. Also, you did not answer my answer my earlier questions -
what the the rest of the component actually trying to do with the
glyph/button? How exactly are you trying to load data into it? Why
exactly
do you think it is not loading anything?

>BitBtn->Top=0;
>BitBtn->Left=0;
>BitBtn->Width=Width;
>BitBtn->Height=Height;

If you are going to completely hide the Panel with the button, then why
use
a panel at all?

What EXACTLY are you trying to accomplish in the first place?


Gambit