BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

help in adding a bmp button

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi WinAPI
View previous topic :: View next topic  
Author Message
Hakuna M. C.
Guest





PostPosted: Fri Feb 27, 2004 6:04 pm    Post subject: help in adding a bmp button Reply with quote



hi all,
I am writing a DLL which communicates with a program containing a
panel. In my DLL, I am going to add a button the the panel. The
following code is all right

Btn:=TButton.Create(FindControl(panelHwnd));
Btn.ParentWindow := PanelHwnd;
Btn.Width := NBtnWidth;
Btn.Height := NBtnHeight;
Btn.Top := NBtnTop;
Btn.Left := NBtnLeft-Btn.Width-10;
Btn.Caption:='Btn';
Btn.Name:='Button';

However, I would like to use a image button rather than a text one. So
I use TBitBtn instead. The compliation is all right but fails to run
the code. It seems that it's a problem in loading the bitmap or
resource. Would you please give me an example in doing this?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi WinAPI All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.