Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 03-31-2007, 12:22 PM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,060
Default Add a button to a form.

Anybody knows how to add/create a button using Windows APIs in a window so that it will close the window if its pressed (Similar to the X button that close any Window)?

Regards,
Abdulaziz Jasser
Reply With Quote
  #2  
Old 03-31-2007, 01:18 PM
murphys murphys is offline
Senior Member
 
Join Date: Aug 2001
Posts: 2,948
Default RE: Add a button to a form.

why do u need it to be using windows api?
what's wrong with a simple TButton.Create; and so on

10x
Amos
Reply With Quote
  #3  
Old 03-31-2007, 01:24 PM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,060
Default RE: Add a button to a form.

I've created a Window using Windows APIs, and now I need to add a button to it. I cannot use VCL components with this form. Everything has to be created using APIs.

Regards,
Abdulaziz Jasser
Reply With Quote
  #4  
Old 03-31-2007, 03:03 PM
BaraoZemo BaraoZemo is offline
Senior Member
 
Join Date: Nov 2001
Posts: 3,598
Default RE: Add a button to a form.

hi jasser,

[link=http://groups.google.com.br/group/borland.public.delphi.winapi/browse_thread/thread/724f9b48cae095ef/793f9ee7e9b679e7?lnk=st&q=delphi+create+a+button+using+api&rnum=1&hl=pt-BR#793f9ee7e9b679e7]take a look here[/link]

Regards
BaraoZemo

ps, don't forget to click in the button and Accept as Answer if this helped you!
Reply With Quote
  #5  
Old 03-31-2007, 03:08 PM
struct struct is offline
Senior Member
 
Join Date: Nov 2003
Posts: 667
Default RE: Add a button to a form.

I'm on my PDA so I don't have access to the references needed to answer your whole question. but you are going to need to set the button's modelresult to 'ok' to get the behavior you want.


Code:
I love this forum!
function LearnSomethingNew(User:String):Boolean;
Reply With Quote
  #6  
Old 04-01-2007, 02:45 PM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 5,060
Default RE: Add a button to a form.

I just found a better way. I will see if I can receive more answers. After that I will give a point.

Regards,
Abdulaziz Jasser
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 07:06 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.