Help needed in Borland C++ Builder
-
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'??
-
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'??
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_
-
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'??
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 -
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'??
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: ^_^