Click here to Skip to main content
15,890,845 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: real time matrix conversion Pin
Luc Pattyn13-Aug-07 5:51
sitebuilderLuc Pattyn13-Aug-07 5:51 
QuestionRe: real time matrix conversion Pin
George L. Jackson13-Aug-07 13:58
George L. Jackson13-Aug-07 13:58 
QuestionAccess controls from other modules of a program Pin
eugk12-Aug-07 23:31
eugk12-Aug-07 23:31 
AnswerRe: Access controls from other modules of a program Pin
mid=574113-Aug-07 5:38
mid=574113-Aug-07 5:38 
GeneralRe: Access controls from other modules of a program Pin
eugk13-Aug-07 8:40
eugk13-Aug-07 8:40 
GeneralRe: Access controls from other modules of a program Pin
mid=574113-Aug-07 9:12
mid=574113-Aug-07 9:12 
GeneralRe: Access controls from other modules of a program Pin
eugk13-Aug-07 12:02
eugk13-Aug-07 12:02 
GeneralRe: Access controls from other modules of a program [modified] Pin
mid=574113-Aug-07 12:35
mid=574113-Aug-07 12:35 
I'm sorry. I took "This was a simple task before as I just used pointers" to mean that you had existing native C++ code calling the C++ module that does all the work and were moving that existing code into C++/CLI.

In your case, you can define an event to update the text:
delegate void UpdateText( String^ );


ref class SomeClass
{
  public:
    event UpdateText^ OnUpdateText;
};


public ref class Form1 : Form
{
  public:

    Form1()
    {
      InitializeComponent();
      
      someClass_ = gcnew SomeClass();
      
      someClass_->OnUpdateText += gcnew UpdateText( this, &Form1::UpdateTextHandler );
    }

  private:
   
    SomeClass^ someClass_;
    
    void UpdateTextHandler( String^ text )
    {
      textBox->Text = text;
    }
};
In the implementation of SomeClass, call OnUpdateText( "New text" ) when you want to update the text.


-- modified at 22:59 Monday 13th August, 2007

[Some corrections made to above code.]
GeneralRe: Access controls from other modules of a program Pin
eugk13-Aug-07 15:52
eugk13-Aug-07 15:52 
GeneralRe: Access controls from other modules of a program [modified] Pin
mid=574113-Aug-07 16:12
mid=574113-Aug-07 16:12 
GeneralRe: Access controls from other modules of a program Pin
eugk13-Aug-07 20:26
eugk13-Aug-07 20:26 
QuestionWhat makes a class IDisposable? Pin
mid=574111-Aug-07 15:19
mid=574111-Aug-07 15:19 
AnswerRe: What makes a class IDisposable? Pin
Mark Salsbery12-Aug-07 7:30
Mark Salsbery12-Aug-07 7:30 
GeneralRe: What makes a class IDisposable? Pin
mid=574112-Aug-07 7:58
mid=574112-Aug-07 7:58 
GeneralRe: What makes a class IDisposable? Pin
Luc Pattyn12-Aug-07 8:41
sitebuilderLuc Pattyn12-Aug-07 8:41 
GeneralRe: What makes a class IDisposable? [modified] Pin
mid=574112-Aug-07 9:00
mid=574112-Aug-07 9:00 
GeneralRe: What makes a class IDisposable? Pin
iddqd51513-Aug-07 6:06
iddqd51513-Aug-07 6:06 
GeneralRe: What makes a class IDisposable? Pin
mid=574113-Aug-07 6:15
mid=574113-Aug-07 6:15 
GeneralRe: What makes a class IDisposable? Pin
led mike13-Aug-07 6:28
led mike13-Aug-07 6:28 
GeneralRe: What makes a class IDisposable? Pin
mid=574113-Aug-07 6:46
mid=574113-Aug-07 6:46 
GeneralRe: What makes a class IDisposable? Pin
iddqd51513-Aug-07 6:29
iddqd51513-Aug-07 6:29 
GeneralRe: What makes a class IDisposable? Pin
mid=574113-Aug-07 6:45
mid=574113-Aug-07 6:45 
GeneralRe: What makes a class IDisposable? Pin
iddqd51513-Aug-07 7:32
iddqd51513-Aug-07 7:32 
GeneralRe: What makes a class IDisposable? Pin
mid=574113-Aug-07 7:53
mid=574113-Aug-07 7:53 
GeneralRe: What makes a class IDisposable? Pin
iddqd51513-Aug-07 8:09
iddqd51513-Aug-07 8:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.