BCB Components rotating around DirectX

Welcome to BCB-Tools.com Latest News

Development Tools Demo Applications Step-By-Step Tutorials Component Reference

Register Here Available Downloads

Frequently Asked Questions Discussion Forums Receive emails from BCB-Tools.com Send us some Feedback

Links to other sites Information about the BCB-Tools.com website


    FORUM MESSAGE
    Go to the Welcome Page
        FORUM MESSAGE

    You are reading a General forum message.

    Re: How to know which the button that was pressured, having the some b

    Author: BCB-Tools.com

    Date Posted: 2003-05-13 22:57:55



    I assume you have setup Button1::OnClick() and Button2::OnClick() to point to the same method.
    You can check the TObject* Sender parameter to tell which button was clicked.

    From memory, do something like this :-

    void __fastcall TForm1::Button1Click( TObject* Sender )
    {
    if (Sender->Name == "Button1") ShowMessage("Button1 was clicked");
    else if (Sender->Name == "Button2") ShowMessage("Button2 was clicked");
    }

    and so on.

    - hope this helps,
    Darren Dwyer,
    BCB-Tools.com





    REPLY TO THIS MESSAGE?
    Top    

    You can post a reply to this General message using the form below:
    Your Name:


    Message Subject:


    Message Body:


    Verification:





    When ready, click on the submit button below:






Top

Welcome |  Latest News |  Tools |  Demos |  Tutorials |  Reference |  Register |  Downloads
FAQ |  Forums |  Feedback |  Mailing List |  Links |  Site Information

This page is Copyright © 2007 Darren John Dwyer, Australia. All Rights Reserved.
Borland C++ Builder, CBuilder, etc are Trademarks of Borland Corporation.
DirectX, DirectDraw, Windows, etc are Trademarks of Microsoft Corporation.