C++ Borland Builder forms - calling a function
<p>New to C++ so sorry if this is a basic question! I am used to Java (oh yess! so easy).</p>

<p>My function below addMessages is called from another file, it will then actually run <code>__fastcall TfrmRunning::Add()</code>. As i could not get this working from the other file. the add is part of the <code>TdrmRunning</code> object)</p>

<p>How do I get the add messages to call the Add function?</p>

<hr>

<p>This is from <strong>Running.cpp</strong></p>

<pre><code>void __fastcall TfrmRunning::Add()
{
    lbMessages-&gt;Items-&gt;Add("Application Started at ");
}
//This is called from another file as i could not get the above function working
void addMessages(){ 
    TfrmRunning::Add(); // this does not work
}
</code></pre>

<hr>

<p>My Header file (<strong>Running.H</strong>)</p>

<pre><code>class TfrmRunning : public TForm
{
__published:    // IDE-managed Components
    TImage *imgLogo;
    TLabel *lblCopyRight;
    TLabel *lblTitle;
    TButton *btnExit;
TButton *btnViewType;
TListBox *lbMessages;
void __fastcall btnExitClick(TObject *Sender);
void __fastcall FormCreate(TObject *Sender);
void __fastcall Add();
private:    // User declarations
public:     // User declarations
__fastcall TfrmRunning(TComponent* Owner);
};
void addMessages();
</code></pre>
