Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Help needed in Borland C++ Builder

Help needed in Borland C++ Builder

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++delphihelp
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • _ Offline
    _ Offline
    __yash__
    wrote on last edited by
    #1

    hi I need to call the following function somewhere in a program: void __fastcall TFormMain::btnUpdateClick(TObject *Sender) {.....} This is the event of mouse-click on a button. How can i call this function in the program itself (which otherwise gets called on 'mouse-click'??

    _ J P 3 Replies Last reply
    0
    • _ __yash__

      hi I need to call the following function somewhere in a program: void __fastcall TFormMain::btnUpdateClick(TObject *Sender) {.....} This is the event of mouse-click on a button. How can i call this function in the program itself (which otherwise gets called on 'mouse-click'??

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      Try sending a WM_COMMAND message to the button ex:SendMessage(WM_COMMAND,/*ID_OF_BUTTON*/);

      Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

      1 Reply Last reply
      0
      • _ __yash__

        hi I need to call the following function somewhere in a program: void __fastcall TFormMain::btnUpdateClick(TObject *Sender) {.....} This is the event of mouse-click on a button. How can i call this function in the program itself (which otherwise gets called on 'mouse-click'??

        J Offline
        J Offline
        James R Twine
        wrote on last edited by
        #3

        By calling it directly.  I do not know how the function is implemented, so I do not know if it can handle a NULL Sender parameter or not - e.g.:

        btnUpdateClick( NULL );

        If you have to call it outside of the TFormMain class, you need a way to expose it from that class.    Peace!

        -=- James
        Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
        Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
        See DeleteFXPFiles

        1 Reply Last reply
        0
        • _ __yash__

          hi I need to call the following function somewhere in a program: void __fastcall TFormMain::btnUpdateClick(TObject *Sender) {.....} This is the event of mouse-click on a button. How can i call this function in the program itself (which otherwise gets called on 'mouse-click'??

          P Offline
          P Offline
          Programm3r
          wrote on last edited by
          #4

          Hi, You can di it like this:void __fastcall TForm1::BitBtn2Click(TObject *Sender) { // what ever code come here } //--------------------------------------------------------------------------- void __fastcall TForm1::BitBtn1Click(TObject *Sender) { BitBtn2Click(Sender); }
          Makes sense .... How that this help :) Regards,


          The only programmers that are better that C programmers are those who code in 1's and 0's :bob: :)Programm3r My Blog: ^_^

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups